Created
July 3, 2017 21:02
-
-
Save theriverman/fcbe99ac6cb51d3c4ab49492663b86f0 to your computer and use it in GitHub Desktop.
Create user with password shell-script
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/sh | |
# after `=` type the user account and password you wish to create respectively | |
user=your_selected_account_name | |
password=your_supersecret_password | |
adduser --quiet --disabled-password --shell /bin/bash --home /home/$user --gecos "User" $user | |
# set password | |
echo "$user:$password" | chpasswd | |
echo User: $user has been created with password: $password | |
#SCRIPT END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment