On Tue, Jan 11, 2005 at 12:56:17PM -0800, Ulrich Drepper wrote:
Pekka Pietikainen wrote:
>Possibly related is what I saw a while back, there was a local user
>and a NIS+ user with different uid etc. nsswitch.conf had
>passwd: files nisplus yet it used the nis+ user until nscd was
>stopped. clearing up the nscd caches ( rm -f /var/db/nscd/* ) made it
>work again even with nscd running.
If the local user was only created shortly before that, this is the
expected behavior. The whole point is to cache results. Only when they
time out (as controlled in nscd.conf) will the entries be reloaded. And
then they are searched in the usual way, not by preferring the service
which previously provided the result.
It was actually a freshly installed system,
the user was "named" so created
during the install, after the install it took some time until figuring out
named wasn't starting up (permission problems since /var/named was setup for
the local user). I'm pretty sure the problem persisted for longer than the
10 min timeout period that nscd had for passwd, but in any case the local
user should have been there all the time...
Oh well, those cache files were nuked so there's no way of knowing what the
thing was doing and whether the cache timeout was ever reached or not. In
any case I'll keep an eye on similar issues and debug more heavily if
something like this happens again. Could be just a local configuration issue
or a real bug, who knows...