[python-ldap] python-ldap syncrepl consumer

Petr Spacek pspacek at redhat.com
Thu Nov 12 05:35:27 EST 2015

On 12.11.2015 11:03, David Gabriel wrote:
> Dear Petr and all,
> Thanks you very much for your help.
> I am applying the same command as you suggest:
> $ python syncrepl.py 'ldap://
> test.com
> Connecting to LDAP server now...
> Login to LDAP server failed:  {'desc': 'Invalid credentials'}
> But I still get this failure message.
> Kindly find attached my server configuration. Please tell me if I am using
> the right command or I am confusing.
> NB: When I run the syncrepl demo script without any argument I get this
> message:
> python syncrepl.py
> Usage: syncrepl*-client*.py <LDAP URL> <pathname of database>. I am
> wondering if I am using an old version of syncrepl demo file ?
> Thanks in adance.
> 2015-11-11 8:55 GMT+01:00 Petr Spacek <pspacek at redhat.com>:
>> On 10.11.2015 18:41, Michael Ströder wrote:
>>> On 2015-11-10 17:10, David Gabriel wrote:
>>>> Thank you so much for your quick answer.
>>>> Since yesterday I have tried to run the example I found in the
>>>> indicated directory (Demo/pyasn1/syncrepl.py) using this command :
>>>> python syncrepl.py ldap://localhost test.com [1] but I still get this
>>>> error "TypeError: must be string, not None". And it is caused from
>>>> "ldap_url.who" which is None.
>>>> Could you please tell me how to fix this issue ?
>>>> Is it problem coming from server side or the arguments ... ?
>>> Please always send a complete exception traceback if one of the demo
>> scripts
>>> fail.
>> You have to specify BIND DN etc., please see the example:
>> $ python syncrepl.py
>> Usage:
>> syncrepl.py <LDAP URL> <pathname of database>
>> syncrepl.py
>> 'ldap://
>> '
>> db.shelve

You need to change the LDAP URL to suit your needs.
"cn=users,dc=test" is base DN.
"bindname=uid=admin%2ccn=admin%2cdc=test%2cdc=com" is BIND DN.
"X-BINDPW=myPasswd" is obviously a passwword used for BIND :-)

The screenshot should contain values you need.

Petr Spacek  @  Red Hat

More information about the python-ldap mailing list