cancel
Showing results for 
Search instead for 
Did you mean: 

Seperate sudo logfile

SOLVED
Go to solution
Alex Ferreira
Frequent Advisor

Seperate sudo logfile

Greetings,

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
2 REPLIES
Keely Jackson
Trusted Contributor
Solution

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)

Cheers
Keely

Live long and prosper
Alex Ferreira
Frequent Advisor

Re: Seperate sudo logfile

Keely,

Thanks a million. It has worked. Mission Accomplished.

Alex Ferreira.