Commit 114bebfe authored by Michał Woźniak's avatar Michał Woźniak
Browse files

Update run.sh: SSH_PASSWORD implemented

parent e61190d5
......@@ -223,8 +223,17 @@ else
# we either have no UID given (and don't care about it), or have a UID given that does not exist in the system
# great! let's add the user
useradd $UID_ARGS -r -g "$SSH_GROUP" -s /bin/bash "$SSH_USER"
# by default disable the password
passwd -d "$SSH_USER"
# do we have a password set for the user?
if [[ "$SSH_PASSWORD" == "" ]]; then
echo " +-- disabling '$SSH_USER' user password"
# by default disable the password
passwd -d "$SSH_USER"
else
echo " +-- setting '$SSH_USER' user password to the one provided in SSH_PASSWORD"
echo "$SSH_USER:$SSH_PASSWORD" | chpasswd
fi
# create home
mkdir -p "/home/$SSH_USER"
# and make sure that permissions and ownership are set properly
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment