FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 12-16-2010, 05:29 PM
Joe Pruett
 
Default /dev/null permission changes figured out

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?


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-16-2010, 06:14 PM
Benjamin Franz
 
Default /dev/null permission changes figured out

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.

--
Benjamin Franz

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-16-2010, 06:17 PM
Benjamin Franz
 
Default /dev/null permission changes figured out

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.

--
Benjamin Franz

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-16-2010, 08:11 PM
Stephen Harris
 
Default /dev/null permission changes figured out

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

--

rgds
Stephen
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 12-17-2010, 06:48 PM
Joe Pruett
 
Default /dev/null permission changes figured out

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.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 04:01 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org