[sudo-users] Logging when doing sudo su -

Todd C. Miller Todd.Miller at courtesan.com
Wed Feb 22 08:35:28 EST 2012

On Tue, 21 Feb 2012 09:45:03 EST, Louis Bohm wrote:

> I am testing out the logging features of version 1.8.3 and so far
> the only question I have is when a user does a sudo su - how come
> all the commands are not still logged.  I see the sudo su part in
> the logs but thats it.  We regularly have to sudo from our personal
> account in to another users account and due to that we need to first
> sudo su - to get in to root.

Once you run a shell sudo cannot log the individual commands you
run.  If you have log_output enabled you can see the output of the
session, including the commands run, but the individual commands
are not logged separately.  You can, however, use sudo to run
commands as another user directly.  E.g. sudo -u other_user command.

 - todd

More information about the sudo-users mailing list