linuxldapopenldap

Using LDAPSEARCH to return all Groups and OU's in an Active Directory domain


What would the correct syntax be, using ldapsearch, to return all Groups\OU's and their nested Groups\OU's in an AD domain? I am trying to query a Windows AD DC from a Linux Box and need to have this result returned to the Linux machine.


Solution

  • All groups in the DOMAIN would be:

    (objectClass=group)
    

    All groups and OUs would be:

    (|(objectClass=organizationalUnit)(objectClass=Group))
    

    Not sure what Groups\OU's implies.

    -jim