# limits.conf and PAM

## fargred

In my /etc/security/limits.conf I have

```
# grep ^[^#] /etc/security/limits.conf 

* hard nofile 8192

sszb              soft    nofile          8192

sszb              hard    nofile          16384

fargred              soft    nofile          8192

fargred              hard    nofile          16384

```

I have shadow built with PAM support

```
# equery u shadow

[ Legend : U - final flag setting for installation]

[        : I - package is installed with flag     ]

[ Colors : set, unset                             ]

 * Found these USE flags for sys-apps/shadow-4.1.4.3:

 U I

 - - audit    : Enable support for sys-process/audit

 + + cracklib : Support for cracklib strong password checking

 + + nls      : Adds Native Language Support (using gettext - GNU locale utilities)

 + + pam      : Adds support for PAM (Pluggable Authentication Modules) - DANGEROUS to

                arbitrarily flip

 - - skey     : Enable S/Key (Single use password) authentication support
```

And the line about pam_limits.so has its place in every configuration file that may be at least related to logging in.

```
# grep -rHi pam_limits.so /etc/pam.d/*

/etc/pam.d/atd:session required        pam_limits.so

/etc/pam.d/login:session required pam_limits.so debug

/etc/pam.d/system-auth:session      required   pam_limits.so 

/etc/pam.d/system-auth-winbind:session     required      pam_limits.so

/etc/pam.d/system-login:session required pam_limits.so debug

/etc/pam.d/system-services:session      required   pam_limits.so
```

But every time I log in

```
$ ulimit -n

1024
```

I’ve read this topic  but in /var/log/messages pam_unix is the only pam-related strings that are present, and I’m in doubt if it’s actually working?

----------

## PaulBredbury

I'd suggest PAM debugging.

----------

