Receiving error "unable to get valid context for root" upon login even with SELINUX=disabled

Solution Verified - Updated -

Issue

  • Users unable to login to the system
  • Root user unable to login to the system
  • Issue cannot be fixed by disabling SELinux in configuration
  • Messages similar to the following appear in logs:

    Oct  4 08:17:34 <hostname> sshd[<PID>]: pam_selinux(sshd:session): Unable to get valid context for root
    Oct  4 08:17:34 <hostname> sshd[<PID>]: error: ssh_selinux_setup_pty: security_compute_relabel: Invalid argument
    Oct  4 08:27:24 <hostname> login: pam_selinux(login:session): Unable to get valid context for root
    

Environment

  • Red Hat Enterprise Linux 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content