From owner-freebsd-questions@FreeBSD.ORG Wed Mar 26 00:08:14 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 0A85B37B404 for ; Wed, 26 Mar 2003 00:08:14 -0800 (PST) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FEDD43FB1 for ; Wed, 26 Mar 2003 00:08:13 -0800 (PST) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.12.7/8.12.7) id h2Q88COK061790; Wed, 26 Mar 2003 02:08:12 -0600 (CST) (envelope-from dan) Date: Wed, 26 Mar 2003 02:08:12 -0600 From: Dan Nelson To: Kevin Stevens Message-ID: <20030326080812.GH1713@dan.emsphone.com> References: <20030326072922.GA5568@happy-idiot-talk.infracaninophi> <8C8C94D2-5F5D-11D7-95E4-000A959CEE6A@pursued-with.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8C8C94D2-5F5D-11D7-95E4-000A959CEE6A@pursued-with.net> X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-27.6 required=5.0 tests=AWL,IN_REP_TO,QUOTED_EMAIL_TEXT,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) cc: questions@freebsd.org 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 08:08:15 -0000 X-List-Received-Date: Wed, 26 Mar 2003 08:08:15 -0000 In the last episode (Mar 25), Kevin Stevens said: > On Tuesday, Mar 25, 2003, at 23:29 US/Pacific, Matthew Seaman wrote: > >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. > > Just used the pw command. However, note that this symptom persisted > for over 24 hours. Last time it happened (on a 4.7 system) it > persisted for several days if I recall, before I noticed/corrected > it. What happens if you use vipw instead? pw may be too smart for its own good. I bet it calls "pwd_mkdb -u" to only update a single user from /etc/passwd. The problem is when the uid changes, pwd_mkdb will insert a new record into /etc/pwd.sb and spwd.db, but it doesn't know about the previous uid, so that stays in the db. If this is the case, you might want to file a PR on the problem. Your "persistence" problem is probably just however long it is until you run vipw or otherwise cause a full pwd_mkdb to be run. Note that cap_mkdb is the wrong command for building the passwd database files; passwd files are not in getcap(3) format. -- Dan Nelson dnelson@allantgroup.com