Getting "Unable to get valid context for user" warning when user logging in through ssh.
Issue
- Getting
Unable to get valid context for user
warning when user logging in through ssh.
For eg:
user@test's password:
Unable to get valid context for user
Last login: Fri Oct 2 14:10:35 2015 from x.x.x.x
- Below logs can be seen in
secure
logs during the same time.
Sep 24 11:52:38 test sshd[21149]: Accepted publickey for user from x.x.x.x port 48290 ssh2
Sep 24 11:52:38 test sshd[21149]: pam_selinux(sshd:session): Security context unconfined_u:system_r:oddjob_mkhomedir_t:s0-s0:c0.c1023 is not allowed for unconfined_u:system_r:oddjob_mkhomedir_t:s0-s0:c0.c1023
Sep 24 11:52:38 test sshd[21149]: pam_selinux(sshd:session): Unable to get valid context for user
Environment
- Red Hat Enterprise Linux 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.