please help me to get any possible was to insert empty values in LDAP using java/sample LDAP script. i have referred many cases but i didn't find any feasible solution .
Thanks in Advance ..
please help me to get any possible was to insert empty values in LDAP using java/sample LDAP script. i have referred many cases but i didn't find any feasible solution .
Thanks in Advance ..
You can only add empty values to attributes whose syntax allow it : IA5String and DNs. An example of command line use :
$ ldapmodify -h localhost -p 1389 -D "cn=directory manager" -w secret12
dn: cn=G,dc=example,dc=com
changetype: modify
add: member
member:
-
Processing MODIFY request for cn=G,dc=example,dc=com
MODIFY operation successful for DN cn=G,dc=example,dc=com
With Java, you will probably need an LDAP client library such as OpenDJ SDK, and build a modify operation where you add an attribute and the value is an empty string. I don't think you can do it with JNDI, but I could be proved wrong.