Solved the password db file is busy

FreeBSD-12.2p10
I went to use the passwd utility on an sshd server host and got this:

Code:
passwd: the password db file is busy

A. I discovered that vipw was already running on that server when I logged in.
 
Sounds like someone edited the password file directly with vi, instead of
using the vipw program, and now the shadow password files is out of sync, or
someone
had vipw open and didn't exit properly, leaving a temp file.

In /etc you should have the following:

pwd.db
spwd.db
passwd
master.passwd

All four should have the same date and time stamp. The 2 db files should be
exactly the same size

If you have any other files like passwd.XXXX then delete them, these are
temp
files.

See http://www.verycomputer.com/173_e8f2f24eeed42bff_1.htm#p2
 
Sometimes this can help:
Regenerate the password database after manually editing or replacing the password file:
Code:
/usr/sbin/pwd_mkdb -p /etc/master.passwd
 
Back
Top