From owner-freebsd-questions Thu May 2 10:49:38 2002 Delivered-To: freebsd-questions@freebsd.org Received: from buffnet4.buffnet.net (buffnet4.buffnet.net [205.246.19.13]) by hub.freebsd.org (Postfix) with ESMTP id 67ECE37B419 for ; Thu, 2 May 2002 10:49:34 -0700 (PDT) Received: from buffnet11.buffnet.net (buffnet11.buffnet.net [205.246.19.55]) by buffnet4.buffnet.net (8.9.3/8.8.7) with ESMTP id NAA07193; Thu, 2 May 2002 13:49:37 -0400 (EDT) (envelope-from shovey@buffnet.net) Date: Thu, 2 May 2002 13:49:26 -0400 (EDT) From: Stephen Hovey To: "Geoffrey C. Speicher" Cc: freebsd-questions@FreeBSD.ORG Subject: Re: concurrent pw(8) corrupts master.passwd sometimes? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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. 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). On Thu, 2 May 2002, Geoffrey C. Speicher wrote: > ``Sometimes'' being the operative word. I am not able to reliably > reproduce it, but it sure does happen. I don't know for sure that it is > the fault of pw, but that's what I'm trying to determine. > > Here's the scenario: a user visits a web site and fills out a form to > create an account with the site. When they press submit, a record is > inserted into a database table holding their account information. This > triggers a call to 'pw adduser ...' on the local machine so they have a > home directory to store files and a personal email account. > > Usually it works fine, but under some circumstances master.passwd is left > short, sometimes in the middle of a record. Anyone have any ideas that > might save me some time while I'm looking at the pw sources? I'm starting > to wonder if I should run 'nohup pw adduser ...'. > > (Please CC me on reply.) > > Thanks, > Geoff > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message