#1 (permalink)  
Old 05-24-2007, 09:14 AM
Registered User
 
Join Date: Jan 2004
Posts: 664
Lyttek is on a distinguished road
Root access alert email

I've had the server send me notification via email anytime root access to the server has occured. Since the move to CP11, I'm getting an email at 16 past midnight that root access has happened, but no IP address has been recorded, making me think it's something from a cron job... Here's an example:

ALERT-Root Shell Access on: Thu May 24 00:16:17 CDT 2007

While a normal email has:

ALERT-Root Shell Access on: Thu May 24 08:05:39 CDT 2007 root pts/0 May
24 08:05 (adsl-70-244-110-121.dsl.ksc2mo.swbell.net)

Obviously, I'd like to eliminate the first, since it makes me jump everytime i see it...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-24-2007, 09:33 AM
Registered User
 
Join Date: Apr 2004
Location: NJ
Posts: 28
bebop1065
Perhaps your script needs to be updated to reflect the new(?) location of the log file that recorded the ip address of the login?

Would you share that script?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-24-2007, 10:21 AM
gtgeorge's Avatar
Registered User
 
Join Date: Feb 2007
Posts: 89
gtgeorge is on a distinguished road
We get the same email that coincides with the upcp update each early AM. We have gotten them daily since the services done by ConfigServer.
__________________
regards,
George
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-24-2007, 11:00 AM
verdon's Avatar
Registered User
 
Join Date: Nov 2003
Location: Northern Ontario, Canada
Posts: 784
verdon
try the forums at configserver for support for their scripts
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-24-2007, 11:31 AM
cpanelinfoseeker's Avatar
Registered User
 
Join Date: Oct 2002
Location: NE Illinois
Posts: 298
cpanelinfoseeker is on a distinguished road
I put a ticket in to Chirpy when this first happened as I was worried. This is normal when mailscanner is restarted. You can duplicate it by doing a manual restart in Mailscanner. I now just watch for the timestamp on the email to be sure that it happens during the nightly cycle only. At any other time, I would be extremely worried!

Hope this helps,
Ron
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 05-24-2007, 08:32 PM
Registered User
 
Join Date: Jan 2004
Posts: 664
Lyttek is on a distinguished road
Here's the code, taken directly from the 'secure your server' sticky:

Code:
Server e-mail everytime someone logs in as root

To have the server e-mail you everytime someone logs in as root, SSH into server and login as root.

At command prompt type: pico .bash_profile

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 | awk '{print $6}'`" your@email.com

Save and exit.
So, there's no script that's changed...

Having said that, when CP11 got updated, MailScanner choked, so I reinstalled using CS MailScanner package, so perhaps that's what's triggering it...

I'll have to try restarting MailScanner and see if that does as suggested.

And since you mention it, I've not been receiving (that I recall) the normal upcp emails... have to look into that as well
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 05-25-2007, 04:54 AM
chirpy's Avatar
Moderator
 
Join Date: Jun 2002
Location: Go on, have a guess
Posts: 13,495
chirpy will become famous soon enough
Our MailScanner script uses the su to root functionality in init to setup the correct environment on restart which is why you'll see a login for root.
__________________
Jonathan Michaelson
cPanel Forum Moderator

Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 06-03-2007, 03:28 AM
Registered User
 
Join Date: May 2003
Posts: 205
djblamire
Quote:
Originally Posted by chirpy View Post
Our MailScanner script uses the su to root functionality in init to setup the correct environment on restart which is why you'll see a login for root.
This is happening for me too.

Chirpy - Even though it only started since the upgrade to CP11 ??

Thanks
Daniel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 08:51 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc