adduser fails to find subuid subgid files under /var/lib/extrausers

Bug #1492327 reported by Oliver Grawert
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snappy
Status tracked in Trunk
15.04
Fix Released
High
Oliver Grawert
Trunk
Fix Released
High
Oliver Grawert

Bug Description

while the patch to support libnss extrausers in adduser and shadow was ported to snappy, there still seem to be some bits missing ... trying adduser on the current 15.04 edge image results in:

useradd: cannot open /var/lib/extrausers/subuid
adduser: `/usr/sbin/useradd --extrausers -d /home/testuser -g testuser
-s /bin/bash -u 1001 testuser' returned error code 16. Exiting.

Oliver Grawert (ogra)
Changed in snappy:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Oliver Grawert (ogra)
milestone: none → 15.04.3
Oliver Grawert (ogra)
summary: - adduser fails to find subuid sugid files under /var/lib/extrausers
+ adduser fails to find subuid subgid files under /var/lib/extrausers
Revision history for this message
Oliver Grawert (ogra) wrote :

bug 1475749 seems related here

Revision history for this message
Oliver Grawert (ogra) wrote :

just touching /var/lib/extrausers/subuid and /var/lib/extrausers/subgid seems to be enough to make this particulare error go away, but it then fails in chfn:

(RaspberryPi2)ubuntu@localhost:~$ sudo adduser --extrausers testuser
Adding user `testuser' ...
Adding new group `testuser' (1001) ...
ENTER EXTRAUSERS_GROUP_FILEEXIT EXTRAUSERS_GROUP_FILEENTER EXTRAUSERS_SHADOWGROUP_FILEEXIT EXTRAUSERS_SHADOWGROUP_FILEAdding new user `testuser' (1001) with group `testuser' ...
Creating home directory `/home/testuser' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
/usr/bin/chfn: unrecognized option '--extrausers'
Usage: chfn [options] [LOGIN]

Options:
  -f, --full-name FULL_NAME change user's full name
  -h, --home-phone HOME_PHONE change user's home phone number
  -o, --other OTHER_INFO change user's other GECOS information
  -r, --room ROOM_NUMBER change user's room number
  -R, --root CHROOT_DIR directory to chroot into
  -u, --help display this help message and exit
  -w, --work-phone WORK_PHONE change user's office phone number

adduser: `/usr/bin/chfn --extrausers testuser' returned error code 2. Exiting.
(RaspberryPi2)ubuntu@localhost:~$

Revision history for this message
Oliver Grawert (ogra) wrote :

opened bug 1495580 for teh chfn issue, the subuid and subgid issue is fixed for snappy 15.04 already by shipping two empty files

Changed in snappy:
milestone: 15.04.3 → none
Revision history for this message
Leo Arias (elopio) wrote :

With $ sudo adduser --extrausers testuser I'm no longer getting the "cannot open /var/lib/extrausers/subuid". So I'll mark this one as fixed. I'm getting the chfn error, so let's keep that one.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.