Environment : RHEL 6.1 .Here are the steps that I followed :1. vi /etc/rndc.conf and following line----options { default-server 127.0.0.1; default-key "rndckey";};server 127.0.0.1 { key "rndckey";};key "rndckey" { algorithm "hmac-md5"; secret "secret key will be placed here";};---2. cd /var/named/chroot/etc/3. $dnssec-keygen -r /dev/urandom -a HMAC-MD5 -b 256 -n HOST rndc4. cat *.private5. copy the key from private file and put it in /etc/rndc.conf at "secret" line.6. Do link :$ln -s /var/named/chroot/etc/rndc.conf...
Tuesday, 29 November 2011
Tuesday, 15 November 2011
How to rotate sudo log?
Posted on 00:35 by Unknown
Scenario : Sudo log files will keep the activities of sudo users and their login status in /var/log/sudolog.Tested platform : RHEL 5Solution : 1. Create a sudo log file and put it in /etc/sudoers. Then rotate it for 90 days. As an example :$touch /var/log/sudolog2. vi /etc/sudoers and add following lines :-----Defaults !syslogDefaults logfile = /var/log/sudolog-----Then save it.3. Rotating this log file :vi /etc/logrotate.d/sudolog and put following :------/var/log/sudolog {rotate 90size 5Mpostrotate/usr/bin/killall -HUP syslogdendscript}------4....
Subscribe to:
Posts (Atom)