Skip to content

Commit

Permalink
Use long options in useradd (#1978)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathbunnyru authored Aug 21, 2023
1 parent b88eba3 commit 5f8524d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion images/docker-stacks-foundation/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ RUN sed -i 's/^#force_color_prompt=yes/force_color_prompt=yes/' /etc/skel/.bashr
RUN echo "auth requisite pam_deny.so" >> /etc/pam.d/su && \
sed -i.bak -e 's/^%admin/#%admin/' /etc/sudoers && \
sed -i.bak -e 's/^%sudo/#%sudo/' /etc/sudoers && \
useradd -l -m -s /bin/bash -N -u "${NB_UID}" "${NB_USER}" && \
useradd --no-log-init --create-home --shell /bin/bash --uid "${NB_UID}" --no-user-group "${NB_USER}" && \
mkdir -p "${CONDA_DIR}" && \
chown "${NB_USER}:${NB_GID}" "${CONDA_DIR}" && \
chmod g+w /etc/passwd && \
Expand Down
2 changes: 1 addition & 1 deletion images/docker-stacks-foundation/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ if [ "$(id -u)" == 0 ] ; then
fi
# Recreate the desired user as we want it
userdel "${NB_USER}"
useradd --home "/home/${NB_USER}" --uid "${NB_UID}" --gid "${NB_GID}" --groups 100 --no-log-init "${NB_USER}"
useradd --no-log-init --home "/home/${NB_USER}" --uid "${NB_UID}" --gid "${NB_GID}" --groups 100 "${NB_USER}"
fi

# Move or symlink the jovyan home directory to the desired users home
Expand Down

0 comments on commit 5f8524d

Please sign in to comment.