検索

30.4.2.3. Active Directory ドメインの例

download PDF
SSSD が Active Directory ドメインと連携するには、Active Directory ドメインとローカルシステムの両方を特別に相互通信できるように設定する必要があります。
注記
Microsoft Active Directory のドキュメントには、Active Directory ドメインの設定に関する完全な手順が記載されています。
  1. authconfig を使用して、Active Directory を LDAP アイデンティティープロバイダーとして使用するように Linux クライアントを設定します。以下に例を示します。
    authconfig --enableldap --enableldapauth --ldapserver=ldap://ad.example.com:389 --enablekrb5 --krb5realm AD-REALM.EXAMPLE.COM --krb5kdc ad-kdc.example.com:88 --krb5adminserver ad-kdc.example.com:749 --update
    authconfig コマンドは、「コマンドラインバージョン」 で説明されています。
  2. Active Directory ドメインサービスロールを作成します。
  3. UNIX サービスの Identity Management を Active Directory Domain Services ロールに追加します。Unix NIS ドメインを設定でドメイン名として使用します。
  4. Active Directory サーバーで、Linux クライアントの名前で新しい Computer オブジェクトを作成します。
    1. Administrative Tools メニューで、Active Directory Users and Computers アプリケーションを選択します。
    2. ad.example.com などの Active Directory ルートオブジェクトを展開します。
    3. Computers を右クリックし、New および Computer アイテムを選択します。
    4. rhel-server などの Linux クライアントの名前を入力し、OK をクリックします。
    5. Computers オブジェクトを展開します。
    6. rhel-server オブジェクトを右クリックし、Properties を選択します。
    7. UNIX Attributes に、Linux NIS ドメインの名前と Linux サーバーの IP アドレスを入力します。
      OK をクリックします。
  5. Active Directory サーバーのコマンドプロンプトから、Linux ホストプリンシパル用のマシンアカウント、パスワード、および UPN を作成します。
    C:\> setspn -A host/rhel-server.example.com@AD-REALM.EXAMPLE.COM rhel-server
    Registering ServicePrincipalNames for CN=rhel server,CN=Computers,DC=ad,DC=example,DC=com
            host/rhel server.example.com@AD-REALM.EXAMPLE.COM
    Updated object						
    	
    C:\> setspn -L rhel-server 
    Registered ServicePrincipalNames for CN=rhel server,CN=Computers,DC=ad,DC=example,DC=com:
            host/rhel server.example.com@AD-REALM.EXAMPLE.COM
    
    C:\> ktpass /princ host/rhel-server.example.com@AD-REALM.EXAMPLE.COM /out rhel-server.keytab /crypto all /ptype KRB5_NT_PRINCIPAL -desonly /mapuser AD\rhel-server$ +rndPass
    
    Targeting domain controller: 
        ad.example.com
    Using legacy password setting method
    Successfully mapped host/rhel server.redhat.com 
    ... 8< ...
  6. Active Directory サーバーから Linux クライアントに keytab をコピーし、/etc/krb5.keytab として保存します。
  7. Linux システムで、キータブファイルのパーミッションと所有者をリセットします。
    [root@rhel-server ~]# chown root:root /etc/krb5.keytab 
    	
    [root@rhel-server ~]# chmod 0600 /etc/krb5.keytab
  8. キータブの SELinux ファイルパーミッションを復元します。
    [root@rhel-server ~]# restorecon /etc/krb5.keytab
  9. ホストが Active Directory ドメインに接続できることを確認します。
    [root@rhel-server ~]# kinit -k -t /etc/krb5.keytab host/rhel-server.example.com@AD-REALM.EXAMPLE.COM
  10. Active Directory サーバーで、Linux ユーザーのグループを作成します。
    1. unixusers という名前の新規グループを作成します。
    2. unixusers グループを開き、Unix Attributes タブを開きます。
    3. Unix 設定を設定します。
      • NIS ドメイン
      • UID
      • /bin/bashへのログインシェル
      • /home/aduserへのホームディレクトリー
      • unixusersへのプライマリーグループ名
  11. 次に、Linux マシンで SSSD ドメインを設定します。

    例30.2 Active Directory 2008 ドメイン

    [root@rhel-server ~]# vim /etc/sssd/sssd.conf
    
    [sssd]
    config_file_version = 2
    domains = ad.example.com
    services = nss, pam
    
    [nss]
    
    [pam]
    
    [domain/ad.example.com]
    cache_credentials = true
    enumerate = false
    
    id_provider = ldap
    auth_provider = krb5
    chpass_provider = krb5
    access_provider = ldap
    
    ldap_sasl_mech = GSSAPI
    ldap_sasl_authid = host/rhel-server.example.com@AD-REALM.EXAMPLE.COM 
    
    
    ldap_schema = rfc2307bis
    
    ldap_user_search_base = ou=user accounts,dc=ad,dc=example,dc=com
    ldap_user_object_class = user
    ldap_user_home_directory = unixHomeDirectory
    ldap_user_principal = userPrincipalName
    ldap_user_name = sAMAccountName
    
    ldap_group_search_base = ou=groups,dc=ad,dc=example,dc=com
    ldap_group_object_class = group
    
    ldap_access_order = expire
    ldap_account_expire_policy = ad
    ldap_force_upper_case_realm = true
    ldap_disable_referrals = true
    
    #krb5_server = server.ad.example.com
    krb5_realm = AD-REALM.EXAMPLE.COM
    これらのオプションは、LDAP ドメイン設定の man ページ sssd-ldap (5) で説明されています。
  12. SSSD を再起動します。
    [root@rhel-server ~]# service sssd restart
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.