How to Get Linux Server Sends Email Alert on Root Login 전자 우편 경고를 보내는 방법에 리눅스 서버 루트 로그인
To improve the security of the server, especially web server which exposes to the Internet and possible worldwide hackers, it’s best to enable server to automatically send a notification email to predefined email address everytime someone logs in as root to the host. 서버의 보안을 향상시키기 위해, 특히 웹 서버를 인터넷에 노출과 가능한 전세계 해커, 그것을 설정하는 최고의 서버를 자동으로 알려주는 알림 메일을 보낼 때마다 이메일 주소를 미리 정의된 루트로 로그인할 누군가를 호스트합니다. To configure the automatic email alert notification to a default email address on each incident of root log on on the server, use the following guide. 를 구성하는 자동 이메일 알림 통지 각각의 사건을 기본 이메일 주소가 서버에있는 루트에 로그온하려면 다음과 같이 안내합니다.
- Login to the server via SSH using as root ID. 쉿를 사용하여 서버에 로그인하여 루트로 번호를 통해합니다.
- Ensure that you’re at home directory of root. 루트 디렉토리에 당신이 집에 있는지 확인합니다. The open up the .bash_profile for editing using pico or vi by typing one of the following commands at command shell line: 오픈을합니다. bash_profile을 편집하거나 바이 피코를 사용하여 다음과 같은 명령 중 하나를 입력하여 명령 셸 라인 :
pico .bash_profile 피코합니다. bash_profile
vi .bash_profile 6. bash_profile - Scroll down to the end of the file and add the following line: 아래로 스크롤하여 파일 끝에 다음과 같은 라인을 추가합니다 :
echo 'ALERT - Root Shell Access on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" user@example.com에코 '알리미 - 대한 액세스 권한을 루트 셸을 :'`일``사람`| 메일 -의 "경고 : 루트 액세스에서`누구 | 컷 - 패"( "- f2 | 컷 - 패") "- f1`"사용자 @ example.comReplace user@email.com with the actual email account address that you want to the root access alert notification been sent to. user@email.com가 실제 이메일 계정으로 주소를 교체하려는 접근 알림 통지의 루트로 전송되었습니다. Note that you can change the text contains in the email alert too. 참고 사항을 이메일로 발송되는 문자를 변경할 수있습니다 경고도합니다. The text starting with first ALERT is written as email body, and you can add in other info such as host name or change the wordings. 텍스트로 시작하는 첫 번째 경고가 서면으로 이메일 본문, 그리고 다른 정보와 같은 추가하실 수있습니다 호스트 이름 또는 문구로 변경합니다. The second Alert is the email title which you can change to your own too. 이메일 제목을 두 번째 경고가를 사용하여 자신의도 변경하실 수있습니다.
Now logout and login again as root, you should receive an email alert at your inbox. 이제 로그아웃하고 다시 로그인 루트로,받은 편지함에서 이메일 알림을 수신해야합니다. The security trick should works on most popular flavor of Linux such as RedHat, CentOS, Ubuntu, FreeBSD and etc. 이 보안 트릭은 대부분의 인기있는 맛을 리눅스와 같은 작품 레드햇, centos, 우분투, freebsd 등
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 중요 사항 : 이것은 기계 번역 페이지는 "있는 그대로"제공하지 않고 보증합니다. Machine translation may be difficult to understand. 기계 번역을 이해하기 어려울 수있습니다. Please refer to 를 참조하시기 바랍니다 original English article 기존 영어 자료 whenever possible. 언제 수있습니다.
Share and contribute or get technical support and help at 를 공유하고 기술 지원 및 도움을 공헌하지 않는다면 My Digital Life Forums 내 디지털 라이프 공개 토론 . 합니다.
Related Articles 관련 기사
- Disable Direct Root Login and User Access via SSH to Server 쉿를 통해 사용자 액세스 권한을 해제 직접적으로 루트 서버에 로그인하고
- Disable and Turn Off Telnet in Linux 리눅스에서 텔넷을 사용 중지 및 해제
- Change and Reset MySQL root Password mysql 루트 암호를 변경 및 재설정
- Change User Name on Linux 리눅스에서 사용자 이름을 변경
- Cannot FTP to Web Host or Server running cPanel/WHM 또는 서버를 실행 수없는 웹 호스팅 서버에 cpanel / whm
- cPanel Invalid License File After Changing Hostname Error 호스트 이름이 잘못되었습니다 라이센스 파일을 변경한 후 오류가 cpanel
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3 freebsd 6.0과 아파치 웹 서버에 설치하는 2.2, mysql 5.0과 php 5 - 제 3
- Check and Optimize MySQL Database Automatically with Crontab/Cron mysql 데이터베이스를 확인하고 자동으로 최적화하는 crontab / cron
- Restore Full Backup or cpmove File in cPanel Web Host cpmove 파일을 전체 백업을 복원하거나 웹 호스트 cpanel
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 4 windows XP 용 웹 서버에 설치와 apache2, php5, mysql4 - 4 부

































August 12th, 2007 03:10 2007년 8월 12일 03:10
[...] Linux - wysyłanie maila o logowaniu na konto roota Bardzo użyteczny skrypcik [...] [...] 리눅스 - roota 곤도 wysyłanie maila 오 logowaniu na bardzo użyteczny [...] skrypcik
May 3rd, 2008 05:43 2008년 5월 3일 05:43
‘who -m’ makes the output much cleaner when using this on a system that has multiple users logged on… '사람 - 나의이의 출력이 많은 청소기를 사용할 때 시스템에 로그온되어 여러 명의 사용자가…
-m reports only hostname and user associated with stdin terminal - m 리포트를 사용자와 연관된 호스트 이름과 표준 입력 전용 터미널