Addition and modification of users
Andreas Schmidl
andreas.schmidl at gmail.com
Mon Aug 31 17:59:12 UTC 2015
Hi,
I'm using the stable 15.04 system image for my BeagleBone Black Rev C.
Currently for me it isn't possible to add a new user or edit an existing
one. For such tasks typically adduser and usermod are used.
The nsswitch.conf is correctly configured out of box:
---------
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed,
try:
# `info libc "Name Service Switch"' for information about this file.
passwd: compat extrausers
group: compat extrausers
shadow: compat extrausers
----------
Because /etc/passwd, /etc/group and /etc/shadow are readonly mounted
lib_extrausers have to be used. The libnss_extrausers library comes
along with the system image. Also the group, shadow and passwd files are
exists in a writeable folder (/var/lib/extrausers):
--------
(BeagleBoneBlack)ubuntu at sn-client-08:/var/lib/extrausers$ ls -l
total 20
-rw-r--r-- 1 root root 15 Aug 31 17:53 group
-rw-r----- 1 root shadow 11 Jul 24 16:36 gshadow
-rw-r--r-- 1 root root 52 Jul 24 16:36 passwd
-rw-r----- 1 root shadow 125 Aug 27 19:59 shadow
-rw------- 1 root root 125 Jul 24 16:36 shadow-
----------
Nevertheless if I try to create a new user it will end with the
following error:
----------
(BeagleBoneBlack)ubuntu at sn-client-08:/var/lib/extrausers$ sudo adduser
testuser
Adding user `testuser' ...
Adding new group `testuser' (1001) ...
groupadd: cannot lock /etc/group; try again later.
adduser: `/usr/sbin/groupadd -g 1001 testuser' returned error code 10.
Exiting.
-----------
Is this a bug in snappy ubuntu core? Is there a different way to add
users and edit existing ones? Apart from using a tool for these tasks I
know that it's possible to manually edit group, passwd, ... but I think
that's a bad approach.
Regards,
Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snappy-devel/attachments/20150831/99572e9f/attachment.html>
More information about the snappy-devel
mailing list