SSSS
SSSS

Reputation: 215

How to change open ldap defalt port in linux

How to change open ldap default port(389 ) in Linux. We used now default port 389 need to change the port to new one. how can we do that.

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 

Upvotes: 0

Views: 3919

Answers (1)

rtandy
rtandy

Reputation: 373

This is controlled by the -h option to slapd. On Debian/Ubuntu, this is the value of the SLAPD_SERVICES option in /etc/default/slapd. On other systems, it might be in the ExecStart= line in a systemd service, or anywhere.

If your current slapd command is something like:

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

then just change the relevant URI to include the desired port, for example:

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

Upvotes: 2

Related Questions