Skip to content

Instantly share code, notes, and snippets.

@matiit
Created February 27, 2011 18:43
Show Gist options
  • Save matiit/846409 to your computer and use it in GitHub Desktop.
Save matiit/846409 to your computer and use it in GitHub Desktop.
script adds user to all groups in a system (Linux),
#!/bin/bash
echo "Podaj nazw? usera";
read USER_CHOICE;
for i in `cut -f1 -d':' "/etc/group"`; do
gpasswd -a $USER_CHOICE $i ;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment