DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Security

OpenBSD Security Functionally paranoid!

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 8th March 2016
jjstorm jjstorm is offline
Package Pilot
 
Join Date: Nov 2014
Location: Buenos Aires, AR
Posts: 141
Default unable to lock password file

Code:
$ passwd
Changing local password for userx
Old password:
New password:
Retype new password:
Attempting to lock password file, please wait or press ^C to abort............................................^C
Password unchanged.

Last edited by jjstorm; 8th March 2016 at 02:10 AM.
Reply With Quote
  #2   (View Single Post)  
Old 8th March 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,232
Default

Based upon the discussion under DIAGNOSTICS in the passwd(1) man page, I will assume you have executed passwd(1) twice, and the first instance is still running.

Only one user may update the password database at any given time, as there are multiple files in /etc that must remain in sync.

Last edited by jggimi; 8th March 2016 at 02:05 AM. Reason: clarity
Reply With Quote
  #3   (View Single Post)  
Old 8th March 2016
jjstorm jjstorm is offline
Package Pilot
 
Join Date: Nov 2014
Location: Buenos Aires, AR
Posts: 141
Default

Quote:
Originally Posted by jggimi View Post
Based upon the discussion under DIAGNOSTICS in the passwd(1) man page, I will assume you have executed passwd(1) twice, and the first instance is still running.

Only one user may update the password database at any given time, as there are multiple files in /etc that must remain in sync.

Code:
# fstat /etc/ptmp

USER     CMD          PID   FD MOUNT        INUM MODE       R/W    SZ|DV NAME

# rm /etc/ptmp
that did it, thanks

Last edited by jjstorm; 8th March 2016 at 02:23 AM.
Reply With Quote
  #4   (View Single Post)  
Old 8th March 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,232
Default

You've followed part of the instructions in the man page. It first states...
Quote:
If the process holding the lock was prematurely terminated the lock file
may be stale and passwd will wait forever trying to lock the password
file. To determine whether a live process is actually holding the lock,
the admin may run the following:
You ran the fstat command, and posted the output. The man page goes on to state...
Quote:
If no process is listed, it is safe to remove the /etc/ptmp file to clear
the error.
Reply With Quote
  #5   (View Single Post)  
Old 8th March 2016
jjstorm jjstorm is offline
Package Pilot
 
Join Date: Nov 2014
Location: Buenos Aires, AR
Posts: 141
Default

Quote:
Originally Posted by jggimi View Post
You've followed part of the instructions in the man page. It first states...You ran the fstat command, and posted the output. The man page goes on to state...
I thought that was just a heading, and expected to see something below it. So do I have a major problem now?
Reply With Quote
  #6   (View Single Post)  
Old 8th March 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,232
Default

From what you've posted, you may safely delete the file.

# rm /etc/ptmp

It is a temporary file, which exists only while someone is running one of the password database maintenance commands, to prevent multiple users from updating the flight of password files simultaneously.
Reply With Quote
  #7   (View Single Post)  
Old 9th March 2016
jjstorm jjstorm is offline
Package Pilot
 
Join Date: Nov 2014
Location: Buenos Aires, AR
Posts: 141
Default

Quote:
Originally Posted by jggimi View Post
You've followed part of the instructions in the man page. It first states...You ran the fstat command, and posted the output. The man page goes on to state...
What would the proper course of action have been?
Reply With Quote
  #8   (View Single Post)  
Old 9th March 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,232
Default

# rm /etc/ptmp as described in the man page and in my post number 6 above.
Reply With Quote
  #9   (View Single Post)  
Old 10th March 2016
jjstorm jjstorm is offline
Package Pilot
 
Join Date: Nov 2014
Location: Buenos Aires, AR
Posts: 141
Default

Quote:
Originally Posted by jggimi View Post
# rm /etc/ptmp as described in the man page and in my post number 6 above.
O.K, I was just confused by post # 4.


Thanks again.
Reply With Quote
Old 10th March 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,232
Default

Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to mount: Inappropriate file type or format betweendayandnight OpenBSD General 15 10th August 2015 06:16 PM
roundcubemail-1.1.0p0 - unable to open database file Valus OpenBSD Packages and Ports 2 15th March 2015 10:54 AM
unable to get packages/INDEX file from selected media... clovis FreeBSD Installation and Upgrading 5 11th August 2010 07:39 PM
Unable to scroll through directory contents with Scroll Lock key Larry OpenBSD General 1 15th May 2010 08:56 PM
MYSQL can't start "UNABLE TO LOCK disappearedng FreeBSD General 0 14th October 2008 02:01 AM


All times are GMT. The time now is 05:31 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick