Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 

Seperate sudo logfile

Go to solution
Alex Ferreira
Frequent Advisor

Seperate sudo logfile


I want to create a seperate logfile for those using sudo. At present when one uses the sudo command it is being logged in /var/adm/syslog/syslog.log. I want a total seperate logfile for this.

I have done a search on this site, but I still have not been able to achieve this wee bit project.

This is what my syslog.conf looks like :

# syslogd configuration file.
# See syslogd(1M) for information about the format of this file.
mail.debug /var/adm/syslog/mail.log
*.info;mail.none /var/adm/syslog/syslog.log

I am extremely new (as you can tell by the question), so any help will be greatly appreciated.

Thank you all.

Alex Ferreira
Keely Jackson
Trusted Contributor

Re: Seperate sudo logfile

Hi Alex

All you need to do is add the following via visudo

Defaults !syslog
Defaults logfile=/var/adm/sudo.log (or wherever)


Live long and prosper
Alex Ferreira
Frequent Advisor

Re: Seperate sudo logfile


Thanks a million. It has worked. Mission Accomplished.

Alex Ferreira.