我安装了samba ,并将其设置为一个简单的域控制器 ,我打算将其设置为通过OpenLDAP进行身份validation。 问题是我不能同时运行slapd和samba进程 。
如果我首先运行Samba(桑巴将运行并正常工作),然后接下来的slapd,slapd将不会运行,它告诉我,该端口正在使用,我无法使用它。
slapd启动过程outout:
root @ linuxserver:/ home / mohammed#/etc/init.d/slapd status●slapd.service – LSB:OpenLDAP独立服务器(轻量目录访问协议)加载:加载(/etc/init.d/slapd)活动:失败(结果:退出代码)由于星期三2016-02-17 11:31:36 CET; (8)进程:10297 ExecStop = / etc / init.d / slapd stop(code = exited,status = 0 / SUCCESS)
进程:10697 ExecStart = / etc / init.d / slapd start(code = exited,status = 1 / FAILURE)
- 是否有任何特定的工具来解决域控制器和客户端连接问题?
- 什么可能是configurationLAN客户端使用服务器IP作为域控制器Windowsnetworking中的DNS服务器的原因?
- 哪些端口需要在域控制器上为客户端login才能访问? 继续
- 可以将工作站添加到域而不授予本地pipe理员权限?
- 当DC不可用时,Windows如何运行?
2月17日11:31:36 linuxserver.example.local slapd [10701]:@(#)$ OpenLDAP:slapd(Ubuntu)(Sep 15 2015 21:34:22)$ buildd @ lgw01-27:/ build / openldap– cOgeXt / openldap-2.4.41 + dfsg / debian / build / servers / slapd Feb 17 11:31:36 linuxserver.example.local slapd [10701]:daemon:bind(9)失败errno = 98(地址已经在使用中) 2月17日11:31:36 linuxserver.example.local slapd [10701]:daemon:bind(9)失败errno = 98(地址已经在使用)Feb 17 11:31:36 linuxserver.example.local slapd [10701] slapd停止。 2月17日11:31:36 linuxserver.example.local slapd [10701]:connections_destroy:没有东西要销毁。 2月17日11:31:36 linuxserver.example.local systemd [1]:slapd.service:控制进程退出,代码=退出状态= 1 Feb 17 11:31:36 linuxserver.example.local systemd [1]:失败启动LSB:OpenLDAP独立服务器(轻量级目录访问协议)。 2月17日11:31:36 linuxserver.example.local systemd [1]:slapd.service:单元进入失败状态。 2月17日11:31:36 linuxserver.example.local systemd [1]:slapd.service:失败,结果为“退出代码”。 2月17日11:31:36 linuxserver.example.local slapd [10697]:…失败!
如果我做了相反的事情,所以如果我首先运行slapd(它会正常运行),然后下一个samba,samba将无法正常工作,因为它告诉端口有什么问题,我不能使用它。
桑巴开始stream程:
root @ linuxserver:/ home / mohammed#/etc/init.d/samba status●samba-ad-dc.service – LSB:启动AD DC的Samba守护进程
加载:加载(/etc/init.d/samba-ad-dc)激活:激活(运行),因为星期三2016-02-17 11:38:03 CET; 3s前文件:man:systemd-sysv-generator(8)进程:10774 ExecStop = /etc/init.d/samba-add-doc stop(code = exited,status = 0 / SUCCESS)进程:11026 ExecStart = / etc /init.d/samba-ad-dc start(code = exited,status = 0 / SUCCESS)CGroup:/system.slice/samba-ad-dc.service├─11055/ usr / sbin / samba -D├─11058 / usr / sbin / smbd -D –option =服务器angular色检查:禁止=是–foreground└─11071/ usr / sbin / smbd -D –option =服务器angular色检查:禁止=是–foreground2月17日11:38:05 linuxserver.example.local samba [11060]:[2016/02/17 11:38:05.303292,0] ../source4/smbd/service_stream.c:346(stream_setup_socket)2月17日11: 38:05 linuxserver.example.local samba [11060]:无法侦听:: 1:389 – NT_STATUS_ADDRESS_ALREADY_ASSOCIATED Feb 17 11:38:05 linuxserver.example.local samba [11060]:[2016/02/17 11:38 :05.303771,0] ../source4/ldap_server/ldap_server.c:821(add_socket)Feb 17 11:38:05 linuxserver.example.local samba [11060]:ldapsrv无法绑定到:: 1:389 – NT_STATUS_ADDRESS_ALREADY_ASSOCIATED 2月17 11:38:05 linuxserver.example.local samba [11060]:[2016/02/17 11:38:05.304082,0] ../source4/smbd/service_task.c:35(task_server_terminate)Feb 17 11:38 :05 linuxserver.example.local samba [11060]:
task_server_terminate:[无法启动ldap服务器任务] 2月17日11:38:05 linuxserver.example.local samba [11037]:STATUS =守护进程'samba'完成启动并准备好服务connectionssamba_terminate:失败t … rver任务2月17 11:38:06 linuxserver.example.local smbd [11058]:[2016/02/17 11:38:06.082490,0] ../lib/util/become_daemon.c:136(daemon_ready)Feb 17 11:38 :06 linuxserver.example.local smbd [11072]:STATUS =守护进程的'smbd'完成启动并准备好服务connectionsUnable连接到CUPS s … escriptor 2月17日11:38:06 linuxserver.example.local smbd [11071 ]:
STATUS =守护进程'smbd'完成启动并准备好连接失败以检索打印机… UCCESSFUL提示:一些行被省略号,使用-l来显示完整。
这是我的smb.conf:
[global] workgroup = EXAMPLE realm = EXAMPLE.LOCAL netbios name = LINUXSERVER server role = active directory domain controller dns forwarder = 8.8.8.8 idmap_ldb:use rfc2307 = yes [netlogon] path = /var/lib/samba/sysvol/example.local/scripts read only = No [sysvol] path = /var/lib/samba/sysvol read only = No
有人能帮我解决吗? 提前致谢。
你的问题的答案是正确的(甚至是粗体)
不能同时运行slapd和samba进程。
Samba4是一个LDAP服务器,所以当然它和OpenLDAP要使用相同的端口。
如果您打算使用Samba对OpenLDAP进行身份validation,则无法将其configuration为域控制器。
尽pipeWeb上有很多教程,但获取设置/安装信息的最佳位置是Samba wiki。 如果您设置了Samba Active Directory域控制器,则其他应用程序可以使用LDAP进行身份validation–Samba DC也是LDAP服务器。
因为你的日志说这两个服务都想绑定到端口389。
Samba 4作为DC包含并运行内置的LDAP服务器。
如果你想在同一个主机上运行samba 4 DC和slapd服务器,你需要把它们放在不同的IP地址上。 更改端口不是一个选项,因为它打破了所有的客户端。