我试图通过StartTLS (端口389)对Samba Active Directory进行不同的服务(特别是openfire )的validation。
在设置openfire时,我检查了这个选项(使用StartTLS),但是当我testing连接时,我得到这个错误:
[LDAP: error code 1 - 00002020: Operation unavailable without authentication]
我不得不说,当我尝试通过LDAPS(使用端口636)连接,一切都完美。 无论如何,很显然389上没有encryption的连接将不能用于AD(当我尝试时,openfire告诉我必须使用encryption层)。
有人可以帮助我,请通过StartTLS成功连接?
这是我的smb.conf
[global] netbios name = S1 realm = NOURELDIN.LOCAL workgroup = NOURELDIN dns forwarder = 8.8.8.8 server role = active directory domain controller idmap_ldb:use rfc2307 = yes ldap ssl = start tls [netlogon] path = /usr/local/samba/var/locks/sysvol/noureldin.local/scripts read only = No [sysvol] path = /usr/local/samba/var/locks/sysvol read only = No
PS。 我试着添加和删除(ldap ssl = start tls)行没有区别。
我感谢任何帮助。
您可能需要在openfire系统中导入samba ADS CA证书
编辑:我在一个centos vm中安装了samba4,并configuration了openfire,以startls来使用ldap。
在samba wiki( https://wiki.samba.org/index.php/Build_Samba_from_source,https://wiki.samba.org/index.php/Setup_a_Samba_Active_Directory_Domain_Controller )中指出的从源安装samba4之后,我改变了目录samba域控制器到/ usr / local / samba / private / tls
在这个文件夹里面有三个文件:
# pwd /usr/local/samba/private/tls [root@dc1 tls]# ls -l total 12 -rw-r--r--. 1 root root 2025 Jun 20 21:29 ca.pem -rw-r--r--. 1 root root 2029 Jun 20 21:29 cert.pem -rw-------. 1 root root 3243 Jun 20 21:29 key.pem
复制ca.pem的内容。 一种方法是:
# cat ca.pem
将所有内容复制到—– BEGIN CERTIFICATE —– —– END CERTIFICATE —–
在openfire控制台中,转到TLS / SSL证书并单击pipe理服务器联合存储的信任存储区中的存储内容:
点击“从…导入”:
并给新的CA添加一个名字,如“my awesome samba4 domain”,并粘贴ca.pem的内容:
validation新的CA在那里,它应该被添加到受信任的商店的列表:
在服务器设置中validation您正在使用startls:
重新启动openfire,在Web控制台中以pipe理用户身份login。 要validation你正在使用starttls你可以使用tcpdump。
完成。