On a specific machine with both local users and LDAP users, there is a user that is listed under getent group foo (let's say the user jdoe is listed), but when doing getent passwd jdoe I get no output. Attempting sudo su jdoe doesn't work either.

Using the command members -t foo I found out the user is only listed as a secondary member of the group, although I'm not sure if that's relevant.

Does anyone know how I can find out how this seemingly nonexistent user ended up in this user group? To clarify, the listed user is in no way related to a system user, and it doesn't seem to be listed anywhere under locally created users.

Something that might be a possibility: is it possible this is being caused by someone who previously had a user account named jdoe, whose account since has been renamed or deleted? And if so, how can I find this out?

This is my /etc/nsswitch.conf:

passwd:         compat ldap systemd
group:          compat ldap systemd
shadow:         compat ldap

hosts:          files dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

It is pretty much the default configuration with LDAP included.


This might happen when the LDAP database has a PosixGroup foo with attribute memberUid with value jdoe The user might or might not exist, but the username does exist in the PosixGroup foo

This might be a security risk, when a (different) user with username jdoe is added to the LDAP-database again, when you do not want the user to be part of foo.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.