thank u both, i folowed your advices.i changed the basedn to basedn = "dc=example,dc=com"i can successfully perform a ldapsearch -x -b "dc=example,dc=com" uid=bernard