Samba Winbind2015/05/15 |
Samba Winbind で Windows の Active Directory ドメインに参加します。
LAN 内に Windows Active Directory Domain Service が稼働していることが前提です。
ここでは例として、以下のような Active Directory ドメイン環境で設定します。
|
|||||||||
[1] | Winbind をインストールします。 |
root@smb:~#
aptitude -y install winbind libpam-winbind libnss-winbind krb5-config # レルム名を指定 +------------------+ Configuring Kerberos Authentication +------------------+ | When users attempt to use Kerberos and specify a principal or user name | | without specifying what administrative Kerberos realm that principal | | belongs to, the system appends the default realm. The default realm may | | also be used as the realm of a Kerberos service running on the local | | machine. Often, the default realm is the uppercase version of the local | | DNS domain. | | | | Default Kerberos version 5 realm: | | | | FD3S.SRV.WORLD________________________________________________________ | | | | <Ok> | | | +---------------------------------------------------------------------------+ # AD DS のホスト名を指定 +--------------+ Configuring Kerberos Authentication +---------------+ | Enter the hostnames of Kerberos servers in the FD3S.SRV.WORLD | | Kerberos realm separated by spaces. | | | | Kerberos servers for your realm: | | | | fd3s.srv.world_________________________________________________ | | | | <Ok> | | | +--------------------------------------------------------------------+ # AD DS のホスト名を指定 +------------------+ Configuring Kerberos Authentication +------------------+ | Enter the hostname of the administrative (password changing) server for | | the FD3S.SRV.WORLD Kerberos realm. | | | | Administrative server for your Kerberos realm: | | | | fd3s.srv.world________________________________________________________ | | | | <Ok> | | | +---------------------------------------------------------------------------+ |
[2] | Winbind の設定です。 |
root@smb:~#
vi /etc/samba/smb.conf # 29行目:workgroup を AD DS のドメイン名に変更し、その下に以下のように追記 workgroup = FD3S01
password server = fd3s.srv.world
realm = FD3S.SRV.WORLD security = ads idmap config * : range = 16777216-33554431 template homedir = /home/%U template shell = /bin/bash winbind use default domain = true winbind offline logon = false
root@smb:~#
vi /etc/nsswitch.conf # 7行目:以下のように追記 passwd: compat winbind group: compat winbind shadow: compat winbind
root@smb:~#
vi /etc/pam.d/common-session # 必要があれば、最終行に追記 ( ログイン時にホームディレクトリを自動作成 ) session optional pam_mkhomedir.so skel=/etc/skel umask=077
root@smb:~#
vi /etc/network/interfaces # 参照する DNS を AD に変更 dns-nameservers 10.0.0.100
systemctl restart ifup@eth0
|
[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 'fd3s.srv.world' No DNS domain configured for smb. Unable to perform DNS Update. DNS update failed: NT_STATUS_INVALID_PARAMETER
root@smb:~#
systemctl restart winbind
# AD のユーザー情報表示 root@smb:~# wbinfo -u administrator guest serverworld krbtgt # AD のユーザーにスイッチ root@smb:~# su - serverworld Creating directory '/home/serverworld'. serverworld@smb:~$ |
Sponsored Link |