/etc/passwd 파일 수정
vi /etc/passwd
root:x:0:0:Server Manager:/root:/bin/bash
시스템이 메일을 보낼 시 Server Manager 부분이 “보낸 사람 이름” 으로 나타남.
/etc/passwd 파일 수정
vi /etc/passwd
root:x:0:0:Server Manager:/root:/bin/bash
시스템이 메일을 보낼 시 Server Manager 부분이 “보낸 사람 이름” 으로 나타남.
/etc/crontab 파일 수정
vi /etc/crontab
MAILTO=server@pchero21.com
위 부분과 같이 수정하면 cron 에 관계된 모든 정보들이 server@pchero21.com 으로 메일을 발송함.
logwatch 설정
vi /etc/log.d/scripts/logwatch.pl
$config{‘mailto’} = “root”
vi /etc/aliases
root: server@pchero21.com
위와 같이 /etc/aliases 를 설정하면 로그파일 내용이 server@pchero21.com 으로 메일을 발송함
Debian 의 경우 logwatch.pl 파일의 위치가 /usr/share/logwatch/scripts/logwatch.pl 임.
실행명령 권한 설정 변경
chmod 100 /usr/bin/chage chmod 100 /usr/libexec/openssh/ssh-keysign
chmod 100 /usr/bin/rcp chmod 100 /usr/bin/write
chmod 100 /usr/bin/gpasswd chmod 100 /usr/sbin/sendmail
chmod 100 /usr/bin/rlogin chmod 100 /usr/bin/at
chmod 100 /usr/bin/wall chmod 100 /usr/sbin/traceroute
chmod 100 /usr/bin/rsh chmod 100 /bin/mount
chmod 100 /usr/bin/chsh chmod 100 /bin/ping
chmod 100 /usr/bin/sudo chmod 100 /usr/bin/crontab
chmod 100 /usr/bin/newgrp chmod 100 /usr/bin/passwd
find / -perm -4000
명령어를 이용하여 root 권한 실행 파일 중 일반사용자가 필요없는 실행 명령은 모두 변경
rpm -import /usr/share/rhn/RPM-GPG-KEY
yum -y update
Fedora 또는 CentOS 만 실행됨.
원격 및 콘솔 접속 수 수정
/etc/securetty 를 수정하여 서버접근 Virtual host 및 tty 를 최소화.
vi /etc/securetty
console
vc/1
vc/2
vc/3
vc/4
vc/5
tty1
tty2
tty3
tty4
tty5
위 내용처럼 수정.