Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-14-2007, 06:28 AM
|
#1
|
Member
Registered: Jul 2004
Location: VIC, Australia
Distribution: RHEL, CentOS, Ubuntu Server, Ubuntu
Posts: 364
Rep:
|
Who did what?
We have a server with several system administrator maintaining the server. Every administrator logs in using their own id and then su - to root.
Is it possible to see which user executed which commands (after they su - to root)?
|
|
|
02-14-2007, 11:42 PM
|
#2
|
Senior Member
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
|
No, su activities can't be audited back to an individual. You need a change control system. It doesn't need to be software, it can simply be a process. If you want an audit trail, enforce the use of sudo - prohibit su.
Last edited by macemoneta; 02-14-2007 at 11:43 PM.
|
|
|
02-15-2007, 06:07 AM
|
#3
|
Moderator
Registered: May 2001
Posts: 29,415
|
If you want an audit trail, enforce the use of sudo - prohibit su.
If you want an audit trail that includes commands users execute (when they su to other accounts), force Sudo but also force using a logging shell wrapper like Rootsh or Sudosh. The main difference between the two AFAIK is that Sudosh has session playback capabilities. If you want to expand on that make the wrapper log to syslog and log to a remote syslog host.
[edit]
You also may want to use a file integrity checker like Aide, Samhain or even tripwire to monitor changes. Top it off with a tool to monitor services for changes (like Monit). I have the most important configs under a revision system which makes it easy to check change info and revert back in case it gets fscked up.
[/edit]
Last edited by unSpawn; 02-15-2007 at 06:19 AM.
Reason: more is more.
|
|
|
02-22-2007, 11:08 AM
|
#4
|
Member
Registered: Jul 2004
Location: VIC, Australia
Distribution: RHEL, CentOS, Ubuntu Server, Ubuntu
Posts: 364
Original Poster
Rep:
|
Thanks for your answers.
|
|
|
02-28-2007, 03:18 AM
|
#5
|
Member
Registered: Feb 2003
Location: Arizona
Distribution: Debian Sid
Posts: 57
Rep:
|
You can alias su to do something like this in /etc/profile.
alias su="su -p"
I'm guessing your seeing who did what based on bash_history or something... That'll keep it in their profiles.
man su
-m, -p, --preserve-environment
do not reset environment variables, and keep the same shell
|
|
|
All times are GMT -5. The time now is 04:07 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|