Bug 166682 - pam_tally can not write to /var/log/faillog
pam_tally can not write to /var/log/faillog
Status: CLOSED DUPLICATE of bug 133854
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: pam (Show other bugs)
4.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tomas Mraz
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-08-24 12:07 EDT by Stephen John Smoogen
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-08-24 15:25:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Stephen John Smoogen 2005-08-24 12:07:39 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050719 Red Hat/1.0.6-1.4.1 Firefox/1.0.6

Description of problem:
using pam_tally to log faillog causes xscreensaver not to be able to validate the user. this may be user error, but am following the examples from the README.



Version-Release number of selected component (if applicable):
pam-0.77-66.10

How reproducible:
Always

Steps to Reproduce:
1. Create faillog
     touch /var/log/faillog;
     chown root:root /var/log/faillog;
     chmod 0400 /var/log/faillog; #matches /var/log/lastlog
2. Add lines to /etc/pam.d/system-auth

#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth        required      /lib/security/$ISA/pam_tally.so onerr=fail no_magic_root
auth        required      /lib/security/$ISA/pam_env.so
auth        sufficient    /lib/security/$ISA/pam_unix.so likeauth nullok
auth        required      /lib/security/$ISA/pam_deny.so

account     required      /lib/security/$ISA/pam_unix.so
account     sufficient    /lib/security/$ISA/pam_succeed_if.so uid < 100 quiet
account     required      /lib/security/$ISA/pam_tally.so reset no_magic_root
account     required      /lib/security/$ISA/pam_permit.so

password    requisite     /lib/security/$ISA/pam_cracklib.so retry=3
password    sufficient    /lib/security/$ISA/pam_unix.so nullok use_authtok md5 shadow
password    required      /lib/security/$ISA/pam_deny.so

session     required      /lib/security/$ISA/pam_limits.so
session     required      /lib/security/$ISA/pam_unix.so

3. log in as user. lock the screen, try in vain to unlock the screen:

Aug 24 09:56:09 saix15616 pam_tally[3779]: Error opening /var/log/faillog for update

Changing the permission of /var/log/faillog to 0600 did not help.
  

Additional info:

here is the auditd info about this command. I am expecting it is xscreensaver is not running in some sort of priveledged mode. I am expecting the same thing would happen with vlock and other locking systems. 

----
type=PATH msg=audit(08/24/05 09:56:20.121:7044) : name=/var/log/faillog flags=follow,open inode=2783444 dev=fd:00 mode=file,400 ouid=root ogid=root rdev=00:00
type=CWD msg=audit(08/24/05 09:56:20.121:7044) :  cwd=/
type=FS_INODE msg=audit(08/24/05 09:56:20.121:7044) : inode=2783444 inode_uid=root inode_gid=root inode_dev=fd:00 inode_rdev=00:00
type=FS_WATCH msg=audit(08/24/05 09:56:20.121:7044) : watch_inode=2783444 watch=faillog filterkey=LOG_faillog perm= perm_mask=read,write
type=SYSCALL msg=audit(08/24/05 09:56:20.121:7044) : arch=i386 syscall=open success=no exit=-13(Permission denied) a0=bfe9ab10 a1=2 a2=1b6 a3=2 items=1 pid=3779 auid=unknown(4294967295) uid=sjsmoog gid=sjsmoog euid=sjsmoog suid=sjsmoog fsuid=sjsmoog egid=sjsmoog sgid=sjsmoog fsgid=sjsmoog comm=xscreensaver exe=/usr/X11R6/bin/xscreensaver
----
type=PATH msg=audit(08/24/05 09:56:22.086:7048) : name=/var/log/faillog flags=follow,open inode=2783444 dev=fd:00 mode=file,400 ouid=root ogid=root rdev=00:00
type=CWD msg=audit(08/24/05 09:56:22.086:7048) :  cwd=/
type=FS_INODE msg=audit(08/24/05 09:56:22.086:7048) : inode=2783444 inode_uid=root inode_gid=root inode_dev=fd:00 inode_rdev=00:00
type=FS_WATCH msg=audit(08/24/05 09:56:22.086:7048) : watch_inode=2783444 watch=faillog filterkey=LOG_faillog perm= perm_mask=read,write
type=SYSCALL msg=audit(08/24/05 09:56:22.086:7048) : arch=i386 syscall=open success=no exit=-13(Permission denied) a0=bfe9ab10 a1=2 a2=1b6 a3=2 items=1 pid=3779 auid=unknown(4294967295) uid=sjsmoog gid=sjsmoog euid=sjsmoog suid=sjsmoog fsuid=sjsmoog egid=sjsmoog sgid=sjsmoog fsgid=sjsmoog comm=xscreensaver exe=/usr/X11R6/bin/xscreensaver
----
Comment 1 Stephen John Smoogen 2005-08-24 15:25:43 EDT

*** This bug has been marked as a duplicate of 133854 ***

Note You need to log in before you can comment on or make changes to this bug.