Centos7配置Samba加入windows域

centos7 & samba & windows ads

http://www.server-world.info/en/note?os=CentOS_7&p=samba&f=3

安装

yum -y install samba-winbind samba-winbind-clients pam_krb5

配置dns服务器

nmcli c modify em1 ipv4.dns 192.168.3.254

nmcli c down em1; nmcli c up em1

配置域相关参数

authconfig \

--enablekrb5 \

--krb5kdc=domainserver.domain.com \

--krb5adminserver=domainserver.domain.com \

--krb5realm=DOMAIN \

--enablewinbind \

--enablewinbindauth \

--smbsecurity=ads \

--smbrealm=domain.com \

--smbservers=domainserver.domain.com \

--smbworkgroup=ARTSTREE \

--winbindtemplatehomedir=/home/%U \

--winbindtemplateshell=/bin/bash \

--enablemkhomedir \

--enablewinbindusedefaultdomain \

--update

加入域并启动winbind服务

net ads join -U"administrator"%"password"

systemctl start winbind

systemctl enable winbind

net ads info

wbinfo -u

wbinfo -t

wbinfo -g

net rpc rights grant "ARTSTREE\Domain Admins" SeDiskOperatorPrivilege -U "USER\administrator"