Date: Wed, 11 Sep 2002 11:42:17 -0600 (MDT) From: "C.J." <clayton@frii.net> To: freebsd-bugs@freebsd.org Subject: pw useradd not properly locking the password file? Message-ID: <Pine.BSF.4.44.0209111043550.35148-100000@elara.frii.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.44.0209111043550.35148-100000>