[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: passwd segfaulting <Sovled>



Quoting Eric-Olivier Lamey <eric-olivier.lamey@wired-brain.com>:

> On Sun, Feb 03, 2002 at 02:42, Bill Bell wrote:
> > I have included output from getent and strace.  I looked through 
> > the /etc/passwd file trying to find any errors as you describe, (no
> luck yet).  
> > I am not sure how the /etc/passwd-, /etc/shadow and /etc/shadow- files
> play 
> > into this.  Is it possible that one of these files could contain the
> error that 
> > would cause this segfault?
> 
>   I don't think /etc/passwd- and /etc/shadow- are even opened by
>   'passwd'.
>   The output from 'getent' seems to be correct. The 'strace' output is
>   weird:
> 
> > open("/etc/passwd", O_RDONLY)           = 3
> > fcntl(3, F_GETFD)                       = 0
> > fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
> > fstat(3, {st_mode=S_IFREG|0644, st_size=1251, ...}) = 0
> > old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
> -1, 0) = 0x40016000
> > _llseek(3, 0, [0], SEEK_CUR)            = 0
> > read(3, "root:Xy13e.n9hX7WU:0:0:root:/roo"..., 4096) = 1251
> 
>   Hmmm, it seems that your /etc/passwd contains your encrypted root
>   password. If I 'strace passwd' on my computer (running sid), I never
>   get a line like that, always 'root:x:0:0:...".
>   It doesn't even seem to open '/etc/shadow', I don't understand. What
>   is the content of your /etc/nsswitch.conf, /etc/pam.d/other and
>   /etc/pam.d/passwd files ?
> 
> -- 
> Eric-Olivier Lamey
> 

I started compairing these files you listed above between my Sid machine 
(working) and the broken Woody box. I found that /etc/pam.d/passed was an exact 
copy of /etc/passwd on the Woody box.  The Sid box had a totally 
different /etc/pam.d/passwd file (attached).  On the Woody box I found the 
correct backup file in /etc/pam.d/passwd.orig.  I moved this 
into /etc/pam.d/passwd and all is well!  Perhaps one of the Woody updates broke 
this file at some time in the past.

Thanks for the help.

tigger:/etc/pam.d# cat passwd
#
# The PAM configuration file for the Shadow `passwd' service
#

# The standard Unix authentication modules, used with NIS (man nsswitch) as
# well as normal /etc/passwd and /etc/shadow entries. For the login service,
# this is only used when the password expires and must be changed, so make
# sure this one and the one in /etc/pam.d/login are the same. The "nullok"
# option allows users to change an empty password, else empty passwords are
# treated as locked accounts.
#
# (Add `md5' after the module name to enable MD5 passwords the same way that
# `MD5_CRYPT_ENAB' would do under login.defs).
#
# The "obscure" option replaces the old `OBSCURE_CHECKS_ENAB' option in
# login.defs. Also the "min" and "max" options enforce the length of the
# new password.

password   required   pam_unix.so nullok obscure min=4 max=8

# Alternate strength checking for password. Note that this
# requires the libpam-cracklib package to be installed.
# You will need to comment out the password line above and
# uncomment the next two in order to use this.
# (Replaces the `OBSCURE_CHECKS_ENAB', `CRACKLIB_DICTPATH')
#
# password required       pam_cracklib.so retry=3 minlen=6 difok=3
# password required       pam_unix.so use_authtok nullok md5


--
Bill
C.R.E.A.M.  Dark Angel



Reply to: