/etc/passwd file is busy, help.

Kishore Seshadri kseshadr at quasar.intel.com
Fri Jul 20 07:19:19 AEST 1990


In article <3242 at bnr-rsc.UUCP>, pdwalker at bcarh667 writes:
>I am having a problem with my /etc/passwd file.  Whenever I try to 'vipw' or
>use 'passwd' I get the following message:
>	Temporary file busy; try again later.	(with passwd)
>	vipw: password file busy		(with vipw)
>
>I am guessing that at sometime in the past, the file was locked to prevent
>filesharing, but the process died leaving the file in the locked state.	
I'm not sure what U*IX you're using, but the ones I've seen usually create
an intermediate file called /etc/ptmp. On Ultrix and some other systems,
vipw tries to open the /etc/ptmp with the O_EXCL|O_CREAT flags. If the open
gets an EEXIST error, it prints the busy message and quits. You can fix
this by deleting the /etc/ptmp file. You should probably do a diff on
/etc/ptmp and /etc/passwd before blowing away /etc/ptmp and see what has
been changed. On SunOS, vipw opens the passwd file and tries to get an
exclusive lock using flock. If the file is locked, you should look for
a vipw process still running and kill it (think twice before you do this).
This should free the lock.

>
>Does anyone know how I can unlock the file?  It is getting to be a little
>irritating.
In the first place you shouldn't normally be killing vipw leaving the ptmp
file in place. Nor should you stay in vipw longer than necessary. Anyway,
as a last resort, you should be able to edit the file using vi.

Kishore Seshadri
kishore at mipos3.intel.com
===============================================================================
Kishore Seshadri (Speaking only for myself) Intel Corp., Santa Clara, CA
CSNET: kseshadr at mipos3.intel.com ARPA: kseshadr%mipos3.intel.com at relay.cs.net
UUCP:{amdcad,decwrl,hplabs,oliveb,pur-ee,qantel}!intelca!mipos3!kseshadr



More information about the Comp.unix.wizards mailing list