Login denied after setting nofile limits. Secure log shows the error "error: PAM: pam_open_session(): Permission denied"
Issue
-
Setting a hard limit in ulimit on
nofileto anything higher than 1048576 (includingunlimited) fails, and prevents logins from working. -
After setting the following in
/etc/security/limits.conf* soft nofile 5000000 * hard nofile 5000000
no one can login, and /var/log/secure file shows
sshd[3889]: error: PAM: pam_open_session(): Permission denied
Environment
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
