I am trying to get /etc/security/limits.conf to work correctly for remote logins as well as local su.

Here is what I mean...

This does not work
------
[EMAIL PROTECTED] ~# ssh [EMAIL PROTECTED]
[EMAIL PROTECTED]'s password:
UCSD Physics Server
Unauthorized Access is Prohibited


[EMAIL PROTECTED] ~$ ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 7168 virtual memory (kbytes, -v) unlimited [EMAIL PROTECTED] ~$ ulimit -n 4096 -bash: ulimit: open files: cannot modify limit: Operation not permitted [EMAIL PROTECTED] ~$ -------

This does work
-------
[EMAIL PROTECTED] ~# su - tmartin
[EMAIL PROTECTED] ~$ ulimit -a
core file size        (blocks, -c) 0
data seg size         (kbytes, -d) unlimited
file size             (blocks, -f) unlimited
max locked memory     (kbytes, -l) unlimited
max memory size       (kbytes, -m) unlimited
open files                    (-n) 4096
pipe size          (512 bytes, -p) 8
stack size            (kbytes, -s) 8192
cpu time             (seconds, -t) unlimited
max user processes            (-u) 7168
virtual memory        (kbytes, -v) unlimited
[EMAIL PROTECTED] ~$ ulimit -n 4096
[EMAIL PROTECTED] ~$ ulimit -a
core file size        (blocks, -c) 0
data seg size         (kbytes, -d) unlimited
file size             (blocks, -f) unlimited
max locked memory     (kbytes, -l) unlimited
max memory size       (kbytes, -m) unlimited
open files                    (-n) 4096
pipe size          (512 bytes, -p) 8
stack size            (kbytes, -s) 8192
cpu time             (seconds, -t) unlimited
max user processes            (-u) 7168
virtual memory        (kbytes, -v) unlimited
-------

Here is my /etc/security/limits.conf

...stuff removed for brevity...
#ftp             hard    nproc           0
[EMAIL PROTECTED]        -       maxlogins       4
*               hard    nofile            4096
*               soft    nofile            4096
...stuff removed for brevity...

Here is my /etc/pam.d/sshd file
#%PAM-1.0
auth       required     pam_stack.so service=system-auth
auth       required     pam_nologin.so
account    required     pam_stack.so service=system-auth
password   required     pam_stack.so service=system-auth
session    required     pam_stack.so service=system-auth
session    required     pam_limits.so
session    optional     pam_console.so

I have tried this on both a redhat 8 and 9 box. Why does one work and the other not??? I want users to be able to specify the number of max open files they can have from remote (within reason). I also want them to log in via ssh.

Is there something else I need to set? Is it the remote login or is it sshd?

Thanks for any insight

Terrence Martin
UCSD Physics




-- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://www.redhat.com/mailman/listinfo/redhat-list

Reply via email to