一贾陷、操作:
修改/etc/security/limits.conf
- hard nofile 1200000
二冻河、現(xiàn)象:
- ssh登錄后退出
- 控制臺(tái)登錄后界面空白
三瓣喊、定位:
使用光盤(pán)引導(dǎo)蚪拦,進(jìn)入Rescue System查看message
ssh登錄相關(guān)日志
Apr 10 11:01:36 Linux sshd[14007]: Accepted keyboard-interactive/pam for usr_ins from 192.168.222.125 port 37472 ssh2
Apr 10 11:01:36 Linux sshd[14007]: pam_limits(sshd:session): Could not set limit for 'nofile': Operation not permitted
Apr 10 11:01:36 Linux sshd[14007]: error: PAM: pam_open_session(): Permission denied
控制臺(tái)登錄相關(guān)日志
Apr 10 11:01:50 Linux login[13736]: pam_limits(login:session): Could not set limit for 'nofile': Operation not permitted
Apr 10 11:01:50 Linux login[13736]: Permission denied
四弃榨、解決:
sysctl 設(shè)置 fs.nr_open 大于等于 /etc/security/limits.conf 的 hard nofile