Log "date -s" command
Posted
by
LinuxPenseur
on Server Fault
See other posts from Server Fault
or by LinuxPenseur
Published on 2010-12-21T08:10:29Z
Indexed on
2010/12/21
8:55 UTC
Read the original article
Hit count: 310
Hi,
I know that the date -s <STRING>
command sets the time described by the string STRING
.
What i want is to log the above command whenever it is used to set the time into the file /tmp/log/user.log
.
In my Linux distribution the logging is done by syslog-ng
. I already have some logs going into /tmp/log/user.log
.
This is the content of /etc/syslog-ng/syslog-ng.conf in my system for logging into /tmp/log/user.log
destination d_notice { file("/tmp/log/user.log");};
filter f_filter10 { level(notice) and not facility(mail,authpriv,cron); };
log { source(s_sys); filter(f_filter10); destination(d_notice); };
What should i do so that date -s
command is also logged into /tmp/log/user.log
© Server Fault or respective owner