7.2.3. Active Directory およびサービスの検証/テスト

参加に成功すると、Samba および Winbind デーモンを起動できます。
次のコマンドを使用して、nmdb、winbind、およびsmbサービスを開始します。
RHEL 7 および RHEL 8 で 以下を実行します。
# onnode all systemctl start nmb
# onnode all systemctl start winbind
# onnode all systemctl start smb
RHEL 6 で以下を実行します。
# onnode all service nmb start
# onnode all service winbind start
# onnode all service smb start
注記
  • Winbind および Samba を管理する CTDB の機能を無効にした場合は、次のコマンドで再度有効にできます。
    # onnode all ctdb event script enable legacy 50.samba
    # onnode all ctdb event script enable legacy 49.winbind
  • 最新の ctdb-4.9.8-105.el7rhgs.x86_64 パッケージにより、ctdb 管理対象サービススクリプトのパスが変更されました。スクリプトファイルは、/usr/share/ctdb/events/legacy/ から有効化した後、/etc/ctdb/events/legacy/ で利用できます。
  • ctdb イベントスクリプトを有効にするには、以下のコマンドを実行します。
    ctdb event script enable legacy 49.winbind
  • すべてのノードで ctbd イベントスクリプトを有効にするには、以下のコマンドを実行します。
    # onnode all ctdb event script enable legacy 49.winbind
以下の検証手順を実行します。
  1. 以下の手順を実行して結合を確認します。

    以下のコマンドを使用して、作成したマシンアカウントを使用して AD LDAP サーバーに認証できるかどうかを確認します。
    # net ads testjoin
    Join is OK
  2. 以下のコマンドを実行して、マシンアカウントの LDAP オブジェクトを表示します。
    # net ads status -P
    objectClass: top
    objectClass: person
    objectClass: organizationalPerson
    objectClass: user
    objectClass: computer
    cn: rhs-smb
    distinguishedName: CN=rhs-smb,CN=Computers,DC=addom,DC=example,DC=com
    instanceType: 4
    whenCreated: 20150922013713.0Z
    whenChanged: 20151126111120.0Z
    displayName: RHS-SMB$
    uSNCreated: 221763
    uSNChanged: 324438
    name: rhs-smb
    objectGUID: a178177e-4aa4-4abc-9079-d1577e137723
    userAccountControl: 69632
    badPwdCount: 0
    codePage: 0
    countryCode: 0
    badPasswordTime: 130880426605312806
    lastLogoff: 0
    lastLogon: 130930100623392945
    localPolicyFlags: 0
    pwdLastSet: 130930098809021309
    primaryGroupID: 515
    objectSid: S-1-5-21-2562125317-1564930587-1029132327-1196
    accountExpires: 9223372036854775807
    logonCount: 1821
    sAMAccountName: rhs-smb$
    sAMAccountType: 805306369
    dNSHostName: rhs-smb.addom.example.com
    servicePrincipalName: HOST/rhs-smb.addom.example.com
    servicePrincipalName: HOST/RHS-SMB
    objectCategory: CN=Computer,CN=Schema,CN=Configuration,DC=addom,DC=example,DC=com
    isCriticalSystemObject: FALSE
    dSCorePropagationData: 16010101000000.0Z
    lastLogonTimestamp: 130929563322279307
    msDS-SupportedEncryptionTypes: 31
    
  3. 以下のコマンドを実行して、AD サーバーに関する一般的な情報を表示します。
    # net ads info
    LDAP server: 10.11.12.1
    LDAP server name: dc1.addom.example.com
    Realm: ADDOM.EXAMPLE.COM
    Bind Path: dc=ADDOM,dc=EXAMPLE,dc=COM
    LDAP port: 389
    Server time: Thu, 26 Nov 2015 11:15:04 UTC
    KDC server: 10.11.12.1
    Server time offset: -26
  4. 以下の手順を実行して、winbind が正しく動作しているかどうかを確認します。

    以下のコマンドを実行して、winbindd が AD への認証にマシンアカウントを使用できるかどうかを確認します。
    # wbinfo -t
    checking the trust secret for domain ADDOM via RPC calls succeeded
  5. 以下のコマンドを実行して、指定の名前を Windows SID に解決します。
    # wbinfo --name-to-sid 'ADDOM\Administrator'
    S-1-5-21-2562125317-1564930587-1029132327-500 SID_USER (1)
  6. 以下のコマンドを実行して認証を確認します。
    # wbinfo -a 'ADDOM\user'
    Enter ADDOM\user's password:
    plaintext password authentication succeeded
    Enter ADDOM\user's password:
    challenge/response password authentication succeeded
    または
    # wbinfo -a 'ADDOM\user%password'
    plaintext password authentication succeeded
    challenge/response password authentication succeeded
  7. 以下のコマンドを実行して、id-mapping が適切に機能しているかどうかを確認します。
    # wbinfo --sid-to-uid <SID-OF-ADMIN>
    1000000
  8. 以下のコマンドを実行して、winbind Name Service Switch モジュールが正しく機能していることを確認します。
    # getent passwd 'ADDOM\Administrator'
    ADDOM\administrator:*:1000000:1000004::/home/ADDOM/administrator:/bin/false
  9. 以下のコマンドを実行して、samba が winbind と NSS モジュールが正しく使用できるかどうかを確認します。
    # smbclient -L rhs-smb -U 'ADDOM\Administrator'
    Domain=[ADDOM] OS=[Windows 6.1] Server=[Samba 4.2.4]
    
            Sharename       Type      Comment
            ---------       ----      -------
            IPC$            IPC       IPC Service (Samba 4.2.4)
    Domain=[ADDOM] OS=[Windows 6.1] Server=[Samba 4.2.4]
    
            Server               Comment
            ---------            -------
            RHS-SMB         Samba 4.2.4
    
            Workgroup            Master
            ---------            -------
            ADDOM             RHS-SMB