Linux – How to get rid of “I have no name”

linux

I accidently gave chmod 777 permission on /var directory in linux server.
Now I'm observing following errors:

id: cannot find name for user ID 673910804
id: cannot find name for group ID 673710593
id: cannot find name for user ID 673910804
[I have no name!@tb-linux-d08 ~]$

Please help me how to get rid of this error.

Best Answer

The /var permissions are either a red herring or incidental. For the uid-to-name lookup to work, the following must be correct, in order:

  • /etc/nsswitch.conf needs to have permissions 0644, owner root:root.
  • The passwd entry in that file needs to be correct - given the very large IDs, you're probably not using just the local password file, but some ldap or AD setup? Make sure that it's listed, and listed early on.
  • The service that actually provides your identities needs to be up and running and accepting your queries - for local users, that means that /etc/passwd must have permissions 0644 and owner root:root.
  • The client library for your identity service may have permissions requirements for its config, cache, or both. This is where the /var permissions would come in, but without knowing more about what you use for authentication, that's not possible to troubleshoot. At a minimum, make sure that /var itself has permissions 0755, owner root:root; directories it contains should be owned by either an obvious system user/group (e.g. "mail" for /var/mail) or root, and not be world-writable (with the exception of /var/tmp, if it exists, which should be root-owned and have permissions 1777).

If that doesn't help (and even if it does), please provide more information about your auth system - LDAP, samba, AD (via what?), or something else.

Related Question