LDAP Python Query differing results from built in linux tool ldapquery -


i'm having issues retrieving attributes ldap server using python ldap script.

first off, can pull using linux command ldapsearch

if run ldapsearch -lll uid=user , not specify host want hit, not of attributes want.

however, if run ldapsearch -lll -h ldaphost uid=user of attributes available. i'm chalking 1 ldap server having more attributes need.

anyway, python script...here's script i'm executing:

    # initialize , bind con = ldap.initialize('ldaphost')  con.simple_bind_s()  # run query against directory basedn = "basedn" searchscope = ldap.scope_subtree retrieveattributes = none searchfilter = uid=user  res = con.search_s(basedn, searchscope, searchfilter, retrieveattributes) print res 

when run python script, output exact same list of attributes achieved when execute ldapsearch -lll uid=user...it's python script not connecting desired host , pulling attributes ldap host give me.

is there additional piece need add script specify ldap host? seems doing in second line of script, i'm not ldap guru , doing wrong. appreciated.

thanks.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -