[Linux-disciples] Roll your own 'addgroup'
Stephen R Laniel
steve at laniels.org
Mon Apr 24 08:59:35 EDT 2006
On a bunch of the flavors of Linux I use at work, they don't
have an 'addgroup' command, which -- in Debian -- gives us
nice syntactic sugar like so:
sudo addgroup username groupname
which adds 'username' to 'groupname'. Instead we have to do
sudo usermod -G group1,group2,...,groupN,groupname username
where group1,...groupN are the groups that the user already
belonged to; if any of them are missing, usermod removes the
user from the missing group(s). To get the 'addgroup'
function, one has to do things like so:
sudo usermod -G `groups |sed 's/ /,/g'`,groupname username
Does anyone know of a shorter way -- a la 'adduser' -- to do
this in more stripped-down Linuxes?
--
Stephen R. Laniel
steve at laniels.org
Cell: +(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20060424/a9c23ff3/attachment.pgp
More information about the Linux-disciples
mailing list