how to can i get all users list on edirectory (or openldap) on opensuse? or make a full backup from openldap database?


2 Answers 2


You can ask for every uid in your ldap server with ldapsearch command:

ldapsearch -x -LLL uid=*

Making a full backup of your OpenLDAP server is a different thing than getting a user list.

A backup is best made on the server itself using the slapcat utility. slapcat directly reads the backend database files. This way it can make a real full backup fast, including operational attributes which are normally hidden.

However, directly opening the database files also means it can only work on the server where the OpenLDAP daemon (slapd) is located, and slapcat needs to run as root.

The OpenLDAP daemon slapd does not need to run for slapcat to work, but it is OK if it does.

This simple command is often enough to dump a full backup to an LDIF file.

slapcat >/your/backup/file.ldif

But refer to the man page for details if you also want to backup the cn=config database or your setup has more than one LDAP database.

The resulting LDIF file could be used to grep for your user list by the way.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .