From 7faa43d707e1c0a67262d149cd42dab4bf3f8812 Mon Sep 17 00:00:00 2001 From: SvenDowideit Date: Mon, 22 Sep 2014 13:32:34 +1000 Subject: [PATCH] Fix for user kicked off after login on some hosts Docker-DCO-1.1-Signed-off-by: SvenDowideit (github: SvenDowideit) --- docs/sources/examples/running_ssh_service.Dockerfile | 3 +++ docs/sources/examples/running_ssh_service.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/docs/sources/examples/running_ssh_service.Dockerfile b/docs/sources/examples/running_ssh_service.Dockerfile index 20efa660e9..7aba7f6869 100644 --- a/docs/sources/examples/running_ssh_service.Dockerfile +++ b/docs/sources/examples/running_ssh_service.Dockerfile @@ -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 diff --git a/docs/sources/examples/running_ssh_service.md b/docs/sources/examples/running_ssh_service.md index 0eec6bdc67..9f87fb726d 100644 --- a/docs/sources/examples/running_ssh_service.md +++ b/docs/sources/examples/running_ssh_service.md @@ -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