| 1 |
.\" Placed in the Public Domain by Sebastian Rittau <[email protected]> |
| 2 |
.TH NSCD.CONF 5 "07 January 2001" |
| 3 |
.UC 5 |
| 4 |
.SH NAME |
| 5 |
nscd.conf \- configuration file for Name Service Caching Daemon |
| 6 |
.hy 0 |
| 7 |
.SH DESCRIPTION |
| 8 |
.I /etc/nscd.conf |
| 9 |
configures the caches used by |
| 10 |
.BR nscd (8) |
| 11 |
as well as some generic options. |
| 12 |
.BR nscd (8) |
| 13 |
is able to use a configuration file at a different location, |
| 14 |
when supplied with the |
| 15 |
.IR -f |
| 16 |
or |
| 17 |
.IR --config-file |
| 18 |
command line option. |
| 19 |
|
| 20 |
.PP |
| 21 |
The configuration file consists of a set of lines. |
| 22 |
Empty lines, and text after a '#' is ignored. |
| 23 |
All remaining lines denote the setting of an option. |
| 24 |
White space before and after options, and between |
| 25 |
options and option arguments is ignored. |
| 26 |
|
| 27 |
There are two kinds of options: General options influence |
| 28 |
.BR nscd (8)'s |
| 29 |
general behaviour, while cache related options only affect the |
| 30 |
specified cache. Options are set like this: |
| 31 |
.nf |
| 32 |
|
| 33 |
general_option option |
| 34 |
cache_option cache_name option |
| 35 |
.fi |
| 36 |
.SH GENERAL OPTIONS |
| 37 |
.TP |
| 38 |
.BI logfile \ file |
| 39 |
Specifies the name of the debug log-file that |
| 40 |
.BR nscd (8) |
| 41 |
should use if |
| 42 |
.B debug-level |
| 43 |
is higher than |
| 44 |
.BR 0 . |
| 45 |
If this option is not set, |
| 46 |
.BR nscd (8) |
| 47 |
will write its debug output to stderr. |
| 48 |
.TP |
| 49 |
.BI debug-level \ level |
| 50 |
If |
| 51 |
.I level |
| 52 |
is higher than |
| 53 |
.BR 0 , |
| 54 |
.BR nscd (8) |
| 55 |
will create some debug output. The higher the level, the more verbose |
| 56 |
the output. |
| 57 |
.TP |
| 58 |
.BI threads \ #threads |
| 59 |
This option sets the number of threads that |
| 60 |
.BR nscd (8) |
| 61 |
should use by default. It can be overridden by calling |
| 62 |
.BR nscd (8) |
| 63 |
with the |
| 64 |
.I -t |
| 65 |
or |
| 66 |
.I --nthreads |
| 67 |
argument. If neither this configuration option nor the command line |
| 68 |
argument is given, |
| 69 |
.BR nscd (8) |
| 70 |
uses 5 threads by default. The minimum is 3. More threads means more |
| 71 |
simultaneous connections that |
| 72 |
.BR nscd (8) |
| 73 |
can handle. |
| 74 |
.TP |
| 75 |
.BI max-threads \ #threads |
| 76 |
Specifies the maximum number of threads to be started. |
| 77 |
.TP |
| 78 |
.BI server-user \ user |
| 79 |
By default, |
| 80 |
.BR nscd (8) |
| 81 |
is run as user root. This option can be set to force |
| 82 |
.BR nscd (8) |
| 83 |
to drop root privileges after startup. It cannot be used when |
| 84 |
.BR nscd (8) |
| 85 |
is called with the |
| 86 |
.I -S |
| 87 |
or |
| 88 |
.I --secure |
| 89 |
argument. Also note that some services require that nscd run as root, so |
| 90 |
using this may break those lookup services. |
| 91 |
.TP |
| 92 |
.BI stat-user \ user |
| 93 |
Specifies the user who is allowed to request statistics. |
| 94 |
.TP |
| 95 |
.BI paranoia \ bool |
| 96 |
.I bool |
| 97 |
must be one of |
| 98 |
.B yes |
| 99 |
or |
| 100 |
.BR no . |
| 101 |
Enabling paranoia mode causes |
| 102 |
.BR nscd (8) |
| 103 |
to restart itself periodically. |
| 104 |
.TP |
| 105 |
.BI restart-interval \ time |
| 106 |
Sets the restart interval to time seconds if periodic restart is enabled by enabling |
| 107 |
paranoia mode. The default value is 3600. |
| 108 |
.SH CACHE OPTIONS |
| 109 |
All cache options take two arguments. The first one denotes |
| 110 |
the service or cache the option should affect. Currently |
| 111 |
.I service |
| 112 |
can be one of |
| 113 |
.BR passwd , |
| 114 |
.BR group , |
| 115 |
or |
| 116 |
.BR hosts . |
| 117 |
.TP |
| 118 |
.BI enable-cache \ service\ bool |
| 119 |
.I bool |
| 120 |
must be one of |
| 121 |
.B yes |
| 122 |
or |
| 123 |
.BR no . |
| 124 |
Each cache is disabled by default and must be enabled explicitly |
| 125 |
by setting this options to |
| 126 |
.BR yes . |
| 127 |
.TP |
| 128 |
.BI positive-time-to-live \ service\ secs |
| 129 |
This is the number of seconds after which a cached entry is |
| 130 |
removed from the cache. This defaults to 3600 seconds (i. e. |
| 131 |
one hour). |
| 132 |
.TP |
| 133 |
.BI negative-time-to-live \ service\ secs |
| 134 |
If an entry is not found by the Name Service, it is added to |
| 135 |
the cache and marked as "not existent". This option sets the number |
| 136 |
of seconds after which such a not existent entry is removed from |
| 137 |
the cache. This defaults to 20 seconds for the |
| 138 |
.B password |
| 139 |
and |
| 140 |
.B host |
| 141 |
caches and to 60 seconds for the |
| 142 |
.B group |
| 143 |
cache. |
| 144 |
.TP |
| 145 |
.BI suggested-size \ service\ prime-number |
| 146 |
This option sets the size of the hash that is used to store the |
| 147 |
cache entries. As this is a hash, it should be reasonably larger |
| 148 |
than the maximum number of entries that is expected to be cached |
| 149 |
simultaneously and should be a prime number. It defaults to a |
| 150 |
size of 211 entries. |
| 151 |
.TP |
| 152 |
.BI check-files \ service\ bool |
| 153 |
.I bool |
| 154 |
must be one of |
| 155 |
.B yes |
| 156 |
(default) or |
| 157 |
.BR no . |
| 158 |
If file checking is enabled, |
| 159 |
.BR nscd (8) |
| 160 |
periodically checks the modification time of |
| 161 |
.IR /etc/passwd , |
| 162 |
.IR /etc/group , |
| 163 |
or |
| 164 |
.I /etc/hosts |
| 165 |
(for the |
| 166 |
.BR passwd , |
| 167 |
.BR group , |
| 168 |
and |
| 169 |
.B host |
| 170 |
cache respectively) |
| 171 |
and invalidates the cache if the file has changed since the |
| 172 |
last check. |
| 173 |
.TP |
| 174 |
.BI persistent \ service\ bool |
| 175 |
.I bool |
| 176 |
must be one of |
| 177 |
.B yes |
| 178 |
(default) or |
| 179 |
.BR no . |
| 180 |
Keep the content of the cache for service over |
| 181 |
.BR nscd (8) |
| 182 |
restarts. Useful when paranoia mode is set. |
| 183 |
.TP |
| 184 |
.BI shared \ service\ bool |
| 185 |
.I bool |
| 186 |
must be one of |
| 187 |
.B yes |
| 188 |
(default) or |
| 189 |
.BR no . |
| 190 |
The memory mapping of the |
| 191 |
.BR nscd (8) |
| 192 |
databases for service is shared with the clients so that they can directly search |
| 193 |
in them instead of having to ask the daemon over the socket each time a lookup is |
| 194 |
performed. |
| 195 |
.TP |
| 196 |
.BI reload-count \ #number |
| 197 |
Sets the number of times a cached record is reloaded before it is pruned from |
| 198 |
the cache. Each cache record has a timeout, when that timeout expires, |
| 199 |
.BR nscd (8) |
| 200 |
will either reload it (query the NSS service again if the data hasn't changed), or |
| 201 |
drop it. |
| 202 |
.TP |
| 203 |
.BI max-db-size \ service\ number-of-bytes |
| 204 |
Sets the maximum allowable size for the service. |
| 205 |
.TP |
| 206 |
.BI auto-propagate \ service\ bool |
| 207 |
When set to no for passwd or group service, then the |
| 208 |
.I .byname |
| 209 |
requests are not added to |
| 210 |
.I passwd.byuid |
| 211 |
or |
| 212 |
.I group.bygid |
| 213 |
cache. This may help for tables containing multiple records for the same id. |
| 214 |
.SH EXAMPLE |
| 215 |
.nf |
| 216 |
|
| 217 |
# This is a comment. |
| 218 |
|
| 219 |
logfile /var/log/nscd.log |
| 220 |
threads 6 |
| 221 |
server-user nobody |
| 222 |
debug-level 0 |
| 223 |
|
| 224 |
enable-cache passwd yes |
| 225 |
positive-time-to-live passwd 600 |
| 226 |
negative-time-to-live passwd 20 |
| 227 |
suggested-size passwd 211 |
| 228 |
check-files passwd yes |
| 229 |
|
| 230 |
enable-cache group yes |
| 231 |
positive-time-to-live group 3600 |
| 232 |
negative-time-to-live group 60 |
| 233 |
suggested-size group 211 |
| 234 |
check-files group yes |
| 235 |
|
| 236 |
enable-cache hosts yes |
| 237 |
positive-time-to-live hosts 3600 |
| 238 |
negative-time-to-live hosts 20 |
| 239 |
suggested-size hosts 211 |
| 240 |
check-files hosts yes |
| 241 |
.fi |
| 242 |
.SH SEE ALSO |
| 243 |
nscd(8), nsswitch.conf(5) |