Google

syslog-ng with selinux and targeted policy on RHEL4

July 18th, 2006
We use syslog-ng with remote logging to keep track of our logs. The targeted policy doesn’t allow syslog-ng to operate by default. The following lines added to local.te in /etc/selinux/targeted/src/policy/domains/misc will allow syslog-ng to bind to port 514 and access proc kmsg for kernel messages (such as avc messages!) Read the rest of this entry »

logrotate fails to rotate logs on RHEL4

July 18th, 2006
We have a few RHEL4 servers, logs fail to rotate on the production machines, but not unmodified machines. We discovered that this is a known bug with using noexec on /tmp https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=156594 If you change your /tmp mount to noexec, logrotate cannot work because it tries to execute a script in /tmp to do the rotation. The hack to get it working is to add a TMPDIR in the cron job that runs logrotate (and create a directory that it can execute a script in, mkdir /root/tmp; chmod 1777 /root/tmp)
#!/bin/sh
 
export TMPDIR=/root/tmp
 
/usr/sbin/logrotate /etc/logrotate.conf
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
    /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit 0

Entering BIOS Setup from Serial Console (Sending F1)

July 7th, 2006
We have a few machines with console redirection in the bios. We access these with minicom. To enter the bios, we’ve found that the VT100 escape sequences work. To send F1, enter ESC O P, the capitalization on the O and P are essential. Other codes that are known to work:
F1^[OP
F2^[OQ
F3^[OR
F4^[OS
F12 comes through unharmed, so to get the boot menu on most machines, we just type F12 directly.