Linux: Add Users to Multiple Groups

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 games network video audio optical
floppy storage scanner power users vboxusers wireshark ;
do gpasswd -a $groups ; done
This entry was posted in Linux, Security and tagged , , , . Bookmark the permalink.