Re: [gentoo-user] chage can't open /etc/passwd [SOLVED]

2007-09-18 Thread Albert Hopkins
On Tue, 2007-09-18 at 23:01 -0300, Norberto Bensa wrote: > Or with your CFLAGS: > > [EMAIL PROTECTED] ~ $ cat /proc/cpuinfo | grep ^model\ name | head -n 1 > model name : AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ > > [EMAIL PROTECTED] ~ $ grep CFLAG /etc/make.conf > CFLAGS="-march=athl

Re: [gentoo-user] chage can't open /etc/passwd [SOLVED]

2007-09-18 Thread Steen Eugen Poulsen
Norberto Bensa skrev: Quoting Albert Hopkins <[EMAIL PROTECTED]>: On Tue, 2007-09-18 at 18:56 -0500, Albert Hopkins wrote: Well, I hate to sound like a ricer, but apparently it's my CFLAGS :| CFLAGS="-O2 -march=k8 -msse3 -ggdb -pipe -fomit-frame-pointer" I have an Athlon 64 X2, Hmmm

Re: [gentoo-user] chage can't open /etc/passwd [SOLVED]

2007-09-18 Thread Norberto Bensa
Quoting Albert Hopkins <[EMAIL PROTECTED]>: Seems to be a problem with GCC. Or with your CFLAGS: [EMAIL PROTECTED] ~ $ cat /proc/cpuinfo | grep ^model\ name | head -n 1 model name : AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ [EMAIL PROTECTED] ~ $ grep CFLAG /etc/make.conf CFLAGS="-

Re: [gentoo-user] chage can't open /etc/passwd [SOLVED]

2007-09-18 Thread Albert Hopkins
On Tue, 2007-09-18 at 20:16 -0500, Albert Hopkins wrote: > No, doesn't work. I'm going to try downgrading GCC (w/o any > optimizations), re-compiling shadow with my original CFLAGS and see > what > happens. # grep ^CFLAGS /etc/make.conf CFLAGS="-O2 -march=k8 -msse3 -ggdb -pipe -fomit-frame-point

Re: [gentoo-user] chage can't open /etc/passwd [SOLVED]

2007-09-18 Thread Albert Hopkins
On Tue, 2007-09-18 at 22:08 -0300, Norberto Bensa wrote: > Hmmm... I have one of those. Try: > > CFLAGS="-march=athlon64 -O2 -fomit-frame-pointer -pipe" > No, doesn't work. I'm going to try downgrading GCC (w/o any optimizations), re-compiling shadow with my original CFLAGS and see what happens

Re: [gentoo-user] chage can't open /etc/passwd [SOLVED]

2007-09-18 Thread Norberto Bensa
Quoting Albert Hopkins <[EMAIL PROTECTED]>: On Tue, 2007-09-18 at 18:56 -0500, Albert Hopkins wrote: Well, I hate to sound like a ricer, but apparently it's my CFLAGS :| CFLAGS="-O2 -march=k8 -msse3 -ggdb -pipe -fomit-frame-pointer" I have an Athlon 64 X2, Hmmm... I have one of those

Re: [gentoo-user] chage can't open /etc/passwd [SOLVED]

2007-09-18 Thread Albert Hopkins
On Tue, 2007-09-18 at 18:56 -0500, Albert Hopkins wrote: [...] > I think i'm going to have to use gdb (yeck) and > step through the program. Well, I hate to sound like a ricer, but apparently it's my CFLAGS :| CFLAGS="-O2 -march=k8 -msse3 -ggdb -pipe -fomit-frame-pointer" I have an Athlo

Re: [gentoo-user] chage can't open /etc/passwd

2007-09-18 Thread Albert Hopkins
On Tue, 2007-09-18 at 20:32 -0300, Norberto Bensa wrote: > I almost know the reply to this one, but it won't hurt: > > LC_ALL=C chage -l marduk Yeah, I've already tried that. It didn't make a difference. I've also tried compiling shadow/pam with/without NLS support and shadow without PAM suppo

Re: [gentoo-user] chage can't open /etc/passwd

2007-09-18 Thread Norberto Bensa
Albert Hopkins wrote: > I'm running out of ideas.  This used to work up until about a month ago. I almost know the reply to this one, but it won't hurt: LC_ALL=C chage -l marduk -- [EMAIL PROTECTED] mailing list

Re: [gentoo-user] chage can't open /etc/passwd

2007-09-18 Thread Albert Hopkins
Ok the mystery continues. On another box, strider, "chage -l" works so this is what I did (don't try this at home): $ mkdir /tmp/strider_passwd $ scp strider:/etc/passwd /tmp/strider_passwd $ scp strider:/etc/shadow /tmp/strider_passwd $ mv /etc/passwd /etc/passwd.o

Re: [gentoo-user] chage can't open /etc/passwd

2007-09-18 Thread Albert Hopkins
On Tue, 2007-09-18 at 10:14 +0200, Etaoin Shrdlu wrote: > As Norberto said, can you post the full output of "strace chage -l > marduk" run *as root* (ie, not with sudo)? By popular demand... execve("/usr/bin/chage", ["chage", "-l", "marduk"], [/* 65 vars */]) = 0 brk(0)

Re: [gentoo-user] chage can't open /etc/passwd

2007-09-18 Thread Albert Hopkins
On Tue, 2007-09-18 at 10:14 +0200, Etaoin Shrdlu wrote: > > Note the "chage: PAM authentication failed" *only* occurs when I run > > under strace and only then when I run as a user. > > This is normal, since the suid is ignored when the program is > straced. Yes, that makes complete sense now th

Re: [gentoo-user] chage can't open /etc/passwd

2007-09-18 Thread Etaoin Shrdlu
On Tuesday 18 September 2007, Albert Hopkins wrote: > open("/etc/passwd", O_RDONLY)           = 3 > open("/etc/shadow", O_RDONLY) = 3 > chage: can't open password file Since the opens succeed, this must be some other kind of error. Looking at the sources could possibily help here. In c

Re: [gentoo-user] chage can't open /etc/passwd

2007-09-18 Thread Etaoin Shrdlu
On Tuesday 18 September 2007, Albert Hopkins wrote: > Note the "chage: PAM authentication failed" *only* occurs when I run > under strace and only then when I run as a user. This is normal, since the suid is ignored when the program is straced. As Norberto said, can you post the full output of

Re: [gentoo-user] chage can't open /etc/passwd

2007-09-17 Thread Norberto Bensa
Quoting Albert Hopkins <[EMAIL PROTECTED]>: open("/lib/security/pam_deny.so", O_RDONLY) = 4 open("/etc/passwd", O_RDONLY) = 3 open("/etc/shadow", O_RDONLY) = -1 EACCES (Permission denied) chage: PAM authentication failed That's normal. You're running chage from strace ;)

Re: [gentoo-user] chage can't open /etc/passwd

2007-09-17 Thread Albert Hopkins
On Mon, 2007-09-17 at 23:15 -0300, Norberto Bensa wrote: > Can you post sudo strace -eopen chage -l marduk ? $ whoami marduk $ chage -l marduk chage: can't open password file $ strace -eopen chage -l marduk open("/etc/ld.so.cache", O_RDONLY) = 3 open("/lib/libcrypt.so.1", O_RDONLY)= 3

Re: [gentoo-user] chage can't open /etc/passwd

2007-09-17 Thread Norberto Bensa
Albert Hopkins wrote: > > Regardless of root/non-root I get "chage: can't open password file" Can you cat /etc/passwd? Can you >>/etc/passwd (note it's a double > ) ? Have you ran fsck on / ? Do you run some form of SELinux? Regards, Norberto -- [EMAIL PROTECTED] mailing list

Re: [gentoo-user] chage can't open /etc/passwd

2007-09-17 Thread Albert Hopkins
On Mon, 2007-09-17 at 23:09 +0200, Etaoin Shrdlu wrote: > This is different from what you said before. You said that running as > root or as an user made no difference, and in both cases you were > getting "can't open password file". > You never mentioned a "permission > denied" Permission de

Re: [gentoo-user] chage can't open /etc/passwd

2007-09-17 Thread Albert Hopkins
On Mon, 2007-09-17 at 21:08 +0100, Peter Ruskin wrote: > Check your perms for gshadow: > > $ /bin/ls > -l /etc/passwd* /etc/shadow* /etc/group* /etc/gshadow* /usr/bin/chage > -rw-r--r-- 1 root root 1646 2007-04-14 00:45 /etc/group > -rw--- 1 root root 1630 2007-04-01 11:04 /etc/group- > -rw-

Re: [gentoo-user] chage can't open /etc/passwd

2007-09-17 Thread Etaoin Shrdlu
On Monday 17 September 2007, Albert Hopkins wrote: > On Mon, 2007-09-17 at 21:48 +0200, Etaoin Shrdlu wrote: > > What does stracing the program show? > > As root it does an open("/etc/passwd", O_RDONLY) twice. Both times it > gets a file handle. > > As user, same thing, but it also tries to open /

Re: [gentoo-user] chage can't open /etc/passwd

2007-09-17 Thread Albert Hopkins
On Mon, 2007-09-17 at 21:48 +0200, Etaoin Shrdlu wrote: > What does stracing the program show? As root it does an open("/etc/passwd", O_RDONLY) twice. Both times it gets a file handle. As user, same thing, but it also tries to open /etc/shadow RDONLY and, of course, gets a "Permission denied".

Re: [gentoo-user] chage can't open /etc/passwd

2007-09-17 Thread Etaoin Shrdlu
On Monday 17 September 2007, Albert Hopkins wrote: > On Mon, 2007-09-17 at 13:30 -0400, Ryan Sims wrote: > > This is just triage, but what are the permissions on /etc/passwd? > > $ /bin/ls > -l /etc/passwd* /etc/shadow* /etc/group* /etc/gshadow* /usr/bin/chage > -rw-r--r-- 1 root root 1404 2007-09

Re: [gentoo-user] chage can't open /etc/passwd

2007-09-17 Thread Albert Hopkins
On Mon, 2007-09-17 at 13:30 -0400, Ryan Sims wrote: > This is just triage, but what are the permissions on /etc/passwd? $ /bin/ls -l /etc/passwd* /etc/shadow* /etc/group* /etc/gshadow* /usr/bin/chage -rw-r--r-- 1 root root 1404 2007-09-08 17:39 /etc/group -rw--- 1 root root 1389 2007-06-30

Re: [gentoo-user] chage can't open /etc/passwd

2007-09-17 Thread Etaoin Shrdlu
On Monday 17 September 2007, Albert Hopkins wrote: > I've been having this problem on one of my machines for a while. As a > user or as root I cannot run chage: > > $ chage -l marduk > chage: can't open password file > > I've looked at /etc/passwd*, /etc/shadow* /etc/group* and > /

Re: [gentoo-user] chage can't open /etc/passwd

2007-09-17 Thread Ryan Sims
On 9/17/07, Albert Hopkins <[EMAIL PROTECTED]> wrote: > I've been having this problem on one of my machines for a while. As a > user or as root I cannot run chage: > > $ chage -l marduk > chage: can't open password file > > I've looked at /etc/passwd*, /etc/shadow* /etc/group* and

[gentoo-user] chage can't open /etc/passwd

2007-09-17 Thread Albert Hopkins
I've been having this problem on one of my machines for a while. As a user or as root I cannot run chage: $ chage -l marduk chage: can't open password file I've looked at /etc/passwd*, /etc/shadow* /etc/group* and /etc/gshadow* and all the permissions look fine. It works on othe