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.

Email Root History

Discussion in 'E-mail Discussions' started by sexshun, Oct 22, 2005.

  1. sexshun

    sexshun Active Member

    Joined:
    Sep 28, 2005
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Does whm have a cron/script or something that emails out ssh's root history to the root email. I could've sworn I received one when I first got my server activated but now I don't receive any emails like that anymore.
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    No, it doesn't. You'll have to write/search for one yourself.
     
  3. sexshun

    sexshun Active Member

    Joined:
    Sep 28, 2005
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    ok, thanks.
     
  4. Zaf

    Zaf Well-Known Member

    Joined:
    Aug 22, 2005
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    If you are looking for history of commands executed on the SSH Prompt, add the following in /root/.bash_logout

    cat /root/.bash_history | mail -s "SSH command history" root
    echo > /root/.bash_history


    If you do not wish to clear the history, you may just put the first line, but remember then you'd get a mail with the older command history too.

    hth
     
  5. sexshun

    sexshun Active Member

    Joined:
    Sep 28, 2005
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    1
    Thanks :) :) :) :) :) :) (needed something else cause the minimum post is 15 characters. :mad:
     
  6. Zaf

    Zaf Well-Known Member

    Joined:
    Aug 22, 2005
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    You are welcome (thats exactly 15 chars).

    Side note: In future you could use "Thank you very much" to fill in characters as thats more than 15 chars too ;-)
     
Loading...

Share This Page