Skip to content

Commit

Permalink
Merge pull request moby#8157 from SvenDowideit/sshd-pam-fix
Browse files Browse the repository at this point in the history
Fix for user kicked off after login on some hosts
  • Loading branch information
Fred Lifton committed Sep 24, 2014
2 parents a1609a7 + 7faa43d commit f68f5fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/sources/examples/running_ssh_service.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ RUN mkdir /var/run/sshd
RUN echo 'root:screencast' | chpasswd
RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config

# SSH login fix. Otherwise user is kicked off after login
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd

ENV NOTVISIBLE "in users profile"
RUN echo "export VISIBLE=now" >> /etc/profile

Expand Down
3 changes: 3 additions & 0 deletions docs/sources/examples/running_ssh_service.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ quick access to a test container.
RUN echo 'root:screencast' | chpasswd
RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config

# SSH login fix. Otherwise user is kicked off after login
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd

ENV NOTVISIBLE "in users profile"
RUN echo "export VISIBLE=now" >> /etc/profile

Expand Down

0 comments on commit f68f5fd

Please sign in to comment.