Operating System - HP-UX
1833827 Members
2346 Online
110063 Solutions
New Discussion

Re: Logging sudo commands

 
SOLVED
Go to solution
Mike Seerden_2
Occasional Advisor

Logging sudo commands

I have loaded the latest version of sudo for HP-UX 11 and would like to know how to setup a seperate log file so that it does not use syslog.log. Perhaps /var/adm/sudo.log would work but it seems that may be an option when compiling the souce and I had downloded the binaries already compiled. Is there a way to do it after compiling and installing. Thanks
3 REPLIES 3
Tom Geudens
Honored Contributor
Solution

Re: Logging sudo commands

Hi,
I did it like this (from the sudoers file)
# Default overrides
Defaults !syslog
Defaults logfile = /var/adm/syslog/sudo.log

Hope this helps,
Tom Geudens
A life ? Cool ! Where can I download one of those from ?
Mike Seerden_2
Occasional Advisor

Re: Logging sudo commands

Thanks that worked.
Jeff Schussele
Honored Contributor

Re: Logging sudo commands

Hi Mike,

sudo can log both successful and unsuccessful attempts (as well as errors) to syslog(3), a log file, or both. By default sudo will log via syslog(3) but this is changeable at configure time or via the sudoers file.

See the following sudo man page:

http://www.courtesan.com/sudo/man/sudo.html

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!