-
Notifications
You must be signed in to change notification settings - Fork 0
Home
#!/bin/bash
################################ #Obtain valor variable #######################
while [ "$Username" != "Exit" ]
echo echo -e "Please enter username for account or type Exit: \c"
read Username
do
useradd $Username
#Check if variable had content: #######################################
if [ -z $Username ] then echo echo You didnt provide a username echo Leaving script.. exit fi
case $Username in Exit) echo Leaving script.. exit ;; *) echo echo Account for $Username is being created... ;; esac
#Define pass for the account #############################
echo Password for $Username is being set.. echo passwd $Username
User_Record=$(grep $Username /etc/passwd)
echo echo here is $Username 's record: echo $User_Record echo
echo Account is ready for use.
done echo Leaving script... exit