From owner-freebsd-questions@FreeBSD.ORG Tue Mar 25 23:59:30 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 80AC037B404 for ; Tue, 25 Mar 2003 23:59:30 -0800 (PST) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FE1443F3F for ; Tue, 25 Mar 2003 23:59:29 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) h2Q7xRpQ006225 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 26 Mar 2003 07:59:27 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)h2Q7xRUA006220 for questions@freebsd.org; Wed, 26 Mar 2003 07:59:27 GMT Date: Wed, 26 Mar 2003 07:59:27 +0000 From: Matthew Seaman To: questions@freebsd.org Message-ID: <20030326075927.GB5568@happy-idiot-talk.infracaninophi> Mail-Followup-To: Matthew Seaman , questions@freebsd.org References: <20030326072922.GA5568@happy-idiot-talk.infracaninophi> <8C8C94D2-5F5D-11D7-95E4-000A959CEE6A@pursued-with.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="s2ZSL+KKDSLx8OML" Content-Disposition: inline In-Reply-To: <8C8C94D2-5F5D-11D7-95E4-000A959CEE6A@pursued-with.net> User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-39.1 required=5.0 tests=AWL,EMAIL_ATTRIBUTION,IN_REP_TO,PGP_SIGNATURE_2, QUOTED_EMAIL_TEXT,QUOTE_TWICE_1,REFERENCES, REPLY_WITH_QUOTES,USER_AGENT_MUTT autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) Subject: Re: File owner name not updated. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2003 07:59:31 -0000 X-List-Received-Date: Wed, 26 Mar 2003 07:59:31 -0000 --s2ZSL+KKDSLx8OML Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 25, 2003 at 11:35:42PM -0800, Kevin Stevens wrote: >=20 > On Tuesday, Mar 25, 2003, at 23:29 US/Pacific, Matthew Seaman wrote: >=20 > >Two things occur to me: > > > > i) Did root use vipw(8) to edit the passwd database, or otherwise > > run: > > > > # cap_mkdb /etc/master.passwd > > > > when the UID was changed? It's the value in the hashed > > database cap_mkdb(1) builds that is used by the system. > > Updating that should have instantaneous effect. >=20 > Just used the pw command. However, note that this symptom persisted=20 > for over 24 hours. Last time it happened (on a 4.7 system) it=20 > persisted for several days if I recall, before I noticed/corrected it. Of course, when I said cap_mkdb(8), astute readers will immediately have realised that I meant to say pwd_mkdb(8) --- it's too early in the morning here. However all of the system supplied password management commands such as pw(8) and vipw(8) will automatically run pwd_mkdb(8) as necessary. pwd_mkdb(8) will generate the /etc/passwd file out of the /etc/master.passwd file, so checking that the UID change has propagated from the master would be a useful datapoint. =20 > > ii) You haven't said anything about what the source of your > > password data is, which probably means you're just using the > > flat file password database and not anything like NIS or LDAP. >=20 > Correct. >=20 > > If you are using a distributed database, then a degree of > > latency while changes get propagated around the servers is to > > be expected. However, that shouldn't take any more than a few > > minutes in a well configured system. >=20 > Right, and this is a standalone system (which is why I'm manually=20 > syncing up the uids in the first place). In which case I'd expect that the intended change should take effect straight away. =20 > >The problem is not with the ls(1) command per se. It's the underlying > >system library functions such as getpwuid(3) which do the translation > >between numeric UIDs and usernames that are the seat of the problem. > >You can see that by running some other command that uses getpwuid(3),=20 > >eg: > > > > % perl -e 'print scalar getpwuid(503), "\n";' Yet another alternative is: % id -P 503 or=20 % id -P fred =20 > Got it. I think what I'll do is create a dummy user with the same=20 > conditions and let it persist for awhile so we can experiment with it. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --s2ZSL+KKDSLx8OML Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE+gV3fdtESqEQa7a0RAuyZAKCQBGwzvTlu9PqTfDW3S+eOV237aQCgldWU EML7kW6LumM/sm2q3Umbsu4= =kTDC -----END PGP SIGNATURE----- --s2ZSL+KKDSLx8OML--