After running the script in this answer to show all members of the group wheel, I got a weird result.
The user tempuser cannot be found
There was an unknown error.
When I tried dscacheutil -q user -a name tempuser, I got nothing. Grepping for tempuser in /etc/passwd also gives nothing. So what is this tempuser account doing here and how can I get rid of it?
I have a sneaking suspicion that I created it some time ago while testing, but it seems odd that I could create a user account which most of the OS doesn't seem to know about.
UPDATE: When running dscl . -read /Users/tempuser, I get
AppleMetaNodeLocation: /Local/Default
AuthenticationAuthority: ;Kerberosv5;;tempuser@... ;ShadowHash;...
GeneratedUID: ...
Password: *...
PasswordPolicyOptions: ...
RecordName: tempuser
RecordType: dsRecTypeStandard:Users
In contrast, when running that command on my own account, I get those keys, plus the following keys, which don't exist for tempuser:
PrimaryGroupID: ...
RealName: ...
UniqueID: ...
UserShell: ...
So somehow I generated a user without an id and that's why the utilities are complaining?