I'm posting this here because this was a hard to find MacPorts bug that comes with the latest version of dbus. dbus is a KDE utility that's a dependency for lots of packages.
dbus creates a user called "Message Bus" whose shortname is "root". Which of course trashes sudo, su and creates all sorts of other problems. To tell if you have been hit by this you can either you will get password errors with sudo and su.
To see if you have this problem do a
dscl . -read /Users/root
If you just get an error you are fine. If you got hit with the bug you should see something like this:
Notice the 507, that needs to be 0. OK now to fix this bug:
- Open Users & Groups preferences, click Login Options, then click the lock icon to unlock it. If necessary, type your password, then click Unlock.
- In the Network Account Server section, click Join or Edit.
- Click Open Directory Utility.
- Click the lock icon to unlock it, then enter your administrator name and password.
- Change Viewing to Users and look for "Message Bus"
- If you have more than one delete the one currently set to root
- If you have only one change the RecordName from "root" to "messagebus"