How to Get Linux Server Sends Email Alert on Root Login How to get Linux-Server sendet E-Mail-Benachrichtigung über die 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. Zur Verbesserung der Sicherheit des Servers, insbesondere Web-Server, setzt auf das Internet weltweit und mögliche Hacker, it's best-Server zu aktivieren, um automatisch eine Benachrichtigung per E-Mail an vordefinierte E-Mail-Adresse jederzeit jemand meldet sich als root auf dem 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. So konfigurieren Sie die automatische E-Mail-Benachrichtigung Benachrichtigung an eine Standard-E-Mail-Adresse auf jeder Vorfall von Root anmelden, auf dem Server, verwenden Sie die folgende Anleitung.
- Login to the server via SSH using as root ID. Login zum Server via SSH als root mit ID.
- Ensure that you’re at home directory of root. Stellen Sie sicher, dass Sie im Home-Verzeichnis des root. The open up the .bash_profile for editing using pico or vi by typing one of the following commands at command shell line: Die Öffnung der. Bash_profile für die Bearbeitung mit pico oder vi, indem Sie eine der folgenden Befehle am Shell-Befehl Zeile:
pico .bash_profile Pico. bash_profile
vi .bash_profile VI. bash_profile - Scroll down to the end of the file and add the following line: Scrollen Sie zum Ende der Datei und fügen Sie die folgende Zeile:
echo 'ALERT - Root Shell Access on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" user@example.comecho 'Alert - Root-Shell-Access auf: "` date ``, `| mail-s" Alert: Root-Zugriff ab, "| cut-d" ( "-f2 | cut-d") "-f1` "user @ example.comReplace user@email.com with the actual email account address that you want to the root access alert notification been sent to. Ersetzen Sie user@email.com mit der eigentlichen E-Mail-Konto-Adresse, die Sie wollen die Root-Zugang Ausschreibung Anmeldung zugesandt worden. Note that you can change the text contains in the email alert too. Beachten Sie, dass Sie können den Text in der E-Mail-Benachrichtigung. 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. Der Text beginnt mit dem ersten Alarm wird als E-Mail-Text, und Sie können in anderen Informationen, wie zB die Host-Namen oder ändern Sie die Formulierungen. The second Alert is the email title which you can change to your own too. Die zweite Ausschreibung ist der Titel der E-Mail können Sie zu Ihrem eigenen.
Now logout and login again as root, you should receive an email alert at your inbox. Jetzt ausloggen und wieder einloggen als root, sollten Sie erhalten eine E-Mail-Benachrichtigung in Ihrem Posteingang angezeigt. The security trick should works on most popular flavor of Linux such as RedHat, CentOS, Ubuntu, FreeBSD and etc. Die Sicherheit sollte Trick funktioniert auf den meisten populären Variante des Linux-wie RedHat, CentOS, Ubuntu, FreeBSD und usw.
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. WICHTIG: Es handelt sich um eine Maschine der Seite übersetzt wird "as is" ohne Garantie. Machine translation may be difficult to understand. Maschinelle Übersetzung ist vielleicht schwierig zu verstehen. Please refer to Bitte wenden Sie sich an original English article Original Englisch Artikel whenever possible. wann immer dies möglich ist.
Share and contribute or get technical support and help at Aktie und einen Beitrag oder erhalten technische Unterstützung und Hilfe an My Digital Life Forums Meine digitalen Lebens Foren . Werden.
Related Articles Verwandte Artikel
- Disable Direct Root Login and User Access via SSH to Server Deaktivieren Sie direkte Root-Login und Benutzer-Zugang via SSH-Server an
- Disable and Turn Off Telnet in Linux Deaktivieren und schalten Sie Telnet auf Linux
- Change and Reset MySQL root Password Ändern und Reset MySQL Root-Passwort
- Change User Name on Linux Change user name on Linux
- Cannot FTP to Web Host or Server running cPanel/WHM Kann nicht auf FTP-Host-oder Web-Server mit cPanel / WHM
- cPanel Invalid License File After Changing Hostname Error cPanel Ungültige Lizenz-Datei nach dem Ändern hostname Fehler
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 - Part 3 Installation von Web-Server in FreeBSD 6,0 mit Apache 2,2, 5,0 MySQL und PHP 5 - Teil 3
- Check and Optimize MySQL Database Automatically with Crontab/Cron Prüfen und Optimieren von MySQL-Datenbank automatisch mit crontab / cron
- Restore Full Backup or cpmove File in cPanel Web Host Restore Full Backup oder cpmove Datei in cPanel Web Host
- Install Web Server in Windows XP with Apache2, PHP5 and MySQL4 - Part 4 Installation von Web-Server in Windows XP mit Apache2, PHP5 und MySQL4 - Teil 4



















August 12th, 2007 03:10 12. Aug 2007 03:10
[...] Linux - wysyłanie maila o logowaniu na konto roota Bardzo użyteczny skrypcik [...] [...] Linux - wysyłanie Maila o logowaniu na konto roota Bardzo użyteczny skrypcik [...]
May 3rd, 2008 05:43 3. Mai, 2008 05:43
‘who -m’ makes the output much cleaner when using this on a system that has multiple users logged on… ',-M' macht die Ausgabe wesentlich sauberer, wenn Sie diese auf einem System mit mehreren Nutzern angemeldet…
-m reports only hostname and user associated with stdin terminal - m Berichte nur Hostnamen und Anwender im Zusammenhang mit stdin Terminal