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

Re: passwd segfaulting



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

> On Sun, Feb 03, 2002 at 06:53, whbell@bell-cs.com wrote:
> > Hello,
> 
>   Hi,
> 
> > I am running up to date woody on a small firewall box.  I have had
> this problem 
> > for some time where passwd ALWAYS segfaults when it is called.  I have
> searched 
> > archives, looked at the /etc/passwd to see if it may be corrupt.  I
> have 
> > password shadowing turned on and cannot find any problems in the
> shadow files.
> > 
> > Please help me.  I need some ideas on were to look next for this
> problem.
> 
>   I recently had the same problem after editing /etc/passwd manually.
> It
>   turns out I had forgotten a ":" after an empty gecos field. Check
>   carefully if all the lines are correct.
>   What does 'getent passwd' says ? What does 'strace passwd' says ?
> 
> -- 
> Eric-Olivier Lamey
> 
> 
> -- 

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?

Thanks for the help.

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

--
tigger:/etc# getent passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/bin/sh
bin:x:2:2:bin:/bin:/bin/sh
sys:x:3:3:sys:/dev:/bin/sh
sync:x:4:100:sync:/bin:/bin/sync
games:x:5:100:games:/usr/games:/bin/sh
man:x:6:100:man:/var/cache/man:/bin/sh
lp:x:7:7:lp:/var/spool/lpd:/bin/sh
mail:x:8:8:mail:/var/mail:/bin/sh
news:x:9:9:news:/var/spool/news:/bin/sh
uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:x:13:13:proxy:/bin:/bin/sh
majordom:x:30:31:Majordomo:/usr/lib/majordomo:/bin/sh
postgres:x:31:32:postgres:/var/lib/postgres:/bin/sh
www-data:x:33:33:www-data:/var/www:/bin/sh
backup:x:34:34:backup:/var/backups:/bin/sh
msql:x:36:36:Mini SQL Database Manager:/var/lib/msql:/bin/sh
operator:x:37:37:Operator:/var:/bin/sh
list:x:38:38:SmartList:/var/list:/bin/sh
irc:x:39:39:ircd:/var:/bin/sh
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats/gnats-db:/bin/sh
identd:x:100:65534::/var/run/identd:/bin/false
cyrus:x:101:8:Cyrus User,,,:/var/spool/cyrus:/bin/false
snort:x:102:101:Snort IDS:/var/log/snort:/bin/false
mysql:x:103:102:MySQL Server:/var/lib/mysql:/bin/false
reboot:x:1000:1000:dog,,,:/home/reboot:/bin/bash
grlind:x:1001:1001:Gregg,,,:/home/grlind:/bin/bash
nobody:x:65534:65534:nobody:/home:/bin/sh
tigger:/etc#
tigger:~# strace passwd
execve("/usr/bin/passwd", ["passwd"], [/* 14 vars */]) = 0
uname({sys="Linux", node="tigger", ...}) = 0
brk(0)                                  = 0x804f120
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, 0xbfffef24)                  = -1 ENOSYS (Function not implemented)
fstat(3, {st_mode=S_IFREG|0644, st_size=16024, ...}) = 0
old_mmap(NULL, 16024, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40016000
close(3)                                = 0
open("/lib/libcrypt.so.1", O_RDONLY)    = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200\20"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0644, st_size=20900, ...}) = 0
old_mmap(NULL, 183740, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4001a000
mprotect(0x4001f000, 163260, PROT_NONE) = 0
old_mmap(0x4001f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x4000) = 0x4001f000
old_mmap(0x40020000, 159164, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40020000
close(3)                                = 0
open("/lib/libpam.so.0", O_RDONLY)      = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\24"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0644, st_size=29420, ...}) = 0
old_mmap(NULL, 32428, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40047000
mprotect(0x4004e000, 3756, PROT_NONE)   = 0
old_mmap(0x4004e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x6000) = 0x4004e000
close(3)                                = 0
open("/lib/libpam_misc.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\f\0"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0644, st_size=7500, ...}) = 0
old_mmap(NULL, 10508, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4004f000
mprotect(0x40051000, 2316, PROT_NONE)   = 0
old_mmap(0x40051000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1000) = 0x40051000
close(3)                                = 0
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\244\34"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0644, st_size=9436, ...}) = 0
old_mmap(NULL, 12364, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40052000
mprotect(0x40054000, 4172, PROT_NONE)   = 0
old_mmap(0x40054000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x1000) = 0x40054000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0(\327\1"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0755, st_size=1171196, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40056000
old_mmap(NULL, 1187968, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40057000
mprotect(0x4016f000, 41088, PROT_NONE)  = 0
old_mmap(0x4016f000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x117000) = 0x4016f000
old_mmap(0x40175000, 16512, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40175000
close(3)                                = 0
munmap(0x40016000, 16024)               = 0
brk(0)                                  = 0x804f120
brk(0x804f148)                          = 0x804f148
brk(0x8050000)                          = 0x8050000
getuid32()                              = -1 ENOSYS (Function not implemented)
getuid()                                = 0
ioctl(0, SNDCTL_TMR_TIMEBASE, {B38400 opost isig icanon echo ...}) = 0
readlink("/proc/self/fd/0", "/dev/pts/1", 511) = 10
access("/var/run/utmpx", F_OK)          = -1 ENOENT (No such file or directory)
open("/var/run/utmp", O_RDWR)           = 3
fcntl64(3, F_GETFD)                     = -1 ENOSYS (Function not implemented)
fcntl(3, F_GETFD)                       = 0
fcntl(3, F_SETFD, FD_CLOEXEC)           = 0
_llseek(3, 0, [0], SEEK_SET)            = 0
alarm(0)                                = 0
rt_sigaction(SIGALRM, {0x401501e0, [], 0x4000000}, {SIG_DFL}, 8) = 0
alarm(1)                                = 0
fcntl(3, F_SETLKW, {type=F_RDLCK, whence=SEEK_SET, start=0, len=0}) = 0
read(3, "\10\0\0\0\6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384
read(3, "\2\0\0\0\0\0\0\0~\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384
read(3, "\1\0\0\0002N\0\0~\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384
read(3, "\10\0\0\0\236\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384
read(3, "\6\0\0\0x\2\0\0tty1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384
read(3, "\6\0\0\0y\2\0\0tty2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384
read(3, "\6\0\0\0z\2\0\0tty3\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384
read(3, "\6\0\0\0{\2\0\0tty4\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384
read(3, "\6\0\0\0|\2\0\0tty5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384
read(3, "\6\0\0\0}\2\0\0tty6\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384
read(3, "\7\0\0\0\301-\0\0pts/0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384
read(3, "\7\0\0\0\314G\0\0pts/1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 384) = 384
fcntl(3, F_SETLKW, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
rt_sigaction(SIGALRM, {SIG_DFL}, NULL, 8) = 0
alarm(0)                                = 1
close(3)                                = 0
getuid()                                = 0
socket(PF_UNIX, SOCK_STREAM, 0)         = 3
connect(3, {sin_family=AF_UNIX, path="/var/run/.nscd_socket"}, 110) = -1 ECONNREFUSED (Connection refused)
close(3)                                = 0
open("/etc/nsswitch.conf", O_RDONLY)    = 3
fstat64(3, 0xbffff7cc)                  = -1 ENOSYS (Function not implemented)
fstat(3, {st_mode=S_IFREG|0644, st_size=465, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40016000
read(3, "# /etc/nsswitch.conf\n#\n# Example"..., 4096) = 465
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0x40016000, 4096)                = 0
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=16024, ...}) = 0
old_mmap(NULL, 16024, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40016000
close(3)                                = 0
open("/lib/libnss_compat.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200\33"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0644, st_size=41660, ...}) = 0
old_mmap(NULL, 44696, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4017a000
mprotect(0x40184000, 3736, PROT_NONE)   = 0
old_mmap(0x40184000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x9000) = 0x40184000
close(3)                                = 0
open("/lib/libnsl.so.1", O_RDONLY)      = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0B\0\000"..., 1024) = 1024
fstat(3, {st_mode=S_IFREG|0644, st_size=71268, ...}) = 0
old_mmap(NULL, 82716, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40185000
mprotect(0x40196000, 13084, PROT_NONE)  = 0
old_mmap(0x40196000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x10000) = 0x40196000
old_mmap(0x40198000, 4892, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40198000
close(3)                                = 0
munmap(0x40016000, 16024)               = 0
uname({sys="Linux", node="tigger", ...}) = 0
brk(0x8051000)                          = 0x8051000
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
close(3)                                = 0
munmap(0x40016000, 4096)                = 0
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
close(3)                                = 0
munmap(0x40016000, 4096)                = 0
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
close(3)                                = 0
munmap(0x40016000, 4096)                = 0
getrlimit(0x4, 0xbffffa64)              = -1 ENOSYS (Function not implemented)
setrlimit(RLIMIT_CORE, {rlim_cur=0, rlim_max=0}) = 0
setrlimit(RLIMIT_AS, {rlim_cur=2147483647, rlim_max=2147483647}) = 0
setrlimit(RLIMIT_CPU, {rlim_cur=2147483647, rlim_max=2147483647}) = 0
setrlimit(RLIMIT_DATA, {rlim_cur=2147483647, rlim_max=2147483647}) = 0
setrlimit(RLIMIT_FSIZE, {rlim_cur=2147483647, rlim_max=2147483647}) = 0
setrlimit(RLIMIT_NOFILE, {rlim_cur=2147483647, rlim_max=2147483647}) = -1 EPERM (Operation not permitted)
setrlimit(RLIMIT_RSS, {rlim_cur=2147483647, rlim_max=2147483647}) = 0
setrlimit(RLIMIT_STACK, {rlim_cur=2147483647, rlim_max=2147483647}) = 0
rt_sigaction(SIGALRM, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGHUP, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTERM, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTSTP, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTTOU, {SIG_IGN}, {SIG_DFL}, 8) = 0
umask(077)                              = 022
stat("/etc/pam.d", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/etc/pam.d/passwd", O_RDONLY)     = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=1221, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40016000
read(3, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 1221
brk(0x8054000)                          = 0x8054000
time([1012747407])                      = 1012747407
open("/etc/localtime", O_RDONLY)        = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=1279, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40017000
read(4, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\5\0\0\0\5\0"..., 4096) = 1279
close(4)                                = 0
munmap(0x40017000, 4096)                = 0
getpid()                                = 18405
rt_sigaction(SIGPIPE, {0x40128578, [], 0x4000000}, {SIG_IGN}, 8) = 0
socket(PF_UNIX, SOCK_DGRAM, 0)          = 4
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
connect(4, {sin_family=AF_UNIX, path="/dev/log"}, 16) = 0
send(4, "<83>Feb  3 08:43:27 passwd[18405"..., 100, 0) = 100
rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
tigger:~#

Reply to: