如何在Linux中更改打开的ldap defalt端口

问题描述 投票:0回答:1

如何在Linux中更改ldap的默认端口(389)。我们现在使用的默认端口389需要将端口更改为新端口。我们该怎么做。

database        mdb                                                                                                         
maxsize         1073741824                                                                                                  
suffix          "dc=example,dc=com"                                                                                         
rootdn          "cn=Manager,dc=example,dc=com"                                                                              
# Cleartext passwords, especially for the rootdn, should                                                                    
# be avoid.  See slappasswd(8) and slapd.conf(5) for details.                                                               
# Use of strong authentication encouraged.                                                                                  
rootpw          secret                                                                                                      
# The database directory MUST exist prior to running slapd AND                                                              
# should only be accessible by the slapd and slap tools.                                                                    
# Mode 700 recommended.                                                                                                     
directory       /usr/local/var/openldap-data                                                                                
# Indices to maintain                                                                                                       
index   objectClass     eq 
ldap openldap
1个回答
0
投票

这由-hslapd选项控制。在Debian / Ubuntu上,这是SLAPD_SERVICES/etc/default/slapd选项的值。在其他系统上,它可能在systemd服务的ExecStart=行中或任何位置。

如果您当前的slapd命令类似于:

slapd -h "ldap:/// ldapi:///" -F /etc/ldap/slapd.d

然后只需更改相关的URI以包括所需的端口,例如:

slapd -h "ldap://:3389/ ldapi:///" -F /etc/ldap/slapd.d
© www.soinside.com 2019 - 2024. All rights reserved.