User simultaneously exists and yet does not.

Hi there,

I just installed gdm on a machine that I recently upgraded from 9.1 to 9.2 by following Chapter 24 of the FreeBSD Handbook.

To the best of my knowledge, when gdm is installed it creates both a group and a user called gdm. I can confirm that this user exists in /etc/groups /etc/passwd and /etc/master.passwd however it cannot be 'fingered' whereas the avahi, haldaemon, pulse and polkit users can.

When I attempt to start the dbus service it complains that there is no gdm user.
Code:
root@smudge:~ # service dbus start
Starting dbus.
Unknown username "gdm" in message bus configuration file
root@smudge:~ #
So as I said I can't 'finger' the user so I decided something wasn't right and that I would remove the user and re-add it. Unfortunately the following happened:

Code:
root@smudge:~ # pw userdel gdm
pw: no such user 'gdm'
root@smudge:~ # pw useradd gdm -u 92 -g 92 -d /nonexistent -s /sbin/nologin -c "GNOME Display Manager"
pw: user 'gdm' already exists
root@smudge:~ #
I can happily remove and add back the gdm group using pw but not the user. I have tried uninstalling the gdm port, then trying to remove the user but I get the same message about the user not existing.

I don't understand how a user can exist and not exist at the same time. I know Halloween is coming up soon but I could do without a ghoulish gdm user! �e

If anyone could help me to exorcise this user and solve my problem I would be very grateful.

SanPollo
 
Or in short: you'll want pwd_mkdb. This command creates or updates the password databases, and it could be preferable to use because it gives you more control (the only reason I still know this command from mind is because I've used it when upgrading my servers).

This seems like a mismatch between passwd and the underlying database.
 
Hi guys,

Thanks very much for this, guys. I ran vipw and saved without any changes which seemed to fix the issue. I've been looking into this a bit more and have at least learnt a bit about vipw running its own checks before calling pwd_mkdb to update the user database.

Thanks again. :)
 
Back
Top