1856457 Members
3121 Online
104113 Solutions
New Discussion

Re: ptmp

 
SOLVED
Go to solution
John McWilliams
Advisor

ptmp

I am changing the password aging to 56 days by running the following on a D220 HP-UX 10.20 -

for NAME in `cat file`
do
passwd -x 56 $NAME
done

file contains a list of names to change.
I get the following message about half way through

Temporary file busy; try again later for /etc/ptmp

What causes this and what is the fix ?

Regards john
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor
Solution

Re: ptmp

John:

The temporary password file /etc/ptmp is present and should be removed. This will allow you to continue.

You might try adding a small sleep interval within your loop (sleep 1). This may help prevent, or reduce, the frequency of this condition.

...JRF...
James R. Ferguson
Acclaimed Contributor

Re: ptmp

John:

One other note. The /etc/ptmp file is a lock denoting the the /etc/passwd file is undergoing change. Don't remove it unless the "busy" error persists and you know that no one else is doing maintenance on the password file.

...JRF...
John McWilliams
Advisor

Re: ptmp

Thanks James for your answer. I had to remove the ptmp file and then I put the sleep command in. It is a litte slow as there is about 300 users but it is working not.
Regards John