NSCD(8) Linux Programmer’s Manual NSCD(8)
名前
/usr/sbin/nscd - ネームサービスキャッシュデーモン
説明
nscd は一般的なネームサービスに必要な多くのものをキャッシュとして提供す
るデーモンである。デフォルトの設定ファイル /etc/nscd.conf でキャッシ ュ
デーモンの動作を決定する。 nscd.conf(5) を見よ。
nscd は passwd(5), group(5), hosts(5) データベースへのアクセスのキャッ
シュを getpwnam(3), getpwuid(3), getgrnam(3), getgrgid(3), gethostby-
name(3) などの標準 libc インターフェースを通して提供する。
各データベースには 2 つのキャッシュがある。肯定的 (positive) なキャッシ
ュは見つかったアイテムをキャッシュし、否定的 (negative) なキャッシュ は
見 つ か らなかったアイテムをキャッシュする。各キャッシュはデータの TTL
(time-to-live, 生存時間) を個別に持っている。特例として shadow ファイル
はキャッシュされない点に注意すること。 getspnam(3) を呼び出しても結果と
してキャッシュされないままになる。
オプション
--help 全てのオプションとその動作をリストして表示する。
注意
デーモンは( passwd データベースについては /etc/passwd、 hosts データ ベ
ースについては /etc/hosts と /etc/resolv.conf というような)それぞれのデ
ータベースのための設定ファイルを見張って、これらが変更されるとキャッ シ
ュ をフラッシュする。しかし、これは( inotify(7) が利用可能で、glibc 2.9
以降が利用可能な場合を除いて) 短い遅延の後に起こり、またこの自動検出 は
非標準 NSS モジュールが /etc/nsswitch.conf で指定されている場合はその設
定ファイルには対応しない。この場合、データベースの設定ファイルを変更 し
た 後、 nscd のキャッシュを無効にするために以下のコマンドを実行する必要
がある:
$ nscd -i
NSCD(8) Linux Programmer’s Manual NSCD(8)
NAME
/usr/sbin/nscd - name service cache daemon
DESCRIPTION
Nscd is a daemon that provides a cache for the most common name service
requests. The default configuration file, /etc/nscd.conf, determines
the behavior of the cache daemon. See nscd.conf(5).
Nscd provides caching for accesses of the passwd(5), group(5), and
hosts(5) databases through standard libc interfaces, such as getpw-
nam(3), getpwuid(3), getgrnam(3), getgrgid(3), gethostbyname(3), and
others.
There are two caches for each database: a positive one for items found,
and a negative one for items not found. Each cache has a separate TTL
(time-to-live) period for its data. Note that the shadow file is
specifically not cached. getspnam(3) calls remain uncached as a
result. As a result of this behavior it is not possible to change non-
nscd user to another non-nscd user via su service when nscd is running.
OPTIONS
--help will give you a list with all options and what they do.
NOTES
The daemon will try to watch for changes in configuration files appro-
priate for each database (e.g. /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. However, this will happen only after a
short delay (unless the inotify(7) mechanism is available and glibc 2.9
or later is available), and this auto-detection does not cover configu-
ration files required by non-standard NSS modules, if any are specified
in /etc/nsswitch.conf. 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
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa