Re: Extract from ZS LDAP

#53781

PatrickB
Member

Hello.

I’m working on a way to do selective backups…

You can easily extract from ZS LDAP using the command ldapsearch.

This one will show all the categories:

> ldapsearch -x -b ‘dc=yourdomain,dc=tld’ ‘(ou=*)’ ou -S ou | grep ou:
(the final ‘:’ is expected).

Result:


ou: Aliases
ou: Computers
ou: DNS
ou: Group
ou: Hosts
ou: Mounts
ou: NAS
ou: Netgroup
ou: Networks
ou: People
ou: Protocols
ou: Radius
ou: Rpc
ou: Services



For your (1) the users are in People:

> ldapsearch -x -u -b ‘ou=People,dc=yourdomain,dc=tld’ -S uid
(if I remember properly, uid looks pertinent for People to sort on).

Hope it can help.
Best regards.