On 1 Oct 2013, at 19:46, Clément OUDOT <clem.ou...@gmail.com> wrote:
> You use a base in ldapsearch and a filter in your code. Use 'base' in > search() to set the search base. For Paul's benefit: what's happening here is that LDAP searches *require* that a search base is specified, a search scope is specified, and so on. There are no defaults for these parameters in the protocol. However the ldapsearch program (OpenLDAP's? Netscape's? A vendor's?) he's using does appear to be using some of its own defaults to save you some typing, and he "just" needs to duplicate those in his script. Easier said than done! But the LDAP server's logs might help him work out what his ldapsearch program is actually sending. Maybe the ldapsearch's documentation mentions its defaults too? Failing that, try something like Wireshark and decode what the program is sending. Cheers, Chris