diff --git a/Days/Linux/create-user.sh b/Days/Linux/create-user.sh new file mode 100644 index 0000000..554d6ae --- /dev/null +++ b/Days/Linux/create-user.sh @@ -0,0 +1,15 @@ +#! /usr/bin/bash + +echo "What is your intended username?" +read username +echo "What is your password" +read password + +#A user can be passed in as a command line argument +echo "$username user account being created." + +#A user is created with the name of command line argument +sudo useradd -m $username + +#A password can be parsed in as a command line argument. +sudo chpasswd <<< $username:$password \ No newline at end of file