How to Get Linux Server Sends Email Alert on Root Login Linuxサーバに送信する方法を電子メール警告を取得rootログイン

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.は、サーバーのセキュリティを向上させるため、特にWebサーバーを公開し、インターネットや可能性を全世界のハッカー、それを有効にする最高のサーバーに自動的に通知を送信する定義済みの電子メールアドレスにメールをログに記録させるには、 rootとしてのeverytimeをホストします。 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.アラートを設定するに自動送信メールの通知を、デフォルトの電子メールアドレスの各事件のルートサーバー上でログオンし、使用して次のガイドをご覧ください。

  1. Login to the server via SSH using as root ID. ssh経由でのサーバーにログインしてrootとして番号を使用しています。
  2. 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にピコやviを使用して編集するには、次のコマンドを入力で1つのコマンドシェルの行:

    pico .bash_profileピコです。 bash_profileに
    vi .bash_profile Ⅵ 。 bash_profileに

  3. 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 エコー'警告-r ootシェルアクセス日時: ' `日` ` w ho` |メール-秒"警告: r ootのアクセス権がより` w ho|カット次元" ( " - F 2を|カット次元" ) " - F 1を押して` "ユーザ@ 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の内の実際のアドレスに電子メールアカウントにアクセスしたいのルートにアラート通知を送信されています。 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.最初のテキストで始めると警告が書かれていると電子メールの本文、および他のに関する情報を追加することもできますなどのホスト名または変更してwordings 。 The second Alert is the email title which you can change to your own too. 2番目のアラートは、電子メールタイトルを変更することができます自分自身のが判明しました。

Now logout and login again as root, you should receive an email alert at your inbox.今すぐrootとしてログイン再度ログアウトし、お手元に届く電子メールを受信トレイに警告します。 The security trick should works on most popular flavor of Linux such as RedHat, CentOS, Ubuntu, FreeBSD and etc.トリックの安全保障に取り組んでは最も人気のフレーバーなどのLinux redhat 、 CentOS版、 ubuntu 、 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 私のデジタルライフフォーラム .です。



2 Responses to “How to Get Linux Server Sends Email Alert on Root Login” 2つの応答を" Linuxサーバに送信する方法を電子メール警告を取得rootログイン"

  1. Linux - wysyłanie maila o logowaniu na konto roota « Barni.LOGリナックス-m ailaまたはl ogowaniuなw ysyłanieさんr oota« b arni.log
    August 12th, 2007 03:10 2007年8月12日03:10
    1

    [...] Linux - wysyłanie maila o logowaniu na konto roota Bardzo użyteczny skrypcik [...] [...]のLinux -m ailaまたはl ogowaniuなw ysyłanieさんr ootab ardzou żytecznys krypcik[ ...]

  2. Jonジョン
    May 3rd, 2008 05:43 2008年5月3日05:43
    2

    ‘who -m’ makes the output much cleaner when using this on a system that has multiple users logged on… ' who - M 'のため、出力を使用して、このとき多くて、システム上のクリーナーは、複数のユーザーがログオンして…

    -m reports only hostname and user associated with stdin terminal -メートル報告書のホスト名とユーザのみに関連付けられて標準入力端子

Leave a Reply残して返信

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> これらのタグを使用することができます: <aのhref=のtitle= <abbrのtitle= <blockquote cite=""> <cite> <acronymのtitle= <b>ダウンロードの<code> <デル日時= " " >の<em> <i>て<strike> <strong> <q cite="">

Subscribe without commenting登録なしのコメント


Custom Search

New Articles新しい記事

Incoming Search Terms for the Article検索用語を受信するには

linux email alerts Linuxの電子メールアラート - - linux turn off mail notification Linuxのメールの通知を無効にする - - change root email 電子メールのルートを変更 - - linux change root email Linuxのルートに変更する電子メール - - linux mail root Linuxのメールルート - - linux change root email address Linuxのルート電子メールアドレスを変更 - - linux root mail Linuxのルートメール - - mail alerts in linux Linuxのメールを送る - - email when root logs on 電子メールにログオンするときにルート - - linux root login alert Linuxのrootログイン警告 - - turn off mail notification linux Linuxのメールの通知を無効にする - - change root email address 電子メールアドレスの変更ルート - - linux root email address Linuxのルート電子メールアドレス - - linux mail from address Linuxのメールの差出人のアドレス - - email alerts linux 電子メールアラートのLinux - - linux server email security notifications Linuxサーバの電子メールセキュリティ通知 - - linux mail change from address Linuxのメールアドレスを変更する - - email alert when linux server is login Linuxサーバは、ログイン時に電子メールアラート - - Change root mail ルートのメールを変更 - - root mail linux ルートメールのLinux - - linux email alert Linuxの電子メールアラート - - linux root login mail Linuxのrootログインメール - - linux send email login Linuxのメールを送信します。ログイン - - send email on login linux ログインリナックス上で電子メールを送信 - - email for root 電子メールをルート - - linux send email on ssh login リナックス上で電子メールの送信のSSHログイン - - linux notify on login Linuxの通知にログイン - - linux login notification Linuxのログイン通知 - - linux email root logs Linuxの電子メールのルートログ - - set root mail セットルートメール - - linux mail an root Linuxのメールのルート - - linux system send alerts rss -news アラートを送信LinuxシステムのRSS -ニュース - - server email notifications サーバーの電子メールによる通知 - - linux server status mail Linuxサーバの状態メール - - linux root email as different user 別のユーザーとしてLinuxのルート電子メール - - ssh alert linux LinuxのSSHの警告 - - where do we find mail for root + linux 私たちはどこに置けば+ Linuxのルートのメールを検索 - - mail logins linux メールのログイン情報のLinux - - mail root linux メールルートのLinux - - redhat linux directory file access email alert notification RedHat Linux上にアラート通知を電子メールディレクトリにファイルへのアクセス - - linux mail to root リナックスにメールをルート - - all すべての - - linux root alert Linuxのルートアラート - - linux some one is sending mail from my server who Linuxのいくつかの1つは私のサーバーからメールを送信するwho - - server to email logs linux 電子メールサーバーのログをLinuxの - - mail alert linux メールアラートのLinux - - linux email root Linuxの電子メールのルート - - ubuntu mail command line server change root email address コマンドラインからのメールサーバーのルートubuntu電子メールアドレスを変更 - - set email alerts in linux Linuxにおける電子メールのアラートを設定 - - email notification root freebsd ルートFreeBSDの電子メールによる通知 - -