Created
March 6, 2020 14:10
-
-
Save lzhbrian/7ca7de91ba2d7547f50844c243aa2567 to your computer and use it in GitHub Desktop.
create user account in ubuntu
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
for i in $@ | |
do | |
# create user | |
useradd --gid groupname --home-dir /nvme/$i --create-home --no-user-group --shell /bin/bash $i | |
echo $i:$i | chpasswd | |
# make folder a data path | |
mkdir /data1/$i | |
chown $i:groupname /data1/$i | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment