How to Get Linux Server Sends Email Alert on Root Login Como obter o Linux servidor envia e-mail alerta sobre raiz 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. Para melhorar a segurança do servidor, especialmente servidor web que exponham à Internet e possíveis hackers no mundo inteiro, é melhor para permitir ao servidor automaticamente enviar uma notificação por e-mail ao endereço de e-mail sempre que alguém predefinidos logs em como a raiz de acolhimento. 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. Para configurar o alerta automático e-mail a notificação de um endereço de e-mail padrão em cada incidente de log a raiz do servidor, utilize o seguinte guia.

  1. Login to the server via SSH using as root ID. Entrar para o servidor via SSH utilizando como raiz ID.
  2. Ensure that you’re at home directory of root. Assegurar que você está em casa do diretório raiz. The open up the .bash_profile for editing using pico or vi by typing one of the following commands at command shell line: A abrir o. Bash_profile para edição usando pico ou vi, digitando um dos seguintes comandos no comando shell linha:

    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: Role até o final do arquivo e adicione a seguinte linha:


    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 'ALERTA - Root Shell Acesso em: "` date `` que `| mail-s" Alerta: Acesso a partir de raiz que `| 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. Substituir user@email.com com o real endereço de e-mail que você deseja acessar a raiz alerta foi enviado a notificação. Note that you can change the text contains in the email alert too. Note que você pode alterar o texto contém no e-mail alerta também. 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. O texto a começar pelo primeiro alerta e-mail está escrito como corpo, e você pode adicionar outras informações, tais como, em nome de host ou alterar o texto. The second Alert is the email title which you can change to your own too. O segundo alerta é o título e-mail que você pode mudar a sua própria também.

Now logout and login again as root, you should receive an email alert at your inbox. Agora logout e login novamente como root, você receberá um e-mail alerta na sua caixa de entrada. The security trick should works on most popular flavor of Linux such as RedHat, CentOS, Ubuntu, FreeBSD and etc. A garantia deve truque funciona com sabor mais populares de Linux como a RedHat, CentOS, Ubuntu, FreeBSD e etc

IMPORTANT : This is a machine translated page which is provided "as is" without warranty. IMPORTANTE: Esta é uma página traduzida máquina que é fornecida "como está" sem garantia. Machine translation may be difficult to understand. A tradução automática pode ser difícil de compreender. Please refer to Por favor, consulte a original English article Inglês original article whenever possible. sempre que possível.

Share and contribute or get technical support and help at Compartilhe e contribuir ou obter suporte técnico e ajudar a My Digital Life Forums Minha vida digital Fóruns .



2 Responses to “How to Get Linux Server Sends Email Alert on Root Login” 2 Responses para "How to Get Linux servidor envia e-mail alerta sobre raiz Login"

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

    [...] Linux - wysyłanie maila o logowaniu na konto roota Bardzo użyteczny skrypcik [...] [...] Linux - wysyłanie maila o logowaniu nd Konto roota bardzo użyteczny skrypcik [...]

  2. Jon
    May 3rd, 2008 05:43 3 de maio de 2008 05:43
    2

    ‘who -m’ makes the output much cleaner when using this on a system that has multiple users logged on… "-M que" a saída torna muito mais limpo quando se usa este em um sistema que tem vários usuários registrada em…

    -m reports only hostname and user associated with stdin terminal - m relatórios apenas host e usuário associado com stdin terminal

Leave a Reply Deixe uma resposta

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> Você pode usar estas tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q Cite=""> <strike> <strong>

Subscribe without commenting Subscreva sem comentar


Custom Search

New Articles Novos Artigos

Incoming Search Terms for the Article Incoming Termos de pesquisa para o artigo

linux turn off mail notification Linux desligar notificação mail - -- linux email alerts Linux alertas e-mail - -- change root email mudança raiz e-mail - -- linux change root email Linux mudar raiz e-mail - -- linux mail root Linux mail raiz - -- linux change root email address Linux raiz mudar endereço de e-mail - -- linux root mail Linux raiz mail - -- mail alerts in linux mail alertas em Linux - -- email when root logs on e-mail quando a raiz logs - -- linux root login alert Linux raiz login alerta - -- turn off mail notification linux desligar mail notificação Linux - -- linux root email address Linux raiz endereço de e-mail - -- email alerts linux Linux alertas e-mail - -- linux server email security notifications servidor Linux e-mail notificações de segurança - -- linux mail change from address Linux mail mudar de endereço - -- email alert when linux server is login e-mail alerta quando servidor é linux login - -- Change root mail Mudar raiz mail - -- linux send email login Linux envie um e-mail login - -- send email on login linux envie um e-mail em Linux login - -- email for root e-mail para a raiz - -- linux send email on ssh login linux enviar e-mail sobre ssh login - -- linux notify on login Linux notificar ao login - -- linux login notification Linux login notificação - -- linux email root logs Linux e-mail raiz logs - -- linux mail from address Linux endereço de correio electrónico - -- linux system send alerts rss -news linux sistema envia alertas RSS-notícias - -- server email notifications servidor notificações por e-mail - -- linux server status mail servidor Linux estatuto mail - -- linux root email as different user linux raiz e-mail como outro usuário - -- ssh alert linux SSH alerta Linux - -- where do we find mail for root + linux onde é que vamos encontrar e-mails de raiz + linux - -- mail logins linux mail logins Linux - -- mail root linux mail raiz Linux - -- root mail linux raiz mail Linux - -- redhat linux directory file access email alert notification Linux RedHat diretório arquivo acessar o e-mail alerta notificação - -- all todos - -- linux root alert Linux raiz alerta - -- linux some one is sending mail from my server who linux alguns está enviando um e-mail de que meu servidor - -- server to email logs linux servidor de e-mail logs Linux - -- ubuntu mail command line server change root email address ubuntu mail da linha de comando servidor raiz mudar endereço de e-mail - -- set email alerts in linux definir alertas e-mail no Linux - -- email notification root freebsd FreeBSD raiz notificação por e-mail - -- Linux ubuntu ids alerte sms Ubuntu Linux IDs alerte SMS - -- any change in linux +email notification qualquer alteração no linux + notificação por e-mail - -- change user from addresses linux mudança de endereços usuário Linux - -- disable email notifications on linux server desativar notificações por e-mail em servidor linux - -- how to set root email ID como definir raiz e-mail ID - -- linux email on logins Linux e-mail com logins - -- how to get the alert from mails from linux server como obter o alerta de e-mails a partir de servidor Linux - -- linux default email address change Linux padrão e-mail da mudança - --