sudo log messages

Polytropon freebsd at
Sun Dec 4 13:41:47 UTC 2011

On Sun, 4 Dec 2011 05:34:19 +0200, Коньков Евгений wrote:
> Tell me please how to stop sudo to food /var/log/messages?

ADDITION: Of course I meant /usr/local/etc/sutoers,
NOT sudo.conf.

Instead of logging via syslog (to /var/log/messages),
why not use a specific log file for sudo? Add those
lines to the sudoers file:

	Defaults logfile=/var/log/sudo.log
	Defaults !syslog

Make sure /var/log/sudo.log exists, and maybe use
newsyslog.conf to deal with log rotation and archiving.
However, you can easily purge sudo log information
this way, if required.

The file /usr/local/share/doc/sudo/sample.sudoers
contains an example.

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list