Limit.conf 수정이 작동하지 않습니다

Limit.conf 수정이 작동하지 않습니다

SLES 9 시스템에 다음 줄을 추가했습니다.

vi /etc/security/limits.conf
USERNAME        hard    cpu           70

하지만 "ulimit -a"로 확인하면 다음과 같습니다.

SERVER:~ # su USERNAME
USERNAME@SERVER:/root> ulimit -a | grep -i cpu
cpu time             (seconds, -t) unlimited
USERNAME@SERVER:/root> 
USERNAME@SERVER:/root> ulimit -Ha | grep -i cpu
cpu time             (seconds, -t) unlimited
USERNAME@SERVER:/root> 

여전히 "무한"이라고 표시됩니다.

질문: 내가 놓친 게 무엇입니까?

답변1

당신은 있나요 /etc/pam.d/su? Debian Squeeze와 같은 일부 시스템에서는 (적어도) 이 기능이 비활성화되어 있습니다 su.

예를 들어, 내부에서는 /etc/pam.d/su다음과 같은 내용을 볼 수 있습니다.

# Sets up user limits, please uncomment and read /etc/security/limits.conf
# to enable this functionality.
# (Replaces the use of /etc/limits in old login)
# session    required   pam_limits.so

주석 처리되었거나 누락된 경우 session required pam_limits.so주석 처리를 제거하거나 추가하여 문제가 해결되는지 확인하세요.

관련 정보