su ulimit configuration issue on SLES servers

At our company we use SLES as the favored Linux distribution. 

Sudo and su are used to make things on the servers work
a little bit more secure.

We had problems on some dated versions of SuSe with running
the su command in combination with ulimit settings.

Limits were set in the file /etc/security/limits.conf for a particular
user but after a su switch to that user the limits set weren’t
honored.

Problem was that the pam_limit module wasn’t loaded in the /etc/pam.d/su
configuration file. Just added the rule

session required        pam_limits.so

to the file after that limits were handled correctly when using the su command.

In later versions of SLES the whole PAM configuration is set-up
a little bit different. There are common config files which are
included by the different sub parts.

/etc/pam.d/su
session include common-session

/etc/pam.d/common-session
session required pam_limits.so

This entry was posted in linux and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

Please leave these two fields as-is:

Protected by Invisible Defender. Showed 403 to 807,320 bad guys.