java2db

Bind or connect to the LDAP server using JNDI



To use Java Naming and Directory Interface (JNDI) , no need to add any additional jar files. So it is easy to bind or connect to the LDAP server using JNDI.

Basic requirements to connect to the LDAP server :

Softwares :

connect to the LDAP server LDAP server  (Download LDAP server).

connect to the LDAP server Java Standard Edition  (Download Java).

connect to the LDAP server LDAP certificate (if the LDAP server is in different machine/location ).

For authentication :

connect to the LDAP server IP address and port  of the LDAP server.

connect to the LDAP server LDAP Admin/user  DN and password.

 

LDAP Admin can do all operations like entry addition and deletion, along with other operations . But the LDAP user  can do a specific operations in general.

connect to the LDAP server

Those who tries to connect to the LDAP server , they are LDAP clients . The clients may be  Web server , Application server , another LDAP server and stand alone tools .

 

Connect to the LDAP server in java :

Execution Result:

connect to the LDAP server Specify the LDAP server url  with IP and port  (Ex : ldaps://10.160.2.11:1500).
connect to the LDAP server Set the security authentication is simple (weak authentication because of clear-text password).
connect to the LDAP server Dn is the  Distinguished Name , which is unique .

connect to the LDAP serverPassword is the LDAP’s  user or admin password .

connect to the LDAP server Add all these credentials to a Map or Properties.

connect to the LDAP serverIf the security authentication is none ,it’s a anonymous client.




Related Posts :
Delete entry from OpenLdap with java JNDI
Search or select entry from OpenLdap with java JNDI
Update or edit entry in OpenLdap with java JNDI
Add new entry in OpenLdap using java JNDI
Connect to the OpenLdap with java JNDI
Select more than one entry from LDAP directory using java JNDI
Select an entry from LDAP using java JNDI
Update or modify LDAP entry using java JNDI
   [will not be published]



^ <