| 1 |
.\" Copyright 1999, SuSE GmbH |
| 2 |
.\" Copyright, the authors of the Linux man-pages project |
| 3 |
.\" |
| 4 |
.\" SPDX-License-Identifier: GPL-2.0-or-later |
| 5 |
.\" |
| 6 |
.TH nscd 8 2026-02-08 "Linux man-pages (unreleased)" |
| 7 |
.SH NAME |
| 8 |
nscd \- name service cache daemon |
| 9 |
.SH DESCRIPTION |
| 10 |
.B nscd |
| 11 |
is a daemon that provides a cache for the most common name service |
| 12 |
requests. |
| 13 |
The default configuration file, |
| 14 |
.IR /etc/nscd.conf , |
| 15 |
determines the behavior of the cache daemon. |
| 16 |
See |
| 17 |
.BR nscd.conf (5). |
| 18 |
.P |
| 19 |
.B nscd |
| 20 |
provides caching for accesses of the |
| 21 |
.BR passwd (5), |
| 22 |
.BR group (5), |
| 23 |
.BR hosts (5) |
| 24 |
.BR services (5) |
| 25 |
and |
| 26 |
.I netgroup |
| 27 |
databases through standard libc interfaces, such as |
| 28 |
.BR getpwnam (3), |
| 29 |
.BR getpwuid (3), |
| 30 |
.BR getgrnam (3), |
| 31 |
.BR getgrgid (3), |
| 32 |
.BR gethostbyname (3), |
| 33 |
and others. |
| 34 |
.P |
| 35 |
There are two caches for each database: |
| 36 |
a positive one for items found, and a negative one |
| 37 |
for items not found. |
| 38 |
Each cache has a separate TTL (time-to-live) |
| 39 |
period for its data. |
| 40 |
Note that the shadow file is specifically not cached. |
| 41 |
.BR getspnam (3) |
| 42 |
calls remain uncached as a result. |
| 43 |
.SH OPTIONS |
| 44 |
.TP |
| 45 |
.B "\-\-help" |
| 46 |
will give you a list with all options and what they do. |
| 47 |
.SH NOTES |
| 48 |
The daemon will try to watch for changes in configuration files |
| 49 |
appropriate for each database (e.g., |
| 50 |
.I /etc/passwd |
| 51 |
for the |
| 52 |
.I passwd |
| 53 |
database or |
| 54 |
.I /etc/hosts |
| 55 |
and |
| 56 |
.I /etc/resolv.conf |
| 57 |
for the |
| 58 |
.I hosts |
| 59 |
database), and flush the cache when these are changed. |
| 60 |
However, this will happen only after a short delay (unless the |
| 61 |
.BR inotify (7) |
| 62 |
mechanism is available and glibc 2.9 or later is available), |
| 63 |
and this auto-detection does not cover configuration files |
| 64 |
required by nonstandard NSS modules, if any are specified in |
| 65 |
.IR /etc/nsswitch.conf . |
| 66 |
In that case, you need to run the following command |
| 67 |
after changing the configuration file of the database so that |
| 68 |
.B nscd |
| 69 |
invalidates its cache: |
| 70 |
.P |
| 71 |
.in +4n |
| 72 |
.EX |
| 73 |
.RB $ " nscd \-i \f[I]<database>\f[]" |
| 74 |
.EE |
| 75 |
.in |
| 76 |
.SH SEE ALSO |
| 77 |
.BR nscd.conf (5), |
| 78 |
.BR nsswitch.conf (5) |
| 79 |
.\" .SH AUTHOR |
| 80 |
.\" .B nscd |
| 81 |
.\" was written by Thorsten Kukuk and Ulrich Drepper. |