Extended Brain Storage

Gentoo Linux: Adding User to Multiple Groups

Posted on September 12, 2012

It is always annoying to add new user manually into more than a few groups...

The following bash command makes this operation smooth. Replace <USERNAME> with your actual user:

$ for GROUPS in disk wheel users games network video audio optical \
                floppy storage scanner power vboxusers wireshark ; \
  do \
    gpasswd -a $GROUPS \
  done

Tags: #Gentoo Linux #gpasswd #group #user

⏴ Previous Post Next Post ⏵