View previous topic :: View next topic |
Author |
Message |
Johnyp Guru
Joined: 23 Mar 2005 Posts: 301
|
Posted: Wed Apr 20, 2005 2:22 am Post subject: Adding users to groups (groups get replaced) |
|
|
Hey all
Ok - my personal least favorite part of administrering Linux box - permissions.
I've added a group foo. And went to add 2 users to that group with
Code: | usermod -G<foo> <bar> |
Where foo is a group and bar is a user name. As soon as i've done that - both users belong to only 2 groups now - > users, and foo. Both users were in about 10 other groups before i issued the command to add them to foo
What did i do wrong, and how can i add them correctly without replacing (deleting) their current group association?
Before anyone sugests editing /etc/group - i would like to do it form the command line _________________ Gentoo Unanswered Questions- Give it a try! |
|
Back to top |
|
|
Deepak420 Apprentice
Joined: 12 Jan 2005 Posts: 173 Location: Beantown
|
Posted: Wed Apr 20, 2005 2:33 am Post subject: |
|
|
When you use usermod -G you must list all of the supplemental groups you want that user to belong to. If you only list foo that's all that it'll have (except users which is the primary group [usermod -g]) |
|
Back to top |
|
|
Lucky B Apprentice
Joined: 01 Apr 2005 Posts: 235 Location: Florida
|
Posted: Wed Apr 20, 2005 6:46 am Post subject: |
|
|
Deepak420 wrote: | When you use usermod -G you must list all of the supplemental groups you want that user to belong to. If you only list foo that's all that it'll have (except users which is the primary group [usermod -g]) |
to elaborate, the list must be comma separated
for example if you have groups foo and foobar and user bar
usermod -G foo,foobar bar |
|
Back to top |
|
|
|