1752815 Members
5560 Online
108789 Solutions
New Discussion юеВ

Sudo log

 
joseph51
Regular Advisor

Sudo log

Hi,

How can i set the sudo logging in HPUX 11.11

Right now i configured like this
more /etc/syslog.conf
# @(#) $Revision: 74.1 $
#
# 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
*.alert /dev/console
*.alert root
*.emerg *
local2.debug /var/adm/syslog/sudo.log

But..when i am checking the sudo log its blank..Nothing get logged..

please help me
8 REPLIES 8
Patrick Wallek
Honored Contributor

Re: Sudo log

First, there MUST be a SINGLE tab between 'local2.debug' and '/var/adm/syslog/sudo.log'. You should then stop and restart syslogd.

Also, you should check your sudoers file for log configuration. I thing you would have more luck there than in syslog.conf.

man sudoers

for information on logging settings.
Steven E. Protter
Exalted Contributor

Re: Sudo log

Shalom,

sudo does log its own acitivies.

Putting it as part of syslog requires a trip to the RTFM center.

http://www.gratisoft.us/sudo/man/sudoers.html

Thats a good one.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
joseph51
Regular Advisor

Re: Sudo log

Patrik,, I tried the option you told .. but still its not working.I give n a single tab .and restarted the syslogd ..but still its not loging
balaji_vvv
Frequent Advisor

Re: Sudo log

just have this line in your sudo config file, this will work.

Defaults logfile=/var/adm/syslog/sudo.log
joseph51
Regular Advisor

Re: Sudo log

mariyapan,

I didn the same u mentioned .. But still its not logging..

i loged in with my username and i did

#su -

then wheni am checking the /var/adm/syslog/sudo.log.

the file is empty.

Patrick Wallek
Honored Contributor

Re: Sudo log

>>#su -

>>then wheni am checking the /var/adm/syslog/sudo.log.

Well, the command above doesn't use sudo. You would have to execute something via 'sudo' to get sudo to log something.
Mart├нn Garc├нa
Occasional Advisor

Re: Sudo log

Hi, you MUST use the command sudo

for example :

$ sudo dmesg

by the way, check man (1m) sudo

Martin
joseph51
Regular Advisor

Re: Sudo log

Thank to all