Solved Unknown username after update

Afternoon all,

It looks like I made an error when I last did a mergemaster and wiped a number of users from my system, I now get messages like the following on boot:

Code:
Unknown username "polkit" in message bus configuration file

The users it complained about are:
polkit
avahi
polkitd
colord
haldaemon
pulse

Following this thread, I have added back "polkit", "avahi", "haldaemon". I have also removed pulseaudio (guessing it got installed with Xfce or similar).

I am still getting complaints that the following users are missing:
polkitd
colord

I was going to ask if someone could sent a snippet of their passwd file which includes those users - but I'm open to other fixes too :)

Many thanks,
Ben
 
Code:
# grep colord /usr/ports/UIDs
colord:*:970:970::0:0:colord color management daemon:/nonexistent:/usr/sbin/nologin

# grep polkit /usr/ports/UIDs
polkit:*:562:562::0:0:PolicyKit User:/nonexistent:/usr/sbin/nologin
polkitd:*:565:565::0:0:Polkit Daemon User:/var/empty:/usr/sbin/nologin
Might not be the best solution as the failed merge could have broken other things, but all users and groups created by ports should have the details, IDs, etc, catalogued in /usr/ports/UIDs & /usr/ports/GIDs.
 

SirDice

Administrator
Staff member
Administrator
Moderator
Yep, you should be able to get the info from those files. Adding the accounts by hand looks like this:
Code:
pw groupadd polkit -g 562
pw useradd polkit -u 562 -g 562 -d /nonexistent -s /usr/sbin/nologin -c "PolicyKit User"
 
Just reinstall the ports/packages?

Having originally installed with pkg I was a little unsure whether doing a reinstall of the appropriate port would work/be OK.

Code:
# grep colord /usr/ports/UIDs
colord:*:970:970::0:0:colord color management daemon:/nonexistent:/usr/sbin/nologin

# grep polkit /usr/ports/UIDs
polkit:*:562:562::0:0:PolicyKit User:/nonexistent:/usr/sbin/nologin
polkitd:*:565:565::0:0:Polkit Daemon User:/var/empty:/usr/sbin/nologin
Might not be the best solution as the failed merge could of broken other things, but all users & groups created by ports should have the details, IDs, etc, catalogued in /usr/ports/UIDs & /usr/ports/GIDs.

Oh superb! I hadn't realised such information was stored there :) Thanks very much!
 
Hmmm, unexpectedly I could not use pkg…It came back with a “size mismatch” error. After I tried pkg clean -a and manually removing some stuff (not the important SQLite db!) I finally found myself doing pkg bootstrap -f, but it couldn't find the URL…

Somewhere I've either fried my wifi chip, or done something which means FreeBSD (at least this installation) doesn't recognise it …

I've just updated /usr/src via Ethernet and will try rebuilding world and kernel there (won't have a wired connection). If that doesn't work I'll have a poke around tonight and may end up reinstalling…

I'll mark this as solved in the mean time!
 
Revisiting this thread to fix a new installation of 11.2-RELEASE using packages only.
Followed all of the advice given above and it fixed the issues. Thanks all for this!
 
Top