LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 03-02-2006, 12:40 PM   #1
berzerked
LQ Newbie
 
Registered: Jun 2004
Posts: 4

Rep: Reputation: 0
/var/log/wtmp Permissions


*******RedHat Enterprise Server 4*******

From what I've read, the permissions for /var/log/wtmp need to be changed from the default 664 to a more secure 644. The problem is that logins are not written to the wtmp file after I change perms. Any idea as to why?

ls -l /var/log

-rw-rw-r-- 1 root utmp 3840 Mar 2 13:37 wtmp (works)

-rw-r--r-- 1 root utmp 3840 Mar 2 13:37 wtmp (not works)

Last edited by berzerked; 03-02-2006 at 12:41 PM.
 
Old 03-02-2006, 01:28 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
The utmp process needs to be able to write to the file. It's not less secure the way you have it since none of your users should be members of the utmp group.

Removing the write permissions for a group only makes the file more secure when you have group members...
 
Old 03-02-2006, 01:47 PM   #3
berzerked
LQ Newbie
 
Registered: Jun 2004
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for the Help......

Keeping the perms at 664 is what I'll do as there are no other users in the utmp group.
 
Old 10-05-2011, 02:49 PM   #4
lqrobert
LQ Newbie
 
Registered: Oct 2011
Distribution: RedHat
Posts: 3

Rep: Reputation: Disabled
/var/log/wtmp Permissions - logrotate

/var/log/utmp and /var/log/wtmp have their permissions and groups set in at least two places on RedHat 5.4:

1. /etc/logrotate.conf sets the permissions and ownership to 664 root utmp.

2. /etc/rc.d/rc.sysinit sets the permissions and ownership of /var/run/utmp and /var/log/wtmp to 0664 root:utmp respectively.

I believe these files have utmp ownership so they can be modified by /usr/libexec/utempter/utempter which has permissions 2711, i.e. -rwx--s--x. That SGID bit allows all users to act with as if they belong to utmp. Hence, unless you chmod 0711 /usr/libexec/utempter/utempter ALL users belong to the utmp group as far as utempter is concerned.

It's my understanding that utempter allows certain utilities, e.g. screen and X Windows utilities, to update the last login information stored in wtmp.

Not a definitive answer, but I hope this helps anyone who happens to stumble across this.

Last edited by lqrobert; 10-05-2011 at 03:21 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/var/log/wtmp mrant Linux - Security 4 07-14-2013 08:41 PM
/var/log/wtmp ??? fatrandy13 Linux - Software 3 12-13-2004 09:07 AM
/var/log/wtmp praveenv Linux - Newbie 5 08-23-2004 02:48 PM
cleaning up /var/adm/wtmp Risc91 AIX 5 08-23-2004 09:52 AM
wierd characters in /var/log/wtmp mindfestival Linux - Newbie 2 04-22-2004 01:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 10:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration