1752855 Members
3926 Online
108790 Solutions
New Discussion юеВ

Sudo Logging

 
SOLVED
Go to solution
Patrick Ware_1
Super Advisor

Sudo Logging

Hello,

The question I have is about sudo logging. I know that to log every command in sudo to a specific file, you have to set this in the sudoers file in the Defaults section like so:

Defaults logfile = /var/adm/sudo.log


If I don't have this set on a server, and I edit the sudoers file to add this in sudoers, will it mess up anything already running?
4 REPLIES 4
Patrick Wallek
Honored Contributor
Solution

Re: Sudo Logging

No, it should not mess up anything.

The logging should take effect with the next usage of sudo.
Ivan Ferreira
Honored Contributor

Re: Sudo Logging

Just to support the confirmation, you won't have any problems.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Samir Pujara_1
Frequent Advisor

Re: Sudo Logging

Hi Patrick,

In case if you have not set this on any server, it will goes to your syslog file. When you update your sudoer with the Default Logfile entry, it will take effect after you save the same. There will be no mess up or no harm to the system. Infact it is a good idea to get sudo activity logged in to a saperate file for autditing purpose also.
Patrick Ware_1
Super Advisor

Re: Sudo Logging

Got my answer!!