mirror of
https://github.com/elAgala/server-initializer.git
synced 2026-02-14 05:06:18 +00:00
Fix user creation
This commit is contained in:
@@ -3,7 +3,10 @@
|
||||
function create_user() {
|
||||
username=$1
|
||||
|
||||
echo "[ USER ]: Starting user setup"
|
||||
home_dir="/home/$username"
|
||||
|
||||
echo "[ USER ]: Starting user $username setup"
|
||||
mkdir -p $home_dir
|
||||
sudo useradd $username
|
||||
echo "[ USER ]: Set a password for $username:"
|
||||
sudo passwd "$username"
|
||||
|
||||
Reference in New Issue
Block a user