Command logging?

Charles Mayo Charles.Mayo at
Thu Aug 10 09:56:43 EDT 2000

As root, run visudo to edit the sudoers file.  Include a line such as:

Defaults logfile=/usr/fred/sudo.log

but include a file path that exists on your machine.  That file will be
created if it doesn't already exist. and will contain every command executed
from then on under sudo, whether successful or not.  It won't contain any
command output (fortunately, as this would soon gobble up your disk space).

-----Original Message-----
From:	Frederik Haverås [mailto:Freds_post at]
Sent:	10 August 2000 14:09
To:	sudo-users at
Subject:	Command logging?


I've seen a few questions in past mails regarding
command logging, but no answers that makes sense to
me. Could anyone explain how to have sudo log every
(successful and unsuccessful) command a user types in?


Do You Yahoo!?
Kick off your party with Yahoo! Invites.
sudo-users mailing list <sudo-users at>
For list information, options, or to unsubscribe, visit:
Imperial Tobacco Limited and Group Companies

Imperial Tobacco Limited, Registered in England No: 1860181 Registered Office  PO Box 244, Upton Road, Bristol BS99 7UJ. We are unable to guarantee the security of e-mails when sent over a public network such as the Internet. Therefore, confidential information should not be sent to us in an e-mail or as an attachment.

More information about the sudo-users mailing list