How to Get Linux Server Sends Email Alert on Root Login Come arrivare Linux server invia via e-mail a 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. Per migliorare la sicurezza dei server, soprattutto server web che espone a Internet e possibile in tutto il mondo hacker, è meglio per consentire al server di inviare automaticamente un messaggio di notifica predefinito per ogni indirizzo di posta elettronica qualcuno log in come root per l'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. Per configurare le email di avviso automatico di notifica a un indirizzo email predefinito su ogni incidente di accesso di root sul server, utilizzare la seguente guida.

  1. Login to the server via SSH using as root ID. Login al server tramite SSH usando come root ID.
  2. Ensure that you’re at home directory of root. Garantire che stai a casa directory di root. The open up the .bash_profile for editing using pico or vi by typing one of the following commands at command shell line: Il aprire il. Bash_profile per l'editing utilizzando pico o vi digitando uno dei seguenti comandi di shell a linea di comando:

    pico .bash_profile Pico. bash_profile
    vi .bash_profile VI. bash_profile

  3. Scroll down to the end of the file and add the following line: Scorri la pagina fino alla fine del file e aggiungere la seguente riga:


    echo 'ALERT - Root Shell Access on:' `date` `who` | mail -s "Alert: Root Access from `who | cut -d"(" -f2 | cut -d")" -f1`" user@example.com echo 'ALERT - Accesso shell di root su:' `date` `che` | mail-s "Avviso: i privilegi di root che da` | cut-d "("-f2 | cut-d ")"-f1 `" user @ example.com

    Replace user@email.com with the actual email account address that you want to the root access alert notification been sent to. User@email.com a sostituire l'attuale account di posta elettronica indirizzo che si desidera l'accesso root segnalazione è stata inviata la notifica. Note that you can change the text contains in the email alert too. Si noti che è possibile modificare il testo contiene nella email di avviso troppo. 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. Il testo inizia con prima segnalazione è scritto come e-mail corpo, e si può aggiungere altre informazioni come nome host o modificare le formulazioni. The second Alert is the email title which you can change to your own too. Il secondo avviso è il titolo e-mail che si può cambiare a tuo troppo.

Now logout and login again as root, you should receive an email alert at your inbox. Ora il logout e di nuovo il login come root, si dovrebbe ricevere una notifica via e-mail a vostra casella di posta. The security trick should works on most popular flavor of Linux such as RedHat, CentOS, Ubuntu, FreeBSD and etc. La sicurezza dovrebbe trucco funziona sulla maggior parte dei popolari distribuzione di Linux come RedHat, CentOS, Ubuntu, FreeBSD e ecc

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Questa è una pagina tradotta macchina che è fornito "così com'è" senza alcuna garanzia. Machine translation may be difficult to understand. Traduzione automatica può essere difficile da capire. Please refer to Si prega di fare riferimento a original English article articolo originale inglese whenever possible. quando possibile.

Share and contribute or get technical support and help at Condividere e contribuire o ottenere supporto tecnico e assistenza in My Digital Life Forums La mia vita digitale Forum .



2 Responses to “How to Get Linux Server Sends Email Alert on Root Login” 2 risposte a "Come ottenere Linux server invia e-mail di avviso sulla il login root"

  1. Linux - wysyłanie maila o logowaniu na konto roota « Barni.LOG Linux - wysyłanie maila o logowaniu na konto roota «Barni.LOG
    August 12th, 2007 03:10 12 agosto 2007 03:10
    1

    [...] 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 [...]

  2. Jon
    May 3rd, 2008 05:43 3 maggio 2008 05:43
    2

    ‘who -m’ makes the output much cleaner when using this on a system that has multiple users logged on… '-Che m' rende l'uscita molto più pulito quando si utilizza questo su un sistema che ha più utenti connessi…

    -m reports only hostname and user associated with stdin terminal - m solo rapporti hostname e degli utenti connessi con stdin terminale

Leave a Reply Lasciare una risposta

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> È possibile utilizzare questi tag: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q Cite=""> <strike> <strong>

Subscribe without commenting Iscriviti senza commentare


Custom Search

New Articles Nuovi articoli

Incoming Search Terms for the Article Cerca in arrivo Condizioni per l'articolo

linux email alerts Linux avvisi via email - -- linux turn off mail notification Linux spegnere mail di notifica - -- linux change root email address Linux root cambiare indirizzo e-mail - -- change root email cambiamento di root e-mail - -- linux change root email Linux cambiamento di root e-mail - -- linux mail root Linux root mail - -- linux root email address Linux root indirizzo di posta elettronica - -- linux root mail Linux root mail - -- mail alerts in linux mail alerts in Linux - -- email when root logs on e-mail quando root accede - -- linux root login alert Linux root login segnalazione - -- turn off mail notification linux disattivare notifica dei messaggi di Linux - -- change root email address cambiare indirizzo di posta elettronica di root - -- linux mail from address Linux indirizzo di posta da - -- email alerts linux avvisi via email Linux - -- linux server email security notifications Linux server di sicurezza della posta elettronica notifiche - -- linux mail change from address Linux mail da cambiare indirizzo - -- email alert when linux server is login e-mail di avviso quando server linux è il login - -- Change root mail Cambiamento di root mail - -- root mail linux Linux root mail - -- linux email alert Linux via e-mail - -- linux root login mail Linux root login mail - -- linux send email login Linux inviare email di accesso - -- send email on login linux inviare e-mail di accesso a Linux - -- email for root e-mail per l'utente root - -- linux send email on ssh login linux inviare e-mail su ssh login - -- linux login alert Linux login segnalazione - -- linux notify on login Linux a notificare il login - -- linux login notification Linux notifica di login - -- linux email root logs Linux root log di posta elettronica - -- set root mail impostare root mail - -- linux mail an root Linux mail uno di root - -- linux system send alerts rss -news sistema linux inviare segnalazioni rss-news - -- server email notifications server e-mail di avviso - -- linux server status mail Linux server di posta di stato - -- linux root email as different user Linux root di posta elettronica come utente diverso - -- ssh alert linux SSH segnalazione Linux - -- where do we find mail for root + linux dove troviamo mail per root + linux - -- mail logins linux mail login Linux - -- mail root linux mail root Linux - -- linux change root mail Linux cambiamento di root mail - -- redhat linux directory file access email alert notification RedHat Linux directory di accesso ai file del email di notifica - -- linux mail to root Linux mail a root - -- all tutto - -- linux root alert Linux root segnalazione - -- linux some one is sending mail from my server who linux alcuni è uno dei messaggi dal mio server che - -- server to email logs linux e-mail server per i log di Linux - -- mail alert linux mail Linux - -- linux email root Linux root e-mail - -- ubuntu mail command line server change root email address ubuntu mail riga di comando di root server di cambiare indirizzo e-mail - --