GNU bug report logs -
#21096
Useradd, usermod do not use the target to read groups from when using the -R parameter
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi list,
I'm trying to generate a rootfs and am using a script to add users,
groups etc. I first add a group via groupadd -R ${ROOTFS_TARGET}
somegroup which works fine.
Using useradd with the -R parameter, to add a user also works as
expected, until i try to add the -a -G somegroup options. Using usermod
after creating the group and doing -a -G somegroup identically fails
informing us there is no such group, somegroup.
It appears both usermod and useradd use the local /etc/group rather then
what is supplied via the -R parameter. A workaround for now, is to use
chroot directly, chroot ${TARGET} usermod -a -G somegroup someuser, but
that only works if coreutils (or busybox (without useradd/usermod)) are
already installed on the target, which may not be there (yet/at all).
Am I doing something wrong or is this indeed a bug in the coreutils?
I'm using debian jessie's 8.23-4 on amd64
Olliver
--
Met vriendelijke groeten, Kind regards, 与亲切的问候
Olliver Schinagl
Research & Development
Ultimaker B.V.
--
IMAGINE IT >> MAKE IT
Meet us online at Twitter <http://twitter.com/ultimaker>, Facebook
<http://facebook.com/ultimaker>, Google+ <http://google.com/+Ultimaker>
www.ultimaker.com
This bug report was last modified 9 years and 306 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.