lists.arthurdejong.org
RSS feed

Re: getent results under nss-pam-ldapd

[Date Prev][Date Next] [Thread Prev][Thread Next]

Re: getent results under nss-pam-ldapd



Thank you for the clarification Arthur.

gilles




Sent with Proton Mail secure email.

On Thursday, August 22nd, 2024 at 03:31, Arthur de Jong 
<arthur@arthurdejong.org> wrote:

> On Thu, 2024-08-22 at 01:42 +0000, Glalonde25 wrote:
> 
> > When I run "getent passwd user2" given "user2" is both define as a
> > local account and also defined in the ldap, the command only returns
> > one row with the details from the local passwd file. Is this the
> > correct behavior?
> 
> 
> I'm pretty sure a qualified getent passwd something lookup is expected
> to return only one result (also happens when you add two entries to
> /etc/passwd). It should use getpwnam() under the hood which only
> returns one entry.
> 
> Both the user name and numeric uid are expected to be unique in a lot
> of places and first match usually wins. This is especially true if you
> have something like nscd running which caches these kind of lookups and
> only remembers one entry.
> 
> Kind regards,
> 
> --
> -- arthur - arthur@arthurdejong.org - https://arthurdejong.org/ --