Created
March 28, 2017 15:37
-
-
Save forevergenin/68d779060bfd4120505b908a49e64ac5 to your computer and use it in GitHub Desktop.
Automate adding multiple users and add them to single group on linux system
This file contains hidden or 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 | |
groupadd developer | |
_USERS='admin ' | |
for _USER in ${_USERS} | |
do | |
useradd ${_USER} -mN -G developer | |
done | |
for _USER in ${_USERS} | |
do | |
echo ${_USER} | passwd ${_USER} --stdin | |
done | |
# usermod -aG wheel admin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment