Jan 18, 2006 #1 delfy MIS Joined Feb 8, 2005 Messages 96 Location JM i already added a user using useradd myuser but i need to add this user to a particular group mygroup how would i do this at the commandline?
i already added a user using useradd myuser but i need to add this user to a particular group mygroup how would i do this at the commandline?
Jan 18, 2006 1 #2 thedaver IS-IT--Management Joined Jul 12, 2001 Messages 2,741 Location US groupadd mygroup (if necessary) usermod -G mygroup myuser In the case the user already belongs to 'thisgroup' and 'thatgroup' and you wish to retain those relationships... usermod -G mygroup,thisgroup,thatgroup myuser D.E.R. Management - IT Project Management Consulting http://www.dermanagement.com/ Upvote 0 Downvote
groupadd mygroup (if necessary) usermod -G mygroup myuser In the case the user already belongs to 'thisgroup' and 'thatgroup' and you wish to retain those relationships... usermod -G mygroup,thisgroup,thatgroup myuser D.E.R. Management - IT Project Management Consulting http://www.dermanagement.com/
Jan 24, 2006 #3 Annihilannic MIS Joined Jun 22, 2000 Messages 6,317 Location AU Does anyone else wish usermod had a syntax to retain existing groups? Something like usermod -G +newgroup username would seem sensible to me. Annihilannic. Upvote 0 Downvote
Does anyone else wish usermod had a syntax to retain existing groups? Something like usermod -G +newgroup username would seem sensible to me. Annihilannic.
Jan 24, 2006 #4 thedaver IS-IT--Management Joined Jul 12, 2001 Messages 2,741 Location US It's (probably) GPL, go for it! D.E.R. Management - IT Project Management Consulting http://www.dermanagement.com/ Upvote 0 Downvote
It's (probably) GPL, go for it! D.E.R. Management - IT Project Management Consulting http://www.dermanagement.com/