NSCD, Name Service Cache Daemon, is a daemon that provides a cache for the most common Name Service Switch requests. The default configuration file, /etc/nscd.conf, determines the behavior of the cache daemon.

NSCD provides caching for accesses of the passwd(5), group(5), and hosts(5) databases through standard libc interfaces, such as getpwnam(3), getpwuid(3), getgrnam(3), getgrgid(3), gethostbyname(3), and others.

There are two caches for each database: a positive one for items found, and a negative one for items not found. Each cache has a separate TTL (Time To Live) period for its data.

the Shadow file is specifically not cached. getspnam(3) calls remain uncached as a result.
Some Redhat systems maybe using SSSD instead of NSCD.


NSCD doesn't know anything about the underlying protocols for a service. This also means, that if you change /etc/resolv.conf for DNS queries, nscd will continue to use the old one if you have configured /etc/nsswitch.conf to use DNS for host lookups. In such a case, you need to restart NSCD.

More Information#

There might be more information for this subject on one of the following: