Overwriting /etc/security/limits.conf prevents login into any session

Solution Verified - Updated -

Issue

  • Overwriting /etc/security/limits.conf prevents login into any session (ssh, gnome, console, etc.)
  • /var/log/secure shows the following errors:
Jan 31 19:01:51 hostname sshd[2169]: pam_limits(sshd:session): cannot read settings from /etc/security/limits.conf: Permission denied  
Jan 31 19:01:51 hostname sshd[2169]: pam_limits(sshd:session): error parsing the configuration file: '/etc/security/limits.conf'  
Jan 31 19:01:51 hostname sshd[2169]: pam_unix(sshd:session): session opened for user root by (uid=0)  
Jan 31 19:01:51 hostname sshd[2169]: error: PAM: pam\_open\_session(): Error in service module

Environment

  • Red Hat Enterprise Linux 6
  • pam

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