Last active
December 11, 2015 15:28
-
-
Save noorus/4620889 to your computer and use it in GitHub Desktop.
convert users on a linux system to use shared group "staff"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sed -i 's/umask .*/umask 002/g' /etc/skel/.bashrc | |
for dir in /home/* | |
do | |
sed -i 's/umask .*/umask 002/g' ${dir}/.bashrc | |
usr=${dir##*/} | |
adduser $usr staff | |
usermod -g staff $usr | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment