mirror of
https://github.com/MichaelCade/90DaysOfDevOps.git
synced 2025-02-22 20:51:13 +07:00
Day 19 - Adding example create-user.sh into Linux Folder
This commit is contained in:
parent
74716b4713
commit
a6c1b16035
15
Days/Linux/create-user.sh
Normal file
15
Days/Linux/create-user.sh
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user