The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Memory Usage Monitoring sbn HP-UX 2 05-11-2008 04:29 PM
CPU usage and memory usage mansoorulhaq High Level Programming 1 08-09-2007 04:55 PM
DB2 Monitoring sprellari AIX 0 05-30-2006 09:57 AM
Monitoring CPU usage on AIX 5.3 with SNMP art UNIX for Advanced & Expert Users 2 07-01-2005 03:20 AM
Monitor CPU usage and Memory Usage Gajanad Bihani High Level Programming 2 03-09-2005 07:35 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-28-2007
ajcannon ajcannon is offline
Registered User
  
 

Join Date: Aug 2007
Location: Binfield, Berkshire. UK
Posts: 91
Monitoring SU usage

I hope this is the correct forum - apologies to all if I am mistaken.

We are fairly sure someone has got access to the root password on one of our machines and is 'playing silly b*****rs' with it.

Due to local politics we can't easily get the password changed and we need to gather some info to get things changed.

Does anyone know if it is possible to track/trace/log the use of su (or any other command for that matter though su is the one we are most interested in)

We are using Linux - uname -a output below

Linux <hostname> 2.4.9-e.57enterprise #1 SMP Thu Dec 2 20:45:51 EST 2004 i686 unknown

Many thanks for any info/advice
  #2 (permalink)  
Old 09-28-2007
Percy Percy is offline
Registered User
  
 

Join Date: Jan 2007
Posts: 14
Think there is an su log you can look at (assuming you have su logging switched on).

/var/log/sulog or /var/adm/sulog....

man sulog?
  #3 (permalink)  
Old 10-01-2007
sysgate's Avatar
sysgate sysgate is offline Forum Advisor  
Unix based
  
 

Join Date: Nov 2006
Location: Bulgaria
Posts: 1,322
sulog is available for SunOS only, it's not present on Linux. Instead, you can look at "/var/log/secure" file, the format is :
Quote:
Oct 1 15:29:44 sysgate su: pam_unix(su-l:session): session opened for user root by sysgate(uid=500)
Oct 1 16:06:02 sysgate su: pam_unix(su-l:session): session closed for user root
  #4 (permalink)  
Old 10-01-2007
andryk's Avatar
andryk andryk is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2003
Posts: 448
ajcannon,
If someone got root once on your linux system then you're in trouble! Chance are he/she will be able to wipe out any suspicous activity such as root su/login etc...

But If the user is pretty dumb You can always alias the su command to log some info, something like
Code:
alias su='TOTO=`tty | sed -e 's,^/dev/,,'`; who -u |grep $TOTO>> /tmp/su.log; /bin/su'
  #5 (permalink)  
Old 10-01-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by ajcannon View Post
We are fairly sure someone has got access to the root password on one of our machines and is 'playing silly b*****rs' with it.

Due to local politics we can't easily get the password changed and we need to gather some info to get things changed.
Then you either don't comprehend the seriousness or don't care about security.

If you had a bull rampaging in your china shop would you be trying to find the farmer or trying to protect your merchendise?
  #6 (permalink)  
Old 10-01-2007
Cameron's Avatar
Cameron Cameron is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2001
Location: Brisbane, Australia
Posts: 499
Stuff the politics, there are bigger concerns than people's ego's.

It's a security issue.
Just change the root password.

Not sure if it's the case with all unix/linux systems, but on HP-UX you can restrict who can su to root (I called the group 'rooters') . If you're not in that group, then no can do.

Cheers,
Cameron

Last edited by Cameron; 10-01-2007 at 08:33 PM.. Reason: poor punctuation ;)
  #7 (permalink)  
Old 10-01-2007
porter porter is offline Forum Advisor  
Registered User
  
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by Cameron View Post
Not sure if it's the case with all unix/linux systems
With NetBSD and some other systems you have to be a member of the "wheel" group.
Closed Thread

Bookmarks

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 -4. The time now is 03:27 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0