Fedora 25
Sponsored Link

Samba Winbind2016/12/06

 
Samba Winbind で Windows の Active Directory ドメインに参加します。
LAN 内に Windows Active Directory Domain Service が稼働していることが前提です。
ここでは例として、以下のような Active Directory ドメイン環境で設定します。
ドメインサーバー : Windows Server 2012 R2
ドメイン名 : FD3S01
レルム : SRV.WORLD
ホスト名 : fd3s.srv.world
[1] Winbind をインストールします。
[root@smb ~]#
dnf -y install samba-winbind samba-winbind-clients pam_krb5
[2] Winbind の設定です。
# 参照する DNS を AD に変更しておく

[root@smb ~]#
nmcli con mod ens3 ipv4.dns 10.0.0.100

[root@smb ~]#
nmcli con down ens3; nmcli con up ens3
[root@smb ~]#
authconfig \
--enablekrb5 \
--krb5kdc=fd3s.srv.world \
--krb5adminserver=fd3s.srv.world \
--krb5realm=SRV.WORLD \
--enablewinbind \
--enablewinbindauth \
--smbsecurity=ads \
--smbrealm=SRV.WORLD \
--smbservers=fd3s.srv.world \
--smbworkgroup=FD3S01 \
--winbindtemplatehomedir=/home/%U \
--winbindtemplateshell=/bin/bash \
--enablemkhomedir \
--enablewinbindusedefaultdomain \
--update

Job for winbind.service failed because the control process exited with error code.
See "systemctl status winbind.service" and "journalctl -xe" for details.
# 上記 winbind 起動エラーは気にしなくてよい(この段階では起動しない)

[3] Active Directory ドメインに参加します。
# ドメインに参加 ( net ads join -U [AD の管理者ユーザー])

[root@smb ~]#
net ads join -U Administrator

Enter Serverworld's password:
Using short domain name -- FD3S01
Joined 'SMB' to dns domain 'srv.world'
No DNS domain configured for smb. Unable to perform DNS Update.
DNS update failed: NT_STATUS_INVALID_PARAMETER
[root@smb ~]#
systemctl start winbind

[root@smb ~]#
systemctl enable winbind
# ドメイン情報表示

[root@smb ~]#
net ads info

LDAP server: 10.0.0.100
LDAP server name: fd3s.srv.world
Realm: SRV.WORLD
Bind Path: dc=SRV,dc=WORLD
LDAP port: 389
Server time: Wed, 07 Dec 2016 14:28:27 JST
KDC server: 10.0.0.100
Server time offset: -1
Last machine account password change: Wed, 07 Dec 2016 19:27:53 JST

# ドメインユーザー情報表示

[root@smb ~]#
wbinfo -u

administrator
guest
serverworld
krbtgt

# AD のユーザーに遷移可能か確認

[root@smb ~]#
su - Serverworld

Creating directory '/home/serverworld'.
[serverworld@smb ~]$
関連コンテンツ