Skip to content

Commit

Permalink
Trying passworded user with PAM
Browse files Browse the repository at this point in the history
  • Loading branch information
wtripp180901 committed Aug 15, 2023
1 parent be0ec37 commit 131a45c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ RUN set -ex \
openssh-server \
apptainer \
ondemand \
mod_authnz_pam
&& yum clean all \
&& rm -rf /var/cache/yum

Expand Down Expand Up @@ -93,7 +94,7 @@ RUN mkdir /etc/sysconfig/slurm \
&& useradd -r --uid=990 slurm \
&& chown -R slurm:slurm /var/*/slurm* \
&& useradd -u 1000 rocky \
&& usermod -p '*' rocky # unlocks account but sets no password
&& usermod -p 'openssl password' rocky

VOLUME /etc/slurm
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
Expand Down
4 changes: 4 additions & 0 deletions image/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ then

/usr/libexec/httpd-ssl-gencerts

cp /etc/pam.d/sshd /etc/pam.d/ood
chmod 640 /etc/shadow
chgrp apache /etc/shadow

mkdir --parents /opt/rh/httpd24/root/etc/httpd/
/usr/bin/htpasswd -cb /opt/rh/httpd24/root/etc/httpd/apache-passwords rocky $ROCKY_OOD_PASS

Expand Down

0 comments on commit 131a45c

Please sign in to comment.