|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
userdel "must be a local user" error
After deleting gwenview and all leftover unused dependencies,
$ doas pkg_del -civ gwenview ; doas pkg_del -a , the following messages appeared: Code:
--- -polkit-0.116p1 ------------------- You should also run /usr/sbin/userdel _polkitd --- -pulseaudio-13.0p0 ------------------- You should also run /usr/sbin/userdel _pulse Code:
$ doas /usr/sbin/userdel _polkitd userdel: /etc/master.passwd: line `' too long (492 bytes), skipping ... userdel: /etc/master.passwd: line `�S��z��yy�'' too long (515 bytes), skipping ... userdel: User `_polkitd' must be a local user $ doas /usr/sbin/userdel _pulse userdel: /etc/master.passwd: line `' too long (492 bytes), skipping ... userdel: /etc/master.passwd: line `�S��z��yy�'' too long (515 bytes), skipping ... userdel: User `_pulse' must be a local user Code:
$ less /etc/passwd _polkitd:*:701:701:Polkit Daemon User:/var/empty:/sbin/nologin _pulse:*:683:683:PulseAudio System Daemon:/var/run/pulse:/sbin/nologin Code:
$ userinfo _polkitd login _polkitd passwd * uid 701 groups _polkitd change NEVER class daemon gecos Polkit Daemon User dir /var/empty shell /sbin/nologin expire NEVER $ userinfo _pulse login _pulse passwd * uid 683 groups 683 change NEVER class daemon gecos PulseAudio System Daemon dir /var/run/pulse shell /sbin/nologin expire NEVER vipw(8) gives me a cryptic list of ^@ signs and what looks like hex notation for characters (\xad\x91F5, for example)--definitely not a human-readable, editable file. Additional suggestions in this thread are to remove the possibly corrupted compiled password databases, and then rebuild them with pwd_mkdb(8). Since these are password files and I have no experience working with them, aside from looking at /etc/passwd, I tried what seemed like the safest commands: Code:
$ doas pwd_mkdb -c /etc/master.passwd pwd_mkdb: line too long pwd_mkdb: /etc/master.passwd: Inappropriate file type or format $ doas pwd_mkdb -c /etc/passwd pwd_mkdb: corrupted entry pwd_mkdb: at line #1 pwd_mkdb: /etc/passwd: Inappropriate file type or format $ doas pwd_mkdb -c /etc/pwd.db pwd_mkdb: corrupted entry pwd_mkdb: at line #1 pwd_mkdb: /etc/pwd.db: Inappropriate file type or format $ doas pwd_mkdb -c /etc/spwd.db pwd_mkdb: corrupted entry pwd_mkdb: at line #1 pwd_mkdb: /etc/spwd.db: Inappropriate file type or format Thanks in advance. Last edited by gustaf; 14th May 2020 at 04:22 AM. Reason: formatting |
|
|||
Looks like something got corrupted. /etc/passwd and /etc/master.passwd should be human readable with vi.
Check in /var/backups/ for etc_passwd.backup and master.passwd.backup and see if they look ok. If they look good I'd copy them the .db files back to /etc |
|
|||
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
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 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? 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 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. |
|
|||
Yes, backup what you have. You can then regenerate the DB files from the fixed master.password.
Looks like the easiest way to restore from /var/backups is pwd_mkdb -p /var/backups/master.passwd.backup That will create /etc/master.passwd, /etc/passwd, pwd.db and spwd.db I haven't run this, so make a backup and double check me in the man page. |
|
|||
Problem fixed! Thanks!
|
Tags |
userdel |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
5.4 amd64 on Thinkpad x200: "render error detected" on booting. | karl | OpenBSD Installation and Upgrading | 2 | 5th November 2013 04:28 AM |
Where should I put my config? "rc.conf" or "rc.conf.local"? | fender0107401 | OpenBSD General | 2 | 2nd April 2012 02:53 AM |
Fixed "xinit" after _7 _8, "how" here in case anyones' "X" breaks... using "nvidia" | jb_daefo | Guides | 0 | 5th October 2009 09:31 PM |
Local NTPd Server "bad peer" | plexter | OpenBSD General | 24 | 9th September 2009 04:48 PM |