スーパーユーザーの PATH
変数に /usr/lib/nis を追加します。
このパスを root の .cshrc または .profile ファイルに追加するか、または変数を直接設定します。
DES 認証を使用する場合には、オプションで、Diffie-Hellman キー長を指定します。
640 ビットの Diffie-Hellman キーとデフォルトの 192 ビットのキーを使用するには、以下を入力します。
nisauthconf dh640-0 des |
640 ビットのキーだけを許可し、192 ビットのキーを拒否するには、以下を入力します。
nisauthconf dh640-0 |
次のコマンドをスーパーユーザー (root) として入力し、ルートマスターサーバーを構成します。
-r オプションはルートマスターサーバーを構成することを示します。-d オプションは NIS+ ドメイン名を指定します。
master1# nisserver -r -d doc.com. This script sets up this machine “master1” as a NIS+ root master server for domain doc.com. Domain name : doc.com. NIS+ group : admin.doc.com. NIS (YP) compatibility : OFF Security level : 2=DES Is this information correct? (type 'y' to accept, 'n' to change) |
「NIS+ グループ」は、doc.com. ドメイン (ドメイン名は常にピリオドで終了する) の情報を変更する権限を持つユーザーのグループです。 NIS+ グループは、ドメインを削除することもできます。NIS+ グループのデフォルト名は、admin.domainname です。この名前の変更方法については、「誤った情報を変更する方法」を参照してください。
「NIS 互換」とは、NIS+ サーバーが NIS クライアントからの情報要求を受け付けるかどうかを意味します。デフォルト設定の OFF に設定されている場合、NIS+ サーバーは NIS クライアントからの要求を処理しません。ON に設定されている場合、NIS+ サーバーはこの要求を処理します。このスクリプトでは、NIS 互換設定を変更できます。「誤った情報を変更する方法」を参照してください。
このスクリプトは、マシンを NIS+ セキュリティの最高レベルであるセキュリティレベル 2 で設定します。このスクリプトを使用する場合、セキュリティレベルを変更できません。スクリプトが終了した後、適切な NIS+ コマンドでセキュリティレベルを変更できます。セキュリティレベルの変更の詳細については、rpc.nisd のマニュアルページを参照してください。
y を入力します (画面の情報が正しい場合)。
n を入力すると、スクリプトは正しい情報の入力を要求します。n を入力した場合の操作については、「誤った情報を変更する方法」を参照してください。
Is this information correct? (type 'y' to accept, 'n'' to change) y This script will set up your machine as a root master server for domain doc.com. without NIS compatibility at security level 2. Use "nisclient -r" to restore your current network service environment. Do you want to continue? (type `y' to continue, `n' to exit the script) |
y を入力して、NIS+ の構成を続けます。
n を入力するとスクリプトは問題なく終了します。y を選んだ後でスクリプトの実行中にスクリプトを中断した場合、スクリプトは動作を停止し、それまでに作成された構成内容はそのまま残されます。スクリプトは自動回復や後始末は行いません。このスクリプトはいつでも再実行できます。
Do you want to continue? (type 'y' to continue, 'n' to exit the script y setting up domain information “doc.com.” ... setting up switch information ... running nisinit ... This machine is in the doc.com. NIS+ domain. Setting up root server ... All done. starting root server at security level 0 to create credentials... running nissetup ... (creating standard directories & tables) org_dir.doc.com. created Enter login password: |
プロンプトに対してマシンの root パスワードを入力し、Return キーを押します。
この例の場合、ユーザーは master1 マシンの root パスワードを入力しています。
Wrote secret key into /etc/.rootkey setting NIS+ group to admin.doc.com. ... restarting root server at security level 2 ... This system is now configured as a root server for domain doc.com. You can now populate the standard NIS+ tables by using the nispopulate or /usr/lib/nis/nisaddent commands. |
これでルートマスターサーバーが構成され、NIS+ の標準テーブルを生成する用意が整いました。続けてテーブルを生成する場合は、「NIS+ テーブルの生成 (populate)」に進みます。