第 7 章 RED HAT GLUSTER STORAGE と WINDOWS ACTIVE DIRECTORY の統合
7.2. 統合
7.2.3. Active Directory とサービスの検証 / テスト
参加に成功すると、Samba および Winbind デーモンを起動できます。
以下のコマンドを使用して nmdb を起動します。
# onnode all service nmb start
winbind サービスおよび smb サービスを起動します。
# onnode all service winbind start
# onnode all service smb start
注記 注記
Winbind を管理する CTDB を以前無効にした場合、Samba は以下のコマンドで
再度有効化できます。
# onnode all ctdb event script enable 50.samba
# onnode all ctdb event script enable 49.winbind
Red Hat Gluster Storage の一部のバージョンでは、selinux ポリシーのバグによ り、「ctdb enablescript SCRIPT」が成功しなくなります。この場合は、
「chmod +x /etc/ctdb/events.d/SCRIPT」を root シェルの回避策として実行で きます。
再起動後に winbind が起動することを確認します。これは、すべてのノードの /etc/sysconfig/ctdb ファイルに「CTDB_MANAGES_BINDBIND=yes」を追加す ることで実現されます。
以下の検証手順を実行します。
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