Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../../../.././../usr/man/man8/nscd.8
Real path: /usr/share/man/man8/nscd.8
Zurück
'\" te .\" Copyright (c) 2006, 2023, Oracle and/or its affiliates. .TH nscd 8 "15 Feb 2023" "Oracle Solaris 11.4" "System Administration Commands" .SH NAME nscd \- name service cache daemon .SH SYNOPSIS .LP .nf \fB/usr/sbin/nscd\fR [\fB-L\fR \fIlogfile\fR] [\fB-C\fR \fIcomponent\fR[\fI,component...\fR]] [\fB-D\fR \fIdebuglevel\fR[,\fIdebuglevel\fR...]] .fi .LP .nf \fB/usr/sbin/nscd\fR [\fB-g\fR] [\fB-c\fR \fIcachename\fR\fB,yes\fR|\fBno\fR] [\fB-e\fR \fIcachename\fR\fB,yes\fR|\fBno\fR] [\fB-h\fR \fIcachename\fR\fB,\fR\fIkeep_hot_count\fR] [\fB-i\fR \fIcachename\fR][\fI,cachename...\fR]] [\fB-n\fR \fIcachename\fR\fB,\fR\fInegative_time_to_live\fR] [\fB-p\fR \fIcachename\fR\fB,\fR\fIpositive_time_to_live\fR] [\fB-C\fR \fIcomponent\fR[\fI,component...\fR]] [\fB-D\fR \fIdebuglevel\fR[,\fIdebuglevel\fR...]] [\fB-L\fR \fInewlogfile\fR] .fi .SH DESCRIPTION .sp .LP The \fBnscd\fR daemon provides caching for most name service requests to improve performance. \fBnscd\fR provides a consistent dynamic name service configuration to all processes. .sp .LP \fBnscd\fR is also an administrative tool that transparently passes options to the running daemon (see the second command synopsis). .sp .LP The \fBnscd\fR daemon starts at system boot by the \fBsvc:/system/name-service/cache\fR SMF service and requires no administrative interaction. To manually start the daemon, see the first \fBnscd\fR command synopsis. .sp .LP The service's properties define the behavior of the cache daemon as shown in the \fBnscd.conf\fR(5) man page. .sp .LP Ensure that the \fBnscd\fR daemon is running for \fBldap\fR(7) services to function correctly. .sp .LP \fBnscd\fR provides caching for the \fBauth_attr\fR, \fBbootparams\fR, \fBethers\fR, \fBexec_attr\fR, \fBgroup\fR, \fBhosts\fR, \fBipnodes\fR, \fBnetmasks\fR, \fBnetworks\fR, \fBpasswd\fR, \fBprof_attr\fR, \fBproject\fR \fBprotocols\fR, \fBrpc\fR, \fBservices\fR, and \fBuser_attr\fR, databases by using standard \fBlibc\fR interfaces, such as \fBgetaddrinfo()\fR, \fBgetnameinfo()\fR, \fBgetpwnam()\fR, and others. The \fBshadow\fR file is purposefully not cached. As a result, \fBgetspnam()\fR calls are not cached. .sp .LP Each cache has a separate time-to-live (\fBTTL\fR) for its data. By default, when you modify the local files database (see FILES), that cache is invalidated upon the next call to \fBnscd\fR. .sp .LP The \fBnscd\fR restarts when you update or refresh any of the following services that \fBnscd\fR optionally depends. When \fBnscd\fR restarts, the caches are effectively cleared. .RS +4 .TP .ie t \(bu .el o \fBsvc:/network/nis/client:default\fR, see \fBypbind\fR(8) and \fBypfiles\fR(5) .RE .RS +4 .TP .ie t \(bu .el o \fBsvc:/network/ldap/client:default\fR, see \fBldapclient\fR(8) .RE .RS +4 .TP .ie t \(bu .el o \fBsvc:/network/dns/multicast:default\fR, see \fBmdnsd\fR(8) .RE .sp .LP The files and services monitoring provide a consistent dynamic name service configuration to all processes as all standard \fBlibc\fR interfaces interact with \fBnscd\fR. So, when you commit a configuration change, \fBnscd\fR causes all subsequent calls to use that configuration. So, it is best to ensure that \fBnscd\fR is always running. .sp .LP For comparison, when \fBnscd\fR is not used, processes only gather configuration information upon their initial relevant \fBlibc\fR call. Subsequent calls use that same configuration until those processes are restarted. .sp .LP For example, consider a system that does not have \fBnscd\fR running. Updating that system to use \fBLDAP\fR or \fBNIS\fR, \fBnsswitch.conf\fR(5) is updated to add those sources. As \fBnscd\fR is not running, processes already started before the configuration change (such as \fBsvc.startd\fR and \fBsvc.configd\fR) would not use the new source. In that instance, you should start the \fBnscd\fR service (\fBsvcadm enable name-service/cache\fR) so that all processes benefit from the change, or you should reboot the system to ensure that a consistent configuration is used by all processes. .sp .LP When running with per-user lookups enabled (\fBenable_per_user_lookup\fR in \fBnscd.conf\fR(5)), \fBnscd\fR forks exactly one child process (a per-user \fBnscd\fR) on behalf of the user who makes the request. The per-user \fBnscd\fR uses the credentials of the user to open a per-user connection to the name repository that is configured for the per-user style of lookups. The lookup will be performed in the child process. The results are cached in the process and are available only to the same user. The caches are managed exactly the same as the main \fBnscd\fR daemon manages its own caches. Subsequent requests from the user will be handled by that per-user \fBnscd\fR until it terminates. The per-user \fBnscd\fR uses a configurable inactivity time-to-live (\fBTTL\fR) value and terminates itself after the inactivity TTL expires. .sp .LP The maximum number of per-user \fBnscd\fR processes that can be created by the main \fBnscd\fR is configurable (see \fBnscd.conf\fR(5)). After the maximum number of them are created, the main \fBnscd\fR will use a Least Recently Used (\fBLRU\fR) algorithm to terminate less active child \fBnscd\fR processes as needed. .sp .LP The main \fBnscd\fR daemon creates, monitors, and manages all the child \fBnscd\fR processes. It creates a user's own \fBnscd\fR upon receiving the user's first per-user lookup. When the \fBnscd\fR daemon is started, if per-user lookups are enabled, it checks to ensure all conditions are met before getting ready to create a per-user \fBnscd\fR. When the daemon is stopped, it terminates all the per-user \fBnscd\fR processes under its control. .sp .LP Per-user \fBnscd\fR processes use the same configuration as the main \fBnscd\fR. Once the configuration is read, the per-user \fBnscd\fR will use it for its entire lifetime. .SH OPTIONS .sp .LP Several of the options described below require a \fIcachename\fR specification. Supported values for \fIcachename\fR are: \fBauth_attr\fR, \fBautomount\fR, \fBbootparams\fR, \fBethers\fR, \fBexec_attr\fR, \fBgroup\fR, \fBhosts\fR, \fBipnodes\fR, \fBnetmasks\fR, \fBnetworks\fR, \fBpasswd\fR, \fBprof_attr\fR, \fBproject\fR, \fBprotocols\fR, \fBrpc\fR, \fBservices\fR, \fBtnrhdb\fR. \fBtnrhtp\fR, \fBuser_attr\fR, .sp .LP Options that dynamically update the running \fBnscd\fR daemon do so on a temporary basis until the daemon is restarted. .sp .ne 2 .mk .na \fB\fB-c\fR \fIcachename\fR,\fByes\fR|\fBno\fR\fR .ad .br .sp .6 .RS 4n Temporarily enables or disables the ongoing check of the specified cache. The check invalidates the cache if the database file is modified. To set permanently see \fBcheck_files\fR in \fBnscd.conf\fR(5). .RE .sp .ne 2 .mk .na \fB\fB-e\fR \fIcachename\fR,\fByes\fR|\fBno\fR\fR .ad .br .sp .6 .RS 4n Temporarily enables or disables the specified cache. The data is retrieved, but the results are not cached. To set permanently see \fBenable_cache\fR in \fBnscd.conf\fR(5). .RE .sp .ne 2 .mk .na \fB\fB-g\fR\fR .ad .br .sp .6 .RS 4n Prints the current configuration and statistics to standard output. This is the only option executable by users without the effective UID of \fB0\fR and who have not been assigned the \fBName Service Management\fR rights profile. The configuration shown is the current configuration before processing any other command-line options. .RE .sp .ne 2 .mk .na \fB\fB-h\fR \fIcachename\fR,\fBkeep_hot_count\fR\fR .ad .br .sp .6 .RS 4n Temporarily updates the number of entries to keep current in the specified cache. \fIvalue\fR is an integer that approximates the number of entries that are frequently used during the day. To set permanently, see \fBkeep_hot_count\fR in \fBnscd.conf\fR(5). .RE .sp .ne 2 .mk .na \fB\fB-i\fR \fIcachename\fR\fR .ad .br .sp .6 .RS 4n Invalidate the specified cache of an active \fBnscd\fR daemon. .RE .sp .ne 2 .mk .na \fB\fB-l\fR \fIfilename\fR\fR .ad .br .sp .6 .RS 4n Specifies the debug log file at startup. For backward compatibility, use the \fB-L\fR option. .RE .sp .ne 2 .mk .na \fB\fB-n\fR \fIcachename\fR,\fInegative_ttl\fR\fR .ad .br .sp .6 .RS 4n Temporarily updates time-to-live for negative entries (queries that return a not found response) in the specified cache. \fInegative_ttl\fR is the TTL in seconds. To set permanently, see \fBnegative_time_to_live\fR in \fBnscd.conf\fR(5). .RE .sp .ne 2 .mk .na \fB\fB-p\fR \fIcachename\fR,\fIpositive_ttl\fR\fR .ad .br .sp .6 .RS 4n Temporarily updates time-to-live for successful queries (positive entries) in the specified cache. \fIpositive_ttl\fR is the TTL in seconds. To set permanently, see \fBpositive_time_to_live\fR in \fBnscd.conf\fR(5). .RE .sp .ne 2 .mk .na \fB\fB-C\fR \fIdebug_component_list\fR\fR .ad .br .sp .6 .RS 4n Temporarily sets the list of components to log debug messages, as specified by the \fBdebug_level_list\fR property value. The list is a comma-separated list of names. Valid values are shown in usage output (\fBnscd -?\fR) and are subject to change. The \fBnone\fR value disables all component values, while the \fBall\fR value enables all values. To set permanently, see \fBdebug_components\fR in \fBnscd.conf\fR(5). .RE .sp .ne 2 .mk .na \fB\fB-D\fR \fIdebug_level_list\fR\fR .ad .br .sp .6 .RS 4n Temporarily sets the list of debug levels for which to generate debug messages. The list is a comma-separated list of debug levels. Valid values are shown in usage output (\fBnscd -?\fR) and are subject to change. The \fBnone\fR value disables all debug levels, while the \fBall\fR value enables all debug levels. To set permanently, see \fBdebug_level\fR in \fBnscd.conf\fR(5). .RE .sp .ne 2 .mk .na \fB\fB-L\fR \fIlog_filename\fR\fR .ad .br .sp .6 .RS 4n Temporarily sets the file in which to store debug output. See \fBconfig/logfile\fR in \fBnscd.conf\fR(5). .RE .SH EXAMPLES .LP \fBExample 1\fR Invalidate the Host Cache of an Active Daemon .sp .LP Use the following command when you know that a host's address has been changed in \fBDNS\fR. .sp .in +2 .nf example# \fBnscd -i hosts,ipnodes\fR .fi .in -2 .sp .LP \fBExample 2\fR Enable Debugging for an Active \fBnscd\fR Daemon .sp .LP The following command enables debugging on all components at all levels and writes debug messages to the specified log file. .sp .in +2 .nf example# \fBnscd -g | egrep '(debug|log)'\fR 0 server debug level 0 server debug components "/dev/null" is the server log file example# \fB/usr/sbin/nscd -D all -C all -L /var/tmp/nscd.log\fR example# \fBnscd -g | egrep '(debug|log)'\fR 32767 server debug level 8191 server debug components "/var/tmp/nscd.log" is the server log file .fi .in -2 .sp .LP \fBExample 3\fR Disable Debugging for an Active \fBnscd\fR Daemon .sp .LP The following commands disables debugging and resets the location of the debug log to \fB/dev/null\fR. .sp .in +2 .nf example# \fB/usr/sbin/nscd -D none -C none -L ""\fR .fi .in -2 .sp .SH FILES .sp .ne 2 .mk .na \fB\fB/etc/nscd.conf\fR\fR .ad .br .sp .6 .RS 4n Private configuration file that is automatically generated by \fBsvc:/system/name-service/cache\fR, see \fBnscd.conf\fR(5). .RE .sp .ne 2 .mk .na \fB\fB/etc/nsswitch.conf\fR, \fB/etc/resolv.conf\fR\fR .ad .br .sp .6 .RS 4n Monitored. Modifying the file causes \fBnscd\fR to restart and flush all caches. See \fBnsswitch.conf\fR(5) and \fBresolv.conf\fR(5). .RE .sp .ne 2 .mk .na \fB\fB/etc/bootparams\fR, \fB/etc/ethers\fR, \fB/etc/group\fR, \fB/etc/inet/hosts\fR, \fB/etc/inet/ipnodes\fR, \fB/etc/inet/netmasks\fR, \fB/etc/inet/networks\fR, \fB/etc/inet/protocols\fR, \fB/etc/passwd\fR, \fB/etc/project\fR, \fB/etc/rpc\fR, \fB/etc/security/auth_attr.d\fR, \fB/etc/security/exec_attr.d\fR, \fB/etc/security/prof_attr.d\fR, \fB/etc/security/tsol/tnrhdb\fR, \fB/etc/security/tsol/tnrhtp\fR, \fB/etc/services\fR, \fB/etc/user_attr.d\fR\fR .ad .br .sp .6 .RS 4n Monitored by default. Monitors the relevant cache based on the \fBcheck_files\fR property value, see \fBnscd.conf\fR(5). .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(7) for descriptions of the following attributes: .sp .TS tab( ) box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPE ATTRIBUTE VALUE _ Availability system/core-os .TE .sp .SH SEE ALSO .sp .LP \fBsvcs\fR(1), \fBgetaddrinfo\fR(3C), \fBgetnameinfo\fR(3C), \fBgetpwnam\fR(3C), \fBgetspnam\fR(3C), \fBauth_attr\fR(5), \fBbootparams\fR(5), \fBethers\fR(5), \fBexec_attr\fR(5), \fBgroup\fR(5), \fBhosts\fR(5), \fBnetmasks\fR(5), \fBnetworks\fR(5), \fBnscd.conf\fR(5), \fBnsswitch.conf\fR(5), \fBpasswd\fR(5), \fBprof_attr\fR(5), \fBproject\fR(5), \fBprotocols\fR(5), \fBresolv.conf\fR(5), \fBrpc\fR(5), \fBservices\fR(5), \fBuser_attr\fR(5), \fBypfiles\fR(5), \fBattributes\fR(7), \fBldap\fR(7), \fBgetent\fR(8), \fBldapclient\fR(8), \fBmdnsd\fR(8), \fBsvcadm\fR(8), \fBsvccfg\fR(8), \fBypbind\fR(8) .SH NOTES .sp .LP You can use the \fBsvcadm\fR command to perform administrative actions on \fBsvc:/system/name-service/cache\fR, such as enabling, or requesting restart. You can use the \fBsvcs\fR command to query the service's status. You can use the \fBsvccfg\fR command to configure this service. See \fBnscd.conf\fR(5). .SH HISTORY .sp .LP The Solaris 2.5 OS introduced the \fB/usr/sbin/nscd\fR command that provides cached lookups for the \fBpasswd\fR, \fBgroup\fR, and \fBhosts\fR databases for a limited set of \fBAPI\fR calls. .sp .LP The Oracle Solaris 10 8/07 release enhanced \fBnscd\fR to handle additional databases and \fBAPI\fR calls. The enhancements also include monitoring for runtime changes to name service configuration. .sp .LP Starting with Oracle Solaris 11.4, the \fBnscd\fR daemon must be running for \fBldap\fR(7) services to function correctly.