Active Directory Domain Services (AD DS) でのホストまたはサービスのサーバー プリンシパル名を構成し、サービスの共有の秘密キーを含む .keytab ファイルを生成します。 .keytab ファイルは、Kerberos 認証プロトコルのマサチューセッツ工科大学 (MIT) による実装に基づいています。 ktpass コマンドライン ツールによって、Kerberos 認証をサポートする Windows 以外のサービスでは、Kerberos キー配布センター (KDC) サービスにより提供される相互運用性機能を使用できます。
Syntax
ktpass
[/out <filename>]
[/princ <principalname>]
[/mapuser <useraccount>]
[/mapop {add|set}] [{-|+}desonly] [/in <filename>]
[/pass {password|*|{-|+}rndpass}]
[/minpass]
[/maxpass]
[/crypto {DES-CBC-CRC|DES-CBC-MD5|RC4-HMAC-NT|AES256-SHA1|AES128-SHA1|All}]
[/itercount]
[/ptype {KRB5_NT_PRINCIPAL|KRB5_NT_SRV_INST|KRB5_NT_SRV_HST}]
[/kvno <keyversionnum>]
[/answer {-|+}]
[/target]
[/rawsalt] [{-|+}dumpsalt] [{-|+}setupn] [{-|+}setpass <password>] [/?|/h|/help]
Parameters
Parameter | Description |
---|---|
/アウト <filename> |
生成する Kerberos バージョン 5 の .keytab ファイルの名前を指定します。 Note: This is the .keytab file you transfer to a computer that isn't running the Windows operating system, and then replace or merge with your existing .keytab file, /Etc/Krb5.keytab. |
/princ <principalname> |
host/computer.contoso.com@CONTOSO.COM の形式でプリンシパル名を指定します。 Warning: This parameter is case-sensitive. |
/mapuser さん <useraccount> |
Maps the name of the Kerberos principal, which is specified by the princ parameter, to the specified ___domain account. |
/マポップ {add|set} |
マッピング属性の設定方法を指定します。
|
{-|+} desonly |
DES のみの暗号化が既定で設定されます。
|
/で <filename> |
Windows オペレーティング システムを実行していないホスト コンピューターから読み取る .keytab ファイルを指定します。 |
/通る {password|*|{-|+}rndpass} |
Specifies a password for the principal user name that is specified by the princ parameter. パスワードの入力を求める場合は * を使います。 |
/minpass | ランダム パスワードの最小長を 15 文字に設定します。 |
/maxpass | ランダム パスワードの最大長を 256 文字に設定します。 |
/隠れ {DES-CBC-CRC|DES-CBC-MD5|RC4-HMAC-NT|AES256-SHA1|AES128-SHA1|All} |
keytab ファイルで生成されるキーを指定します。
Note: Because the default settings are based on older MIT versions, you should always use the |
/itercount | AES 暗号化に使う反復回数を指定します。 The default ignores itercount for non-AES encryption and sets AES encryption to 4,096. |
/pタイプ {KRB5_NT_PRINCIPAL|KRB5_NT_SRV_INST|KRB5_NT_SRV_HST} |
プリンシパルの種類を指定します。
|
/kvno <keyversionnum> |
キーのバージョン番号を指定します。 既定値は 1 です。 |
/答える {-|+} |
バックグラウンド応答モードを設定します。
|
/target | 使うドメイン コントローラーを設定します。 既定では、プリンシパル名に基づいてドメイン コントローラーが検出されます。 ドメイン コントローラー名が解決しない場合は、有効なドメイン コントローラーの入力を求めるダイアログ ボックスが表示されます。 |
/rawsalt | キーを生成するときに ktpass に rawsalt アルゴリズムを使うように強制します。 このパラメーターは省略可能です。 |
{-|+}dumpsalt |
このパラメーターの出力には、キーの生成に使われている MIT ソルト アルゴリズムが表示されます。 |
{-|+}setupn |
サービス プリンシパル名 (SPN) に加えて、ユーザー プリンシパル名 (UPN) を設定します。 既定では、.keytab ファイルに両方を設定します。 |
{-|+}setpass <password> |
ユーザーのパスワードが指定された場合は、それを設定します。 rndpass を使った場合は、代わりにランダムなパスワードが生成されます。 |
/? | このコマンドのヘルプを表示します。 |
Remarks
Windows オペレーティング システムが動作していないシステム上で動作するサービスは、AD DS のサービス インスタンス アカウントで構成することができます。 これにより、任意の Kerberos クライアントで Windows KDC を使い、Windows オペレーティング システムが動作していないサービスを認証できるようになります。
The /princ parameter isn't evaluated by ktpass and is used as provided. There's no check to see if the parameter matches the exact case of the userPrincipalName attribute value when generating the Keytab file. 大文字と小文字を区別する Kerberos ディストリビューションにこの Keytab ファイルを使うと、大文字と小文字が正確に一致しない場合に問題が発生することがあり、事前認証中に失敗する可能性もあります。 To check and retrieve the correct userPrincipalName attribute value from a LDifDE export file. For example:
ldifde /f keytab_user.ldf /d CN=Keytab User,OU=UserAccounts,DC=contoso,DC=corp,DC=microsoft,DC=com /p base /l samaccountname,userprincipalname
Examples
Windows オペレーティング システムが動作していないホスト コンピューター用に Kerberos .keytab ファイルを作成するには、プリンシパルをアカウントにマップし、ホスト プリンシパルのパスワードを設定する必要があります。
Active Directory ユーザーとコンピューター スナップインを使って、Windows オペレーティング システムが動作していないコンピューター上にサービスのユーザー アカウントを作成します。 For example, create an account with the name User1.
Use the ktpass command to set up an identity mapping for the user account by typing:
ktpass /princ host/User1.contoso.com@CONTOSO.COM /mapuser User1 /pass MyPas$w0rd /out machine.keytab /crypto all /ptype KRB5_NT_PRINCIPAL /mapop set
Note
同じユーザー アカウントに複数のサービス インスタンスをマップすることはできません。
Merge the .keytab file with the /Etc/Krb5.keytab file on a host computer that isn't running the Windows operating system.