最新の GNU C library 2 のスナップショットを手に入れ、コンパイルする必 要があります。また glibc ベースのシステムが必要になります。例えば RedHat Mustang や開発版の Debian などがこれにあたります。ただし注意し て下さい、これらはすべてベータ版のソフトウェアなのです! glibc のスナッ プショットに関するドキュメントを読んで下さい。 glibc 2.0.x には NIS+ のサポートは含まれていませんし、今後もされることはありません。 NIS+ を サポートする最初の公開版は 2.1 になるはずです。
NIS+ クライアントのソフトウェアは以下から入手できます。
libc-*、 glibc-crypt-*、 glibc-linuxthreads-*、 glibc-localedata-*
が置かれています。
nis-tools-1.4.tar.gz、 pam_keylogin-1.0.tar.gz
があります。glibc ベースの配布パッケージは以下から入手できます。
GNU C ライブラリのコンパイルは、ソフトウェアに付属の説明に従って下さい。 NYS や glibc をもとにした libc5 へのパッチも存在します。これらは標準 libc5 をちょっと置き換えてみる場合などに適しています。 http://www-vt.uni-paderborn.de/~kukuku/linux/nisplus.html に、より詳細な情報と最新のソースがあります。
重要: NIS+ クライアントをセットアップする前に、 Solaris の NIS+ ドキュ メントを読んでサーバ側で必要な作業を行って下さい。この文書ではクライア ント側でどうすればよいかについてしか述べていません!
新しい libc と nis-tools をインストールしたら、
domainname nisplus.domain.
nisinit -c -H <NIS+ server>
を実行して cold スタートファイルを初期化します。他のオプションについて
は nisinit
のマニュアルページを読んで下さい。ドメインネームはリブート
のたびに設定されるようにしておいて下さい。あなたのネットワークの NIS+
ドメインネームがわからない場合は、システムかネットワークの管理者に尋ね
て下さい。
次に /etc/nsswitch.conf
ファイルを変更します。 publickey
に書けるサービスは nisplus
だけ("publickey:
nisplus
")で、他のものは書いてはならないことに注意して下さい。
変更後 keyserv
を起動して下さい。これはブート時に毎回起動されるよ
うにしておいて下さい。
keylogin -r
とすればシステムの root の秘密鍵が保管されます(もうこの新しいホストの
公開鍵は NIS+ のサーバに追加しましたよね?)。
"niscat passwd.org_dir" とすれば、 passwd データベースのす べてのエントリを見ることができるはずです。
ログインしたときに、ユーザは自分の秘密鍵を keyserv
にセットする必要が
あります。これは keylogin
を呼び出すことによって行われます。
shadow パッケージの login
はこれをユーザの代わりに実行してくれます。
PAM を認識する login
を用意するには、
pam_keylogin-1.0.tar.gz
からインストールし、
/etc/pam.d/login
ファイルを変更して pwdb
の代わりに
pam_unix_auth
を使うようにする必要があります(pwdb
は NIS+
をサポートしません)。例を示します。
#%PAM-1.0
auth required /lib/security/pam_securetty.so
auth required /lib/security/pam_keylogin.so
auth required /lib/security/pam_unix_auth.so
auth required /lib/security/pam_nologin.so
account required /lib/security/pam_unix_acct.so
password required /lib/security/pam_unix_passwd.so
session required /lib/security/pam_unix_session.so
ネットワークサービススイッチのファイル /etc/nsswitch.conf
は
情報へのアクセス要求が来たときに行う検索の順番を決定するものです。ホス
ト名の検索で用いられる /etc/host.conf
ファイルと似ています。
例えばこのファイルにおいて
hosts: files nisplus dns
と指定すれば、ホスト名の検索機能はまずローカルの /etc/hosts
ファイルを探し、次に NIS+、そしてドメインネームサービス
(/etc/resolv.conf
と named
)と言う順番で検索を行います。
最後までマッチするものがなければエラーが返されることになります。
NIS+ 用の /etc/nsswitch.conf
ファイルとしては、以下のようなも
のが良いでしょう。
# # /etc/nsswitch.conf # # An example Name Service Switch config file. This file should be # sorted with the most-used services at the beginning. # # The entry '[NOTFOUND=return]' means that the search for an # entry should stop if the search in the previous entry turned # up nothing. Note that if the search failed due to some other reason # (like no NIS server responding) then the search continues with the # next entry. # # Legal entries are: # # nisplus Use NIS+ (NIS version 3) # nis Use NIS (NIS version 2), also called YP # dns Use DNS (Domain Name Service) # files Use the local files # db Use the /var/db databases # [NOTFOUND=return] Stop searching if not found so far # passwd: compat group: compat shadow: compat passwd_compat: nisplus group_compat: nisplus shadow_compat: nisplus hosts: nisplus files dns services: nisplus [NOTFOUND=return] files networks: nisplus [NOTFOUND=return] files protocols: nisplus [NOTFOUND=return] files rpc: nisplus [NOTFOUND=return] files ethers: nisplus [NOTFOUND=return] files netmasks: nisplus [NOTFOUND=return] files netgroup: nisplus bootparams: nisplus [NOTFOUND=return] files publickey: nisplus automount: files aliases: nisplus [NOTFOUND=return] files