Fix for user kicked off after login on some hosts

Docker-DCO-1.1-Signed-off-by: SvenDowideit <SvenDowideit@home.org.au> (github: SvenDowideit)
Merge pull request #8157 from SvenDowideit/sshd-pam-fix

Fix for user kicked off after login on some hosts