Thursday, December 22, 2011

Understanding PAM limits, pam.d,, and /etc/pam.d/login

In the 10g world, Oracle often recommended adding the following line to /etc/pam.d/login in Linux installations:
session required /lib/security/

In the 11g world, Oracle is not as explicit in recommending this setting.

What is this setting? Why is it needed?

Here are some points that might help clarify the purpose of this setting:
  • PAM stands for Pluggable Authentication Module.
  • PAM provides a way to develop programs that are independent of authentication scheme.
  • Adding this setting puts resource limits on login sessions.
  • The setting above can be added to /etc/pam.d/login, /etc/pam.d/sshd, or /etc/pam.d/su, depending on whether you want to set limits on 'login', 'ssh', or 'su' types of logins.
  • The PAM module ( is not loaded by default for various applications such as 'login', 'ssh', or 'su', so adding it will explicitly load it enabling you to limit the login sessions.

It is recommended to add this setting, as well as process and file limits in /etc/securit/limits.conf. This will prevent exhaustion of OS resources under extremely heavy or unforeseen load, otherwise the server may become unresponsive and/or inaccessible. It is preferable to let the application fail and throw an error instead of the entire server crashing.

Check out this link for recommended settings.


Ahmed Aboulnaga

No comments: