Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Adding users to groups (groups get replaced)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Johnyp
Guru
Guru


Joined: 23 Mar 2005
Posts: 301

PostPosted: Wed Apr 20, 2005 2:22 am    Post subject: Adding users to groups (groups get replaced) Reply with quote

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
View user's profile Send private message
Deepak420
Apprentice
Apprentice


Joined: 12 Jan 2005
Posts: 173
Location: Beantown

PostPosted: Wed Apr 20, 2005 2:33 am    Post subject: Reply with quote

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
View user's profile Send private message
Lucky B
Apprentice
Apprentice


Joined: 01 Apr 2005
Posts: 235
Location: Florida

PostPosted: Wed Apr 20, 2005 6:46 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum