How to Get Linux Server Sends Email Alert on Root Login कैसे रूट पर लॉगिन Linux के सर्वर पर भेजता है ईमेल चेतावनी प्राप्त करने के लिए

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. कॉन्फ़िगर करने के लिए सर्वर पर रूट पर प्रवेश के प्रत्येक घटना पर एक डिफ़ॉल्ट ईमेल पता करने के लिए स्वत: ईमेल चेतावनी अधिसूचना, निम्न गाइड का उपयोग करें.

  1. Login to the server via SSH using as root ID. लॉगिन सर्वर से SSH रूट के रूप में पहचान पत्र का उपयोग कर के माध्यम से.
  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: इस के. संपादन पिको या vi का उपयोग करने के लिए bash_profile को एक आदेश खोल लाइन पर निम्नलिखित कमांड के टाइपिंग द्वारा खुले:

    pico .bash_profile पिको. bash_profile
    vi .bash_profile vi. 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
    प्रवेश
    echo 'ALERT - Root Shell Access on:' `date` `who` | mail -s "Alert: Root Access from `who | 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 है कि आप इस रूट का उपयोग करने के लिए चेतावनी अधिसूचना चाहते करने के लिए भेज दिया गया. 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. दूसरी चेतावनी आप अपने खुद के लिए भी है जो बदल सकते हैं ईमेल का शीर्षक है.

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. सुरक्षा चाल चाहिए की सबसे लोकप्रिय स्वाद पर काम करता है Linux के RedHat, CentOS, Ubuntu, FreeBSD और आदि जैसे

IMPORTANT : The page is machine translated and provided "as is" without warranty. महत्वपूर्ण: इस पृष्ठ है मशीन अनुवाद प्रदान की और "" के रूप में वारंटी के बिना है. Machine translation may be difficult to understand. मशीन अनुवाद को समझने में मुश्किल हो सकती है. Please refer to कृपया देखें original English article मूल अंग्रेजी लेख whenever possible. जब भी संभव हो सकता है.


4 Responses to “How to Get Linux Server Sends Email Alert on Root Login” 4 जवाब "कैसे रूट पर" लॉगिन Linux के सर्वर पर भेजता है ईमेल चेतावनी प्राप्त करने के लिए

  1. dean डीन
    November 21st, 2008 03:41 21 नवंबर, 2008 03:41
    4 4

    Great stuff, ग्रेट सामान,

    Is there a way to have the IP of the person who logs in show up? वहाँ जो शो में लॉग व्यक्ति के IP के लिए एक तरीका है?

  2. Emilio एमिलियो
    November 1st, 2008 03:06 1 नवंबर, 2008 03:06
    3 3

    This works for root login or su – from a user login. रूट लॉगिन या su के लिए यह काम करता है - एक प्रयोक्ता प्रवेश से.
    How can I implement it that will work also for “su” only? मैं इसे कैसे भी है कि "र" के लिए ही काम करेंगे को लागू कर सकते हैं? Right now since the path will change with su instead of su – it will not send an email if someone is not using the “-” after the su. अगर किसी का उपयोग नहीं कर रही है अभी से रास्ता su के बजाय su के साथ बदल जाएगा - यह एक ईमेल भेज नहीं होगा "-" को su के बाद. Thanks. धन्यवाद.

  3. Jon जॉन
    May 3rd, 2008 05:43 3 मई, 2008 05:43
    2 2

    '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 मी केवल होस्टनाम और उपयोगकर्ता stdin टर्मिनल से संबंधित रिपोर्टें

  4. Linux - wysyłanie maila o logowaniu na konto roota « Barni.LOG लिनक्स - wysyłanie maila ओ logowaniu Na konto roota «Barni.LOG
    August 12th, 2007 03:10 अगस्त, 12 वीं 2007 03:10
    1 1

    [...] Linux – wysyłanie maila o logowaniu na konto roota Bardzo użyteczny skrypcik [...] [...] लिनक्स - wysyłanie maila ओ logowaniu न konto roota Bardzo użyteczny skrypcik [...]

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=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <डेल datetime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. सुविधा को निष्क्रिय कर दिया गया है टिप्पणी करने के लिए सदस्यता लें. To receive notification of latest comments posted, subscribe to , पोस्ट नवीनतम टिप्पणी की सूचना प्राप्त करने के लिए की सदस्यता My Digital Life Comments RSS feed मेरे डिजिटल जीवन टिप्पणियाँ आरएसएस फ़ीड or या register to receive रजिस्टर प्राप्त करने के लिए new comments in daily email digest. दैनिक ईमेल में नई टिप्पणियाँ डाइजेस्ट.
Custom Search

New Articles नई लेख

Incoming Search Terms for the Article के लिए खोज नियम आने के अनुच्छेद

linux mail change from address Linux के पते से मेल परिवर्तन - -- linux root email address Linux रूट ईमेल पता - -- linux login email notification linux प्रवेश ईमेल अधिसूचना - -- root mail linux रूट मेल linux - -- linux send mail on login Linux के प्रवेश पर मेल भेजने - -- linux mail change from Linux मेल परिवर्तन से - -- linux login notification linux प्रवेश सूचना - -- linux mail root Linux मेल जड़ - -- change root email linux परिवर्तन रूट ईमेल linux - -- linux email log linux ईमेल लॉग - -- linux set root email Linux रूट ईमेल सेट - -- linux email alert linux ईमेल चेतावनी - -- linux user login mail alert Linux प्रयोक्ता प्रवेश मेल चेतावनी - -- linux email login linux ईमेल लॉगिन - -- linux set user email linux उपयोगकर्ता ईमेल सेट - -- change root email परिवर्तन रूट ईमेल - -- root email address मूल ईमेल पता - -- mail linux change from मेल Linux परिवर्तन से - -- email notification when a user logs in linux ईमेल सूचना जब एक उपयोगकर्ता Linux में लॉग - -- linux root mail linux रूट मेल - -- linux root user email address Linux रूट उपयोक्ता ईमेल पता - -- linux user login email Linux प्रयोक्ता प्रवेश ईमेल - -- root login notify रूट लॉगिन सूचित - -- configure linux to send email alerts विन्यस्त Linux ईमेल भेजने के लिए सचेतक - -- linux alert linux चेतावनी - -- wordpress blogs WordPress ब्लॉगों - -- linux remote login notify linux दूरस्थ लॉगिन को सूचित - -- linux root email Linux रूट ईमेल - -- Alert: Root Access from चेतावनी: से रूट प्रवेश - -- set root mail रूट मेल सेट - -- linux email on login प्रवेश पर linux ईमेल - -- linux get administrator e-mail address linux मिल प्रशासक ईमेल पता - -- linux send email when user login linux ईमेल भेजना जब प्रयोक्ता प्रवेश - -- how can I have alert everytime if someone login my server via root user मैं कैसे हर सतर्क हो सकते हैं अगर कोई प्रवेश रूट उपयोक्ता के द्वारा अपने सर्वर - -- how to mail alerts linux कैसे मेल करने के लिए Linux सचेतक - -- how to get linux mail कैसे Linux मेल प्राप्त करने के लिए - -- linux alert on new login नए प्रवेश पर linux चेतावनी - -- linux linux - -- notify when user logs in ssh linux सूचित जब SSH Linux में उपयोगकर्ता लॉग - -- linux mail alerts Linux मेल सचेतक - -- linux mail an root Linux मेल एक रूट - -- linux email when user logs in linux ईमेल जब उपयोगकर्ता में लॉग - -- linux send root mail Linux रूट मेल भेजने - -- all सब - -- linux successful login notification linux सफल प्रवेश सूचना - -- linux email root linux ईमेल जड़ - -- Receive an email when someone logs in as root प्राप्त एक ईमेल जब किसी में लॉग रूट के रूप में - -- email alerts linux ईमेल Linux सचेतक - -- linux notify root login Linux रूट लॉगिन सूचित - -- linux send mail login Linux मेल प्रवेश भेजें - --