Click to See Complete Forum and Search --> : users, groups - simple question


kowalsky
12-07-2001, 01:08 PM
hi all,
sorry to bug you with this simple question but I just can't get a hold of this...
How do I add an existing user to an existing group?
All commands I know are CREATING new groups or users and I can assign users to groups but all I need is, again, to add an existing user to an existing group,
thanks,
kowalsky

PLBlaze
12-07-2001, 01:12 PM
On top of my head wouldn't it be adduser -g somegroup username? You could always read the man pages for groupadd/useradd or if you feel brave do it by hand in /etc/passwd or /etc/group...hope this helps.

stiles
12-07-2001, 06:36 PM
in linux I'd use usermod

to add three secondary groups to user_login:
usermod -G group1, group2, group3 user_login

-g changes your primary group which I doubt you will want to change sence linux by default uses private primary groups.

or you can just edit /etc/group

group_name:x:23:member1,member2,member3

the x is a password holder, the number is the GID, and the comma delimited list is secondary members of that group