使用 Samba 安装 AD 域控
环境信息:
域名:z.twe
域控服务器1名:dc1
域控服务器1主机名:dc1.z.twe
域控服务器1 IP地址:192.168.137.101
[DC1]操作
# apt install samba krb5-config winbind smbclient
# mv /etc/samba/smb.conf /etc/samba/smb.conf.old
# samba-tool domain provision
修改DC1的/etc/resolv.conf
search z.twe
domain z.twe
nameserver 192.168.137.101
客户端操作
修改DNS为192.168.137.101,再加域
第二个域控的安装
DC2上操作
# apt install samba krb5-config winbind smbclient krb5-user
修改/etc/krb5.conf
[libdefaults]
dns_lookup_realm = false
dns_lookup_kdc = true
default_realm = Z.TWE
校验
# kinit administrator
# klist
加域
# mv /etc/samba/smb.conf /etc/samba/smb.conf.old
# samba-tool domain join z.twe DC -U”Z\administrator”
# systemctl stop smbd nmbd winbind
# systemctl disable smbd nmbd winbind
# systemctl unmask samba-ad-dc
# systemctl start samba-ad-dc
# systemctl enable samba-ad-dc