From owner-freebsd-bugs Wed Sep 11 10:42:19 2002 Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A23EF37B400 for ; Wed, 11 Sep 2002 10:42:17 -0700 (PDT) Received: from ma102.mailarmory.com (ma102.mailarmory.com [216.17.222.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id 447AE43E65 for ; Wed, 11 Sep 2002 10:42:17 -0700 (PDT) (envelope-from clayton@frii.net) Received: from localhost.localdomain (localhost.frii.com [127.0.0.1]) by localhost.mailarmory.com (Postfix) with ESMTP id CA28573616 for ; Wed, 11 Sep 2002 11:42:17 -0600 (MDT) Received: from deimos.frii.net (deimos.frii.com [216.17.128.2]) by ma102.mailarmory.com (Postfix) with ESMTP id B2871735CF for ; Wed, 11 Sep 2002 11:42:17 -0600 (MDT) Received: from elara.frii.com (elara.frii.com [216.17.128.9]) by deimos.frii.net (8.12.5/8.12.5) with ESMTP id g8BHgHZn022377 for ; Wed, 11 Sep 2002 11:42:17 -0600 (MDT) Date: Wed, 11 Sep 2002 11:42:17 -0600 (MDT) From: "C.J." X-X-Sender: clayton@elara.frii.com To: freebsd-bugs@freebsd.org Subject: pw useradd not properly locking the password file? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Recently I discovered about 15 pairs of users in my password file that have the same UID. After looking through some old logs and doing some research I believe I've pinned down the problem. It appears that if pw useradd is run from different shells too close to one another (before the password file has a chance to finish rebuilding) both of those users get the same UID, but if you run pw useradd from the same shell back to back everything goes as it should and both users get different UID's. Can anyone else reproduce this? Is there a patch I haven't seen? Unfortunately, I'm C illiterate so looking at the source code didn't really help me much. I'm using 4.6-STABLE from early August (don't remember the exact CVS date). I also modified pw_mkdb to give it more memory so that it can rebuild the password file quicker, but in theory if two people run the command at the same time from different shells, the problem could still occur. Thanks in advance. - C.J. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message