add an exixsting user to an existing group
hi all,
Is there a command to add an existing user to an existing group?This
will be a supplementary group for the user.He still has his main group unchanged.I want a command instead of manually editing the /etc/group file.
thanks in advance.
bye.
Hi list,
Quoted 2 lines · kaushal
I want a command instead of manually editing the
/etc/groupfile.
"usermod -G xgroupy xusery" for supplementary group(s) or "usermaod -g 4711 xusery" for a new primary group.
Have a lot of fun...
Signature · 14 lines
Mit freundlichen Grüßen Martin Klier PC-Benutzerunterstützung / Linux-Server Asset Management A.T.U - Auto-Teile-Unger Dr.-Kilian-Straße 11 92637 Weiden Telefon: (0961) 306-5663 Telefax: (0961) 306-9345663 Internet: www.atu.de
Quoted 4 lines · kaushal
Is there a command to add an existing user to an existing group?This
will be a supplementary group for the user.He still has his main group unchanged.I want a command instead of manually editing the/etc/groupfile.
You can set the list of supplementary groups using usermod, e.g.:
usermod -G group1,group2 user
AFAIK, there isn't a standard command to add or remove specific groups while leaving the rest unchanged.
Signature · 1 line
Glynn Clements <[email protected]>
Quoted 6 lines · you
Quoted 4 lines · kaushal
Is there a command to add an existing user to an existing group?This
will be a supplementary group for the user.He still has his main group unchanged.I want a command instead of manually editing the/etc/groupfile.
Quoted 6 lines
You can set the list of supplementary groups using usermod, e.g.:
usermod -G group1,group2 user
AFAIK, there isn't a standard command to add or remove specific groups while leaving the rest unchanged.
How about gpasswd?
gpasswd (1) - administer the /etc/group file
"gpasswd -a user group" adds user to a supp group, "-d" removes.
Rob
Quoted 9 lines · Robert Wood
Quoted 9 lines
Quoted 4 lines
Is there a command to add an existing user to an existing group?This
will be a supplementary group for the user.He still has his main group unchanged.I want a command instead of manually editing the/etc/groupfile.You can set the list of supplementary groups using usermod, e.g.:
usermod -G group1,group2 user
Quoted 7 lines
Quoted 2 lines
AFAIK, there isn't a standard command to add or remove specific groups while leaving the rest unchanged.
How about gpasswd?
gpasswd (1) - administer the/etc/groupfile"gpasswd -a user group" adds user to a supp group, "-d" removes.
OK, that seems about right.
For some reason, if you pick any one of the manual pages from the shadow package, and follow enough of the "SEE ALSO" cross-references, you'll eventually come across all of the other manual pages. Except the one for gpasswd, which isn't referenced from any of them.
Signature · 1 line
Glynn Clements <[email protected]>