diff --git a/build/bin/user_setup b/build/bin/user_setup index 1e36064..5498f67 100755 --- a/build/bin/user_setup +++ b/build/bin/user_setup @@ -2,12 +2,10 @@ set -x # ensure $HOME exists and is accessible by group 0 (we don't know what the runtime UID will be) -mkdir -p ${HOME} -chown ${USER_UID}:0 ${HOME} -chmod ug+rwx ${HOME} - -# runtime user will need to be able to self-insert in /etc/passwd -chmod g+rw /etc/passwd +echo "${USER_NAME}:x:${USER_UID}:0:${USER_NAME} user:${HOME}:/sbin/nologin" >> /etc/passwd +mkdir -p "${HOME}" +chown "${USER_UID}:0" "${HOME}" +chmod ug+rwx "${HOME}" # no need for this script to remain in the image after running rm $0