adduser/addgroup vs portable useradd/groupadd

Mike Frysinger vapier at gentoo.org
Tue Feb 16 00:25:06 UTC 2016


On 15 Feb 2016 17:42, Natanael Copa wrote:
> One exception of this has been the adduser/addgroup tools, and it is
> starting to become a problem[1]. Scripts that work on many other
> systems needs to be handled special when busybox adduser/addgroup is
> needed.
> 
> A co-worker did some investigation of the adduser/addgroup vs
> useradd/group add implementations on various systems to get an idea
> what is the most portable.
> 
> I think that what would make most sense is to add useradd and groupadd
> to busybox.

useradd/groupadd are provided by shadow in Linux:
	http://pkg-shadow.alioth.debian.org/
	https://github.com/shadow-maint/shadow.git

behavior of other Unixes isn't important in this regard i don't think.
if you want to see the mess, just look at the cruft we have in Gentoo:
	https://gitweb.gentoo.org/repo/gentoo.git/tree/eclass/user.eclass
we don't want that in busybox.

adduser/addgroup tend to be symlinks or wrappers, if they exist at all,
but by and large are deprecated.  busybox should implement applets that
mimic shadow here and deprecate the old ones, if not throw them out.
although we can probably rename & massage the sources in these cases.

patches welcome ;)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20160215/e578c313/attachment.asc>


More information about the busybox mailing list