From: Etaoin Shrdlu <shrdlu@unlimitedmail.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] chage can't open /etc/passwd
Date: Mon, 17 Sep 2007 23:09:10 +0200 [thread overview]
Message-ID: <200709172309.11576.shrdlu@unlimitedmail.org> (raw)
In-Reply-To: <1190061019.15444.44.camel@localhost>
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 /etc/shadow RDONLY and,
> of course, gets a "Permission denied".
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" error, which seems correct when running as a regular user.
On my box, running chage as a regular user fails with "permission
denied", but it's not related to /etc/shadow permissions. Instead
(looking at the strace and at the sources), chage checks the real UID of
the user and terminates if it's not 0 and the user requests to change
the info (instead of just listing it with -l). It does not even touch
any file.
So, if you see chage trying to open /etc/shadow when running as a regular
user, something must be broken or wrong. What version of shadow are you
using? Mine is shadow-4.0.18.1-r1.
> There is also a
>
> write(2, "chage: PAM authentication failed"..., 33chage: PAM
> authentication failed) = 33
>
> But I've never seen this on my terminal when running w/o strace.
How does your /etc/pam.d/chage look like?
Here is mine:
[Mon Sep 17 21:41:13 root@kermit ~]# cat /etc/pam.d/chage
#%PAM-1.0
auth sufficient pam_rootok.so
auth required pam_permit.so
account include system-auth
password required pam_permit.so
--
gentoo-user@gentoo.org mailing list
next prev parent reply other threads:[~2007-09-17 21:14 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-17 15:12 [gentoo-user] chage can't open /etc/passwd Albert Hopkins
2007-09-17 17:30 ` Ryan Sims
2007-09-17 19:15 ` Albert Hopkins
2007-09-17 19:48 ` Etaoin Shrdlu
2007-09-17 20:30 ` Albert Hopkins
2007-09-17 21:09 ` Etaoin Shrdlu [this message]
2007-09-17 21:37 ` Albert Hopkins
2007-09-17 23:17 ` Norberto Bensa
[not found] ` <1190075689.7101.8.camel@blackwidow.nbk>
[not found] ` <20070917231502.lbzd6wg9wwkwccos@mail.bensa.ar>
2007-09-18 2:59 ` Albert Hopkins
2007-09-18 3:14 ` Norberto Bensa
2007-09-18 8:14 ` Etaoin Shrdlu
2007-09-18 14:04 ` Albert Hopkins
2007-09-18 14:07 ` Albert Hopkins
2007-09-18 21:27 ` Albert Hopkins
2007-09-18 23:32 ` Norberto Bensa
2007-09-18 23:56 ` Albert Hopkins
2007-09-19 0:56 ` [gentoo-user] chage can't open /etc/passwd [SOLVED] Albert Hopkins
2007-09-19 1:08 ` Norberto Bensa
2007-09-19 1:16 ` Albert Hopkins
2007-09-19 1:47 ` Albert Hopkins
2007-09-19 2:01 ` Norberto Bensa
2007-09-19 2:33 ` Albert Hopkins
2007-09-19 2:00 ` Steen Eugen Poulsen
2007-09-18 9:05 ` [gentoo-user] chage can't open /etc/passwd Etaoin Shrdlu
2007-09-17 17:57 ` Etaoin Shrdlu
2007-09-17 20:08 ` Peter Ruskin
2007-09-17 20:32 ` Albert Hopkins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200709172309.11576.shrdlu@unlimitedmail.org \
--to=shrdlu@unlimitedmail.org \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox