Archives

All posts for the day August 25th, 2011

We have recently been having issues at work with users, sudo su directly to root thus bypassing sudo logging and completely blocking any ability to trace back what was done to the systems.  Most of these issues can be traced back to my team (system administration) and I will take the blame for the most part.  We were handing out full sudo root to users by just saying don’t use sudo su or any of the other methods to drop directly to a root prompt, it’s against corporate security and was based on the trust factor.  The reason:  there’s primarily only 2 UNIX SE’s, we had roughly 700 UNIX boxes 6 months ago, we now have close to 1500 UNIX hosts.  Way to much work to worry about trying to setup and stricten the sudoers file.  However, now that things have settled down a bit.  Everyone and their brother are using pretty much only sudo su -.  It’s a complete mess at this point.  So much for the trust factor…

Now the users are spoiled and so used to just sudo su, it’s crazy some don’t even know when to use sudo properly and think sudo su is how your suppose to use sudo.  Anyhow got tired of slapping little Johnnies hand and said no no no…So just added this to the sudoers file…  The bottom line is that Johnny doesn’t listen…

Sure the smart thing to do is to stricten the sudoers down and only hand out what they need, or setup Puppet, but those things take time and I need to re-lock down the environment now.

Defaults mailto=systemadmin@example.com, mail_badpass, mail_no_user, mail_no_perms

Defaults logfile=/root/.sudolog, log_year, log_host

Defaults always_set_home
Defaults env_reset

Cmnd_Alias SHELLS=/bin/ash, /bin/bash, /bin/csh, /bin/sh, /usr/bin/es, /usr/bin/ksh,/usr/bin/rc, /usr/bin/tcsh, /usr/bin/zsh, /bin/sash, /bin/zsh, /usr/bin/esh, /bin/tcsh, /sbin/sh, /usr/local/bin/bash, /usr/local/bin/tcsh, /bin/login, /bin/su

johnny   ALL=ALL, !SHELLS

 

If anyone has any other suggestions I would love to hear them