View Single Post
  #4   (View Single Post)  
Old 14th May 2020
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,325
Default

If you review the passwd(5) and pwd_mkdb(8) man pages, you will learn that the Berkeley DB files are created from the master.passwd file whenever it is changed.

I would:
  1. Manually back up your damaged set of password files from /etc/: passwd, pwd.db, master.passwd, and spwd.db in the event the next step is catastrophic.
  2. Restore all 4 files from your possibly good backup.
In the event you need to recover your current damaged environment, boot into single-user mode (boot> -s), # mount -a, restore the 4 files from your damaged set, then exit from the single-user shell or # reboot.
Reply With Quote