Every system administrator has little twitches, behaviors that strike outside observers as somewhere between odd and superstitious. Sometimes these are just habits, but sometimes they have interesting stories behind them.
One of my twitches is that when I use
su
, I always type '
/bin/su
' (or on some irritating systems, '
/usr/bin/su
'), not plain '
su
'. (By now it's a reflex.)
This habit originated in a bit of security advice. The story goes that if you didn't use absolute paths, an intruder who compromised your account could alter your
$PATH
so that plain '
su
' ran a trojan version of
su
that logged the password somewhere, told you 'bad password', and then cleaned itself away to make future
su
's work normally.
In my current environment this is mostly superstition, because most of the time I get root access by starting a 'root xterm' (more or less '
xterm -e /bin/su -fg OrangeRed
'; the red foreground makes such xterms stand out, avoiding accidents). An attacker who compromised my account could just zap the fvwm2 menu entry for this instead of changing my
$PATH
.
Still, it's my little twitch. Life wouldn't be quite the same without it.