The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to get an email alerts for any login to server?

Discussion in 'E-mail Discussions' started by KirkColvin747, Mar 22, 2005.

  1. KirkColvin747

    KirkColvin747 Member

    Joined:
    Mar 17, 2005
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    I'm able to get an email alert is a user either logs in SSH as root or SSH as a user who then go to root via SU command.

    How would I config system to email an alert EVERYTIME a cPanel is accessed or any SSH is open not just root? What I'm after is to know whenever anyone for any reason accesses the box.

    Thanks,
    Kirk
     
  2. LGRCompEnt

    LGRCompEnt Registered

    Joined:
    Apr 11, 2005
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    I would really like to know the answer to this as well. There must be a Linux guru out there somewhere that knows the answer to this one.

    Anyone...
     
  3. easyhoster1

    easyhoster1 Well-Known Member

    Joined:
    Sep 25, 2003
    Messages:
    659
    Likes Received:
    0
    Trophy Points:
    16
    On FREEBSD..

    cd /etc

    pico profile

    echo 'ALERT - Root Shell Access on:' `date` `who` | mail -s "Alert: Root Access on Server `hostname` from `who | awk '{print $6}'`" email@domain.com

    Just change the email addy above.

    Linux I belive is .bash_profile
     
  4. B12Org

    B12Org Well-Known Member

    Joined:
    Jul 15, 2003
    Messages:
    692
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Seattle Washington
    cPanel Access Level:
    Root Administrator
    Yup, .bash_profile it is.
     
Loading...

Share This Page