Preserving User Information

Stephen Carville stephen at
Thu Feb 5 01:04:20 EST 2004

I have a few usernames that do not have a password set so can only be reached 
by using the command "sudo su - <username>".  These are used for the backup 
operators and web administrators.  Sometimes these usernames are used to run 
special programs which send out emails notifiying me that the program was 
run.  What I would like to do is to include in the emil who the original user 

For example if the user "jason" becomes "amanda" (backup operator) by typing:

$ sudo su - amanda

then starts a backup script by hand, I would like the email to tell me it was 
jason that started the script.

I can usually discern who did what to whom by looking in the messages file but 
-- well -- did I mention I am lazy? :-)

I've googled for an answer and I read thru all the archived messages that 
looked relevant but, so far. no luck.  I've also tried the !set_logname 
option but that doesn't  do it either.  I did find that sudo sets 
these do not survive once su is run.

Stephen Carville
UNIX and Network Administrator
stephen at
Most people prefer believing their leaders are just and fair even in the face 
of contrary evidence.  Perhaps this is because, once a man acknowledges that  
the government he lives under is corrupt and cares nothing for justice or  
fairness, that man also has to choose what he will do about it.

More information about the sudo-users mailing list