1nscd(1M)                System Administration Commands                nscd(1M)
2
3
4

NAME

6       nscd - name service cache daemon
7

SYNOPSIS

9       /usr/sbin/nscd  [-f configuration-file] [-g] [-e cachename, yes
10        |  no] [-i cachename]
11
12

DESCRIPTION

14       The  nscd  daemon is a process that provides a cache for most name ser‐
15       vice requests. The default configuration-file /etc/nscd.conf determines
16       the behavior of the cache daemon. See nscd.conf(4).
17
18
19       nscd  provides  caching  for  the  passwd(4),  group(4), hosts(4), ipn‐
20       odes(4), exec_attr(4), prof_attr(4), user_attr(4),  ethers(4),  rpc(4),
21       protocols(4),  networks(4), bootparams(4), audit_user(4), auth_attr(4),
22       services(4), netmasks(4),  printers(4),  project(4)  databases  through
23       standard  libc  interfaces,  such  as gethostbyname(3NSL), getipnodeby‐
24       name(3SOCKET), gethostbyaddr(3NSL), and others. Each cache has a  sepa‐
25       rate   time-to-live   for   its  data;  modifying  the  local  database
26       (/etc/hosts, /etc/resolv.conf, and  so  forth)  causes  that  cache  to
27       become  invalidated  upon  the  next  call  to nscd. The shadow file is
28       specifically not  cached.  getspnam(3C)  calls  remain  uncached  as  a
29       result.
30
31
32       nscd  also  acts as its own administration tool. If an instance of nscd
33       is already running, commands are passed to the running  version  trans‐
34       parently.
35
36
37       When  running  with  per-user  lookups enabled (see nscd.conf(4)), nscd
38       forks one and only one child process (that  is,  a  per-user  nscd)  on
39       behalf  of  the user making the request. The per-user nscd will use the
40       credentials of the user to open  a  per-user  connection  to  the  name
41       repository  configured  for  the  per-user style of lookups. The lookup
42       will be performed in the child process. The results are cached  in  the
43       process and are available only to the same user. The caches are managed
44       exactly the same as the main nscd daemon manages its own caches. Subse‐
45       quent  requests  from  the  user  will be handled by that per-user nscd
46       until it terminates. The per-user nscd uses a  configurable  inactivity
47       time-to-live (TTL) value and terminates itself after the inactivity TTL
48       expires.
49
50
51       The maximum number of per-user nscds that can be created  by  the  main
52       nscd  is  configurable  (see nscd.conf(4)). After the maximum number of
53       them are created, the main nscd will use an LRU algorithm to  terminate
54       less active child nscds as needed.
55
56
57       The  main  nscd  daemon  creates,  monitors,  and manages all the child
58       nscds. It creates a user's own nscd upon  receiving  the  user's  first
59       per-user  lookup.  When the nscd daemon is started, if per-user lookups
60       are enabled, it checks to ensure all conditions are met before  getting
61       ready  to create a per-user nscd. When the daemon is stopped, it termi‐
62       nates all the per-user nscds under its control.
63
64
65       Per-user nscds use the same configuration as the main nscd.  They  read
66       and  use  the same default configuration file or the one specified with
67       the -f command line option. Once the configuration is  read,  the  per-
68       user nscd will use it for its entire lifetime.
69

OPTIONS

71       Several  of  the options described below require a cachename specifica‐
72       tion. Supported values for cachename are: passwd,  group,  hosts,  ipn‐
73       odes,  exec_attr,  prof_attr,  user_attr,  ethers, rpc, protocols, net‐
74       works, bootparams, audit_user, auth_attr, services, netmasks, printers,
75       and project.
76
77       -f configuration-file
78
79           Causes nscd to read its configuration data from the specified file.
80
81
82       -g
83
84           Prints  current  configuration  and  statistics to standard output.
85           This is the only option executable by non-root users.
86
87
88       -e cachename, yes|no
89
90           Enables or disables the specified cache.
91
92
93       -i cachename
94
95           Invalidate the specified cache.
96
97

EXAMPLES

99       Example 1 Stopping and restarting the nscd daemon.
100
101         example# svcadm disable system/name-service-cache
102
103         example# svcadm enable system/name-service-cache
104
105
106

FILES

108       /etc/nscd.conf    Determines athe behavior of the cache daemon
109
110

ATTRIBUTES

112       See attributes(5) for descriptions of the following attributes:
113
114
115
116
117       ┌─────────────────────────────┬─────────────────────────────┐
118       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
119       ├─────────────────────────────┼─────────────────────────────┤
120       │Availability                 │SUNWcsu                      │
121       └─────────────────────────────┴─────────────────────────────┘
122

SEE ALSO

124       svcs(1), svcadm(1M),  getspnam(3C),  gethostbyname(3NSL),  getipnodeby‐
125       name(3SOCKET),  audit_user(4),  auth_attr(4), bootparams(4), ethers(4),
126       exec_attr(4),    group(4),    hosts(4),    netmasks(4),    networks(4),
127       nscd.conf(4),  nsswitch.conf(4),  passwd(4), printers(4), prof_attr(4),
128       project(4),   protocols(4),    rpc(4),    services(4),    user_attr(4),
129       attributes(5)
130

NOTES

132       The output from the -g option to nscd is subject to change. Do not rely
133       upon it as a programming interface.
134
135
136       The nscd service is managed by the service management facility, smf(5),
137       under the service identifier:
138
139         svc:/system/name-service-cache
140
141
142
143
144       Administrative actions on this service, such as enabling, disabling, or
145       requesting restart, can be performed using  svcadm(1M).  The  service's
146       status can be queried using the svcs(1) command.
147
148
149
150SunOS 5.11                        14 Sep 2006                         nscd(1M)
Impressum