cannot lock password for user created with useradd --extrausers
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
shadow (Ubuntu) |
Invalid
|
High
|
Unassigned |
Bug Description
passwd -l does not take --extrausers or otherwise work for extrausers.
Neither does usermod.
% mkdir -p /var/lib/extrausers
% for f in passwd group gshadow subuid subgid shadow; do touch /var/lib/
% useradd foo --extrausers --shell /bin/bash -m
% echo $?
0
% # cat /var/lib/
foo:x:1001:
% passwd -l foo
passwd: user 'foo' does not exist
% passwd --extrausers -l foo
passwd: unrecognized option '--extrausers'
% usermod --lock foo
usermod: user 'foo' does not exist
% usermod --extrausers --lock foo
usermod: unrecognized option '--extrausers'
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: passwd 1:4.2-3.1ubuntu5
ProcVersionSign
Uname: Linux 4.9.0-15-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
Date: Tue Apr 4 16:34:20 2017
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
LANG=C.UTF-8
SourcePackage: shadow
UpgradeStatus: No upgrade log present (probably fresh install)
Related bugs:
* bug 1679777: Adding and reporting ssh keys fails for user in extrausers
description: | updated |
Changed in shadow (Ubuntu): | |
importance: | Undecided → High |
Extrausers is a concept introduced by the libnss-extrausers package. shadow and passwd simply know nothing about it.
It simply is not a bug in the shadow package. It's a wholly un-implemented feature. It's not clear to me how this would function - after all these are supposed to be accounts 'copied from other systems' according to the package. And I'm not clear on how these would relate to ldap, for instance.
So if you are interested in using passwd or usermod for these, I would recommend opening a discussion at either (or both) github. com/shadow- maint/shadow/ issues, or probably better at the libnss-extrausers package.