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.

why is it that when I execute groups the output doesn't contain the adm group, while the output of groups $USER has it? The user is supposed to be in that group.

share|improve this question
    
Similar to this: unix.stackexchange.com/questions/6387/… –  Tshepang Feb 13 '11 at 18:26

1 Answer 1

up vote 5 down vote accepted

If you have just added a user to a group, you will need a log out and log back in in order to acquire the new credentials. For example:

$ id
uid=500(lars) gid=500(lars) 
$ groups
lars
$ sudo usermod -G wheel,libvirt,mock lars
$ groups
lars
$ groups lars
lars : lars wheel libvirt mock

And if I log out and log back in:

$ groups
lars wheel libvirt mock
share|improve this answer

Your Answer

 
discard

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.