Unix/Linux

root 사용자 접속제한

She쥐포s 2008. 5. 9. 12:55

○ ssh root 접속제한

# vi /etc/ssh/sshd_config

       # PermitRootLogin yes
       라고 되어있는 부분의 주석을 해제하고 yes를 no로 고친다
       PermitRootLogin no

# /etc/rc.d/init.d/sshd restart

○ su 명령어 제한

# vi /etc/pam.d/su 에 6번라인

        # auth required /lib/security/$ISA/pam_wheel.so use_uid
        주석 제거
        auth required /lib/security/$ISA/pam_wheel.so use_uid

# usermod -G wheel [user]
        -> wheel 그룹에 속한 사용자는 su 사용불가

○ sudo 명령어 사용

# visudo

        맨 마지막 행에
        [user] (TAB) ALL=(ALL) (TAB) ALL
        추가

참고 : http://blog.naver.com/ssalleng21?Redirect=Log&logNo=130030195364

반응형