Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How to change primary user group of a user? Preferably without losing the current primary group altogether as the user is part of 'staff' ie. admin. I suppose I could create another admin user and then recreate the original user, but is there a simpler way?

share|improve this question
add comment

2 Answers

Use usermod(1M):

# usermod -g PRIMARY_GROUP -G SECONDARY_GROUP username
share|improve this answer
add comment

Have you tried the newgrp command?

share|improve this answer
newgrp changes the group for just the current login session, usermod as suggested by @gtirloni changes the default groups defined in the passwd and group files for all future logins. –  alanc Sep 2 '12 at 8:08
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.