{% extends 'admin/master.html' %} {% block body %}

LDAP Search

Search the directory of an LDAP account the same way the import reads it — with the connection, base DN and search filter of the account. A search for a hostname without domain also finds the object that carries the domain, so it is visible under which name an object really is in the directory. Nothing is written: neither the directory nor the syncer's objects are changed here.

{% if not ldap_available %}
The python-ldap module is not installed on this server, so no search can be done.
{% endif %} {% if not accounts %}
No enabled LDAP account found. Create one first.
{% endif %}
The attribute the search term is looked for in.
Empty uses the base DN of the account.
Comma separated. Empty asks the server for every attribute of the found objects.
Empty uses the one of the account.
{% if error %}
{{ error }}
{% endif %} {% if wrong_encoding %}
Some values could not be read with the encoding {{ wrong_encoding }} and show a where a character is missing. Search again with utf-8 in the Encoding field — if that reads them, set the same value on the account, otherwise the import stops with a decoding error.
{% endif %} {% if query %}

Used filter: {{ query }}

{% endif %} {% if results is not none %}
{{ results | length }} object(s) found {% if results | length >= limit %} limit reached {% endif %}
{% if not results %}

Nothing found. Try "Hostname contains", switch off the search filter of the account, or widen the base DN.

{% else %} {% for result in results %}
{% if result.hostname %} {{ result.hostname }} would be imported {% else %} no hostname attribute would be skipped {% endif %}
{{ result.dn }}
{% for key, value in result.labels.items() | sort %} {% if key != 'dn' %} {% endif %} {% endfor %}
{{ key }} {{ value }}
{% endfor %} {% endif %}
{% endif %}
{% endblock %}