{% load i18n %}
{% blocktrans %}Error while attempting to connect to LDAP server, base ldapsearch command is still displayed but won’t work as such.{% endblocktrans %}
{% if ldap.errmsg %}{% blocktrans with errmsg=ldap.errmsg %}Server error: {{ errmsg }}{% endblocktrans %}
{% endif %}{% if ldap.require_cert != 'demand' %}LDAPTLS_REQCERT={{ldap.require_cert}} {% endif %}ldapsearch -v -H {{ ldap.ldap_uri }} \
-D "{{ ldap.binddn }}" \
-w "{{ ldap.bindpw }}" \
-b "{{ ldap.basedn }}"{% if ldap.user_filter or ldap.sync_ldap_users_filter %} \
"{% firstof ldap.sync_ldap_users_filter ldap.user_filter %}"{% endif %}
{{ ldap.block }}