View Single Post
  #3   (View Single Post)  
Old 14th May 2020
gustaf gustaf is offline
Fdisk Soldier
 
Join Date: Dec 2016
Posts: 59
Default

Thanks for your quick response.

The files /etc/passwd and /var/backups/etc_passwd.backup appear to be OK:
Code:
$ vi /etc/passwd   # same result as $ less /etc/passwd
...
_polkitd:*:701:701:Polkit Daemon User:/var/empty:/sbin/nologin
_pulse:*:683:683:PulseAudio System Daemon:/var/run/pulse:/sbin/nologin

$ doas less /var/backups/etc_passwd.backup
...
_polkitd:*:701:701:Polkit Daemon User:/var/empty:/sbin/nologin
_pulse:*:683:683:PulseAudio System Daemon:/var/run/pulse:/sbin/nologin
The file /etc/master.passwd appears to be corrupted, but /var/backups/master.passwd.backup looks OK:
Code:
$ doas vi /etc/master.passwd   # same result as [oman8]vipw[/oman]
^A^@...\xad\x91F5...

$ doas less /var/backups/master.passwd.backup
...
_polkitd:*:701:701:daemon:0:0:Polkit Daemon User:/var/empty:/sbin/nologin
_pulse:*:683:683:daemon:0:0:PulseAudio System Daemon:/var/run/pulse:/sbin/nologin
The .db files appear to be binary:
Code:
$ less /etc/pwd.db
"/etc/pwd.db" may be a binary file.  See it anyway?

$ doas less /etc/spwd.db
"/etc/spwd.db" may be a binary file.  See it anyway?
These are the password files in /var/backups:
Code:
etc_passwd.backup
etc_passwd.current
etc_pwd.db.backup.sha256
etc_pwd.db.current.sha256
etc_spwd.db.backup.sha256
etc_spwd.db.current.sha256
master.passwd.backup
master.passwd.current

Quote:
Originally Posted by TronDD View Post
If they look good I'd copy them the .db files back to /etc
Can you explain what you mean by this? I don't think I can just copy the files from /var/backups without renaming them first. There is also the problem of the corrupted /etc/master.passwd file.
Reply With Quote