From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1IXZ3r-0001DU-Mt for garchives@archives.gentoo.org; Tue, 18 Sep 2007 09:08:04 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.0/8.14.0) with SMTP id l8I8x7kW017803; Tue, 18 Sep 2007 08:59:07 GMT Received: from dcnode-01.unlimitedmail.net (139.Red-80-26-111.staticIP.rima-tde.net [80.26.111.139]) by robin.gentoo.org (8.14.0/8.14.0) with ESMTP id l8I8shqh012947 for ; Tue, 18 Sep 2007 08:54:47 GMT Received: from ppp.zz ([137.204.208.98]) (authenticated bits=0) by dcnode-01.unlimitedmail.net (8.14.0/8.14.0) with ESMTP id l8I8sb8V017651 for ; Tue, 18 Sep 2007 10:54:37 +0200 From: Etaoin Shrdlu To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] chage can't open /etc/passwd Date: Tue, 18 Sep 2007 11:05:23 +0200 User-Agent: KMail/1.9.7 References: <1190041963.18545.13.camel@localhost> <20070917231502.lbzd6wg9wwkwccos@mail.bensa.ar> <1190084386.29708.6.camel@blackwidow.nbk> In-Reply-To: <1190084386.29708.6.camel@blackwidow.nbk> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200709181105.24193.shrdlu@unlimitedmail.org> X-UnlimitedMail-MailScanner: Found to be clean X-UnlimitedMail-MailScanner-From: shrdlu@unlimitedmail.org X-Spam-Status: No X-Archives-Salt: c6aeff8b-c1e6-4a27-8659-f7db1d24fd21 X-Archives-Hash: 77adcd85c1b77515ec49eaa5fb2f5490 On Tuesday 18 September 2007, Albert Hopkins wrote: > open("/etc/passwd", O_RDONLY) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D 3 > open("/etc/shadow", O_RDONLY) =3D 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 chage.c, the message is printed if the function pw_open() returns a=20 nonzero value. =46ollowing che chain of function calls, we arrive at commonio_open()=20 (inside commonio.c). That function can fail for various reasons. The=20 file is opened correctly, so the error has to be searched after the=20 fopen(). Excluding failure of the various memory-allocation functions,=20 the other likely possibilities involve some failure during parsing=20 (which here is done manually, not with the usual getpwent() and co.).=20 Double check your /etc/passwd and /etc/shadow for syntactical=20 correctness. I'd ask you to remove sensible information and post them=20 here, but the cleanup could possibly also remove the information that=20 chage's parser doesn't like, so check them on your own. -- gentoo-user@gentoo.org mailing list