a while back i reported an issue where /dev/null was getting set to 600 perms after a system update. i finally figured out what it is. i don't care about failed logins and have limited space on some servers, so i symlinked /var/log/btmp to /dev/null. the initscripts package does a chmod 600 /var/log/btmp, so voila /dev/null gets changed.
so now i know why it happened just to me. i now need to figure out a better way to deal with btmp. any ideas from the list?
On 12/16/2010 10:29 AM, Joe Pruett wrote:
a while back i reported an issue where /dev/null was getting set to 600 perms after a system update. i finally figured out what it is. i don't care about failed logins and have limited space on some servers, so i symlinked /var/log/btmp to /dev/null. the initscripts package does a chmod 600 /var/log/btmp, so voila /dev/null gets changed.
so now i know why it happened just to me. i now need to figure out a better way to deal with btmp. any ideas from the list?
Put a logrotate config for /var/log/btmp in /etc/logrotate.d that rotates it once a day and use 'rotate 0' to just throw them away.
See 'man logrotate' for the configuration syntax.
On 12/16/2010 11:14 AM, Benjamin Franz wrote:
On 12/16/2010 10:29 AM, Joe Pruett wrote:
a while back i reported an issue where /dev/null was getting set to 600 perms after a system update. i finally figured out what it is. i don't care about failed logins and have limited space on some servers, so i symlinked /var/log/btmp to /dev/null. the initscripts package does a chmod 600 /var/log/btmp, so voila /dev/null gets changed.
so now i know why it happened just to me. i now need to figure out a better way to deal with btmp. any ideas from the list?
Put a logrotate config for /var/log/btmp in /etc/logrotate.d that rotates it once a day and use 'rotate 0' to just throw them away.
See 'man logrotate' for the configuration syntax.
The man page for lastb says if you just complete delete /var/log/btmp the system shouldn't recreate it on its own.
That is the simplest answer.
On Thu, Dec 16, 2010 at 11:17:22AM -0800, Benjamin Franz wrote:
The man page for lastb says if you just complete delete /var/log/btmp the system shouldn't recreate it on its own.
And if, for some reason, the system _does_ try to recreate then you could use mknod to make it a device node that matches /dev/null eg mknod /var/log/btmp c 1 3
On Thu, 16 Dec 2010, Benjamin Franz wrote:
The man page for lastb says if you just complete delete /var/log/btmp the system shouldn't recreate it on its own.
That is the simplest answer.
i have done this for now, but the initscripts rpm will recreate it for me if it updates (how helpful :-). i should probably whine upstream that nothing rotates the btmp file.