Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Email Root History

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

  1. sexshun

    sexshun Active Member

    Joined:
    Sep 28, 2005
    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    151
    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,470
    Likes Received:
    21
    Trophy Points:
    463
    Location:
    Go on, have a guess
    No, it doesn't. You'll have to write/search for one yourself.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. sexshun

    sexshun Active Member

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

    Zaf Well-Known Member

    Joined:
    Aug 22, 2005
    Messages:
    117
    Likes Received:
    0
    Trophy Points:
    166
    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:
    151
    Thanks :) :) :) :) :) :) (needed something else cause the minimum post is 15 characters. :mad:
     
  6. Zaf

    Zaf Well-Known Member

    Joined:
    Aug 22, 2005
    Messages:
    117
    Likes Received:
    0
    Trophy Points:
    166
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice