Skip to content
Snippets Groups Projects
Commit 487cf92b authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Do not try to add admin account if it already exists.

parent 7c1c7c57
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,9 @@ if ( ! test -z ${SHELL_UBICAST_PWD} ); then ...@@ -19,7 +19,9 @@ if ( ! test -z ${SHELL_UBICAST_PWD} ); then
fi fi
# create admin account # create admin account
useradd -m admin --shell /bin/bash if ( ! id admin >/dev/null ); then
useradd -m admin --shell /bin/bash
fi
usermod -aG sudo admin usermod -aG sudo admin
if ( ! test -z ${SHELL_ADMIN_PWD} ); then if ( ! test -z ${SHELL_ADMIN_PWD} ); then
echo -e "${SHELL_ADMIN_PWD}\n${SHELL_ADMIN_PWD}" | passwd -q admin echo -e "${SHELL_ADMIN_PWD}\n${SHELL_ADMIN_PWD}" | passwd -q admin
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment