Date: Thu, 2 May 2002 14:30:28 -0400 (EDT) From: "Geoffrey C. Speicher" <geoff@speicher.org> To: Stephen Hovey <shovey@buffnet.net> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: concurrent pw(8) corrupts master.passwd sometimes? Message-ID: <Pine.BSF.4.05.10205021357360.41967-100000@speicher.org> In-Reply-To: <Pine.BSF.4.05.10205021346530.20049-100000@buffnet11.buffnet.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2 May 2002, Stephen Hovey wrote: > I had trouble like this with the YP stuff - if two people changed their > passwords or something at the same time, etc. > > I put my own locking in so that if something is in process it doesnt even > try to run. How much code do pw and the YP utils use in common? This is an excerpt from the BUGS section of pw(8): There are the obvious races with multiple people running pwd_mkdb on dif- ferent password files at the same time. The front-ends to pwd_mkdb, chpass(1), passwd(1) and vipw(8), handle the locking necessary to avoid this problem. Isn't pw(8) conspicuously missing from that list? > if it were me - I would change the method to create a file of pw commands, > that a cronjob checks for an executes evern so many minutes IF a lockfile > doesnt exit (so worst case it takes an extra 5 minutes before an account > is created). Good idea. It may come to that if I can't fix it the right way. Geoff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" 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.05.10205021357360.41967-100000>