mirror of
https://github.com/MichaelCade/90DaysOfDevOps.git
synced 2025-01-10 23:27:23 +07:00
15 lines
394 B
Bash
15 lines
394 B
Bash
|
#! /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
|