General
cancel
Showing results for 
Search instead for 
Did you mean: 

Change group ID of a set of users...

Change group ID of a set of users...

... How can I do that?

Leandro.
3 REPLIES
Sivaram N
Occasional Advisor

Re: Change group ID of a set of users...

usermod -g should do it. 'man usermod' should explain it all.
Mark Fenton
Esteemed Contributor

Re: Change group ID of a set of users...

or to wrap that in a little loop ---

export USERS="list of the users you want"
for USER in USERS
do
usermod -g $USER
done

Mark Fenton
Esteemed Contributor

Re: Change group ID of a set of users...

oops, left out the '$' in front of $USERS

(sorry)