1847842 Members
2653 Online
104021 Solutions
New Discussion

Re: passwd file problem

 
Sandeep_2
Occasional Advisor

passwd file problem

Hi Admins,

I have HP-UX v11.00, 64bit server. On this, I am unable to add users if I try to add using sam, it says "/etc/passwd file busy try at some other time". I am sure that nobody else is editing passwd file.
Also if I say vipw, then it comes out saying
"lockf: Lockf deadlock detection
vipw: Cannot obtain lock for /etc/ptmp"
I have removed /etc/ptmp file but still the same problem appears.
Can someone have any idea , what could be the problem.

Thanks,
Sandeep

Sandeep
7 REPLIES 7
Alex Glennie
Honored Contributor

Re: passwd file problem

try : touch /etc/.pwd.lock
chmod 400 /etc/.pwd.lock
chown root:sys /etc/.pwd.lock .... ?
Sandeep_2
Occasional Advisor

Re: passwd file problem

Alex,

I have tried that still the problem persists.
Is that something to do with locking mechanism. If yes, then how to detect that condition & how to clear lock on /etc/passwd.


Thanks,
Sandeep.
Sandeep
Ian_4
Honored Contributor

Re: passwd file problem

? ps -ef | grep chfn -The chfn (change
user information in password file)

? Kill the chfn process
? Test it

Hope this helps,
Ian
Sandeep_2
Occasional Advisor

Re: passwd file problem

Hi,

I don't find any chfn process on the server.

Thanks,
Sandeep.
Sandeep
Ian_4
Honored Contributor

Re: passwd file problem

Hemm, Do you have a file called /etc/passwd.tmp ? If so delete it and try again.
James A. Donovan
Honored Contributor

Re: passwd file problem

There is a utility called lsof (LiSt of Open Files) which can tell you what if any process is holding the passwd file. You can get a copy of lsof that has been compiled for HP-UX 11.00 64-bit via anonymous FTP at ftp://coast.cs.purdue.edu/pub/tools/unix/sysutils/lsof/binaries/hpux

There are many different flavors there, so just choose the one appropriate for your machine.
Remember, wherever you go, there you are...
Rita C Workman
Honored Contributor

Re: passwd file problem

OK..you get lockf deadlock detection because to processes are competing for exclusive rights to the same file.
But, your not sure who has the other process. Well, depending on your O/S and how many disks you have it on. You probably know the address of the disk that etc is on. On my box it's the o/s primary disk. So you can use this to check for processes running on it.
Try some variations-check manpage fuser.

fuser -u /dev/dsk/c_t_d_
fuser -u /

Your looking for who's got this file and then you can use the -k option to do a sigkill to the process.

Just a thought,