nscd(8)
๐ nscd(8) โ name service cache daemon ๐
okay so bestie, welcome to nscd(8) from the System Manager's Manual โ yes that's the whole manual section name, we're fancy like that โจ
๐ธ NAME ๐ธ
nscd โ the name service cache daemon, aka your lookup bestie that remembers stuff so you don't have to ๐ง ๐
๐ฆ SYNOPSIS ๐ฆ
so like, the page doesn't actually give us a synopsis line, but nscd runs as a daemon and takes options โ run it and see, iykyk ๐
โจ DESCRIPTION โจ
nscd is a daemon that provides a cache for the most common name service requests. literally its whole job. the default configuration file, /etc/nscd.conf, determines the behavior of the cache daemon โ go read nscd.conf(5) for the deets ๐ซถ
nscd provides caching for accesses of the passwd(5), group(5), hosts(5), services(5) and netgroup databases through standard libc interfaces, such as getpwnam(3), getpwuid(3), getgrnam(3), getgrgid(3), gethostbyname(3), and others. the whole crew ๐ฅ
there are two caches for each database, and this part is important:
- a positive one for items found โ
- a negative one for items not found โ
each cache has a separate TTL (time-to-live) period for its data, so they expire on their own schedule, no cap โณ
okay so note this: theshadowfile is specifically not cached.getspnam(3)calls remain uncached as a result. that's intentional, bestie โ your secrets stay un-looked-up ๐๐
๐ OPTIONS ๐
--helpโ will give you a list with all options and what they do. iconic, self-documenting queen ๐
๐ NOTES ๐
the daemon will try to watch for changes in configuration files appropriate for each database โ like /etc/passwd for the passwd database, or /etc/hosts and /etc/resolv.conf for the hosts database โ and flush the cache when these are changed. very main character behavior, she's paying attention ๐โจ
but (and this is the catch) this will happen only after a short delay โ unless the inotify(7) mechanism is available and glibc 2.9 or later is available. so like, she's fast if she's got the tools, otherwise she's running a little late ๐
annnd this auto-detection does not cover configuration files required by nonstandard NSS modules, if any are specified in /etc/nsswitch.conf. so if you're doing custom NSS stuff, the auto-vibe-check just doesn't reach it ๐ญ
in that case, you need to run the following command after changing the configuration file of the database so that nscd invalidates its cache:
$ nscd -i <database>
fr fr, do not skip this one โ otherwise your cache is out here serving stale info and you're gonna be so confused ๐
๐ SEE ALSO ๐
k that's the whole page, you ate that ๐ โจ โ this iconic piece of documentation comes from Linux man-pages 6.18, dated 2026-02-08, and honestly? she slays. mwah ๐ซถ๐
๐ฆ where this page comes from
- alpine 3.24: man-pages 6.18-r0 ยท GPL-2.0-or-later
- nixos 26.05: man-pages 6.18
- ๐ the page's license: GPL-2.0-or-later
- Copyright 1999, SuSE GmbH
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms