Samba AD DC(域控制器)的配置
http://lihaitao.cn/?p=299
山东前辈写的blog
挺好的。。 改天做实验。
■Samba AD DC(域控制器)的配置
为了使用Active Directory,要事前确认下面项目.
・AD DC服务器的主机名:centos7-samba
・域名:TESTAD
・完整域名:TESTAD.LOCAL
1、事前准备
①CentOS7上主机名的配置
# echo centos7-samba > /etc/hostname
上面的命令实行后、重起让主机名生效。
②因为yum 源里没有现成的samba的Domain Controler,所以通过源码安装
①先安装Samba 在make时依赖的软件包
# yum install perl gcc attr libacl-devel libblkid-devel \
gnutls-devel readline-devel python-devel gdb pkgconfig \
krb5-workstation zlib-devel setroubleshoot-server libaio-devel \
setroubleshoot-plugins policycoreutils-python \
libsemanage-python perl-ExtUtils-MakeMaker perl-Parse-Yapp \
perl-Test-Base popt-devel libxml2-devel libattr-devel \
keyutils-libs-devel cups-devel bind-utils libxslt \
docbook-style-xsl openldap-devel autoconf pam-devel \
python2-crypto libtomcrypt libtommath libidn-devel libpcap-devel
②系统cups包没有情况下、cups也要安装,并启动cups服务。
# yum install cups
# systemctl start cups
2、Samba的安装(4.1.12为例,可换成新版4.4.10)
# wget https://download.samba.org/pub/samba/stable/samba-4.1.12.tar.gz
# tar -zxvf samba-4.1.12.tar.gz
# cd samba-4.1.12
# ./configure && make && make install
3、Samba的配置
# /usr/local/samba/bin/samba-tool domain provision –use-rfc2307 –interactive –function-level=2008_R2
Realm: TESTAD.LOCAL (输入最开始设定的域名)
Domain [TESTAD]: (Enter键)
Server Role (dc, member, standalone) [dc]: (Enter键)
DNS backend (SAMBA_INTERNAL, BIND9_FLATFILE, BIND9_DLZ, NONE) [SAMBA_INTERNAL]: (Enter键)
DNS forwarder IP address (write ‘none’ to disable forwarding) [192.168.122.21]: (Enter键)
Administrator password: (管理密码、密码要复合复杂度要求,7文字以上)
Retype password: (管理密码(再次输入))
Looking up IPv4 addresses
Looking up IPv6 addresses
No IPv6 address will be assigned
Setting up secrets.ldb
Setting up the registry
Setting up the privileges database
Setti