Wednesday, October 5th, 2011 at
5:30 pm
Pluggable Authentication Modules (PAM) is a framework used for authentication. Typically, most Linux distros come with PAM installed by default. PAM can be powerful if used well and it’s important to understand how PAM works. PAM has its criticisms, but is quite adequate for most purposes.
Refer this LINUX FORMAT article for a good introduction to PAM.
For easy reference, I’ve stitched together an image of important PAM concepts (shown below) taken from the LINUX FORMAT article.
First published in
VN:F [1.6.5_908]
Wednesday, October 5th, 2011 at
5:05 pm
Problem:
When changes are made to /etc/security/limits.conf to apply limits for resources (e.g. file descriptors, processes), the changes are not visible in my Shell (SSH Session). However, when using programs such as su, the changes are visible.
Background:
/etc/security/limits.conf is the configuration file for the pam_limits PAM module. By default, the pam_limits module is used in ssh policies in /etc/pam.d. However, the SSH server must be configured to use PAM.
Solution:
- Make your SSH server PAM-aware by setting one or both of the following in the SSH configuration file:
UsePamSessions=yes
or
UsePAM=yes
Restart the SSH server
Root Cause:
The SSH server was not configured to use PAM.
NOTE:
(1) The solution above describes a successful problem-solving experience and may not be applicable to other problems with similar symptoms.
(2) Your rating of this post will be much appreciated. Also, feel free to leave comments.
VN:F [1.6.5_908]