Tips for finding Knowledge Articles

  • - Enter just a few key words related to your question or problem
  • - Add Key words to refine your search as necessary
  • - Do not use punctuation
  • - Search is not case sensitive
  • - Avoid non-descriptive filler words like "how", "the", "what", etc.
  • - If you do not find what you are looking for the first time,reduce the number of key words you enter and try searching again.
  • - Minimum supported Internet Explorer version is IE9
Home  >
article

KB-1785: How to get all machines in every Zone from the UNIX client via ldapsearch

Centrify Identity Service, Mac Edition ,  

12 April,16 at 11:45 AM

Applies to: All versions of Centrify DirectControl on all platforms

 

Question:

 

How to query from the UNIX client for all Zones and machines in those Zones using ldapsearch?

 

Answer:

 

#Get all Centrify Zones

/usr/share/centrifydc/bin/ldapsearch -m -QQQ -LLL -H LDAP:// -b "dc=centrify,dc=dt" "(&(|(displayName=\$cimszoneversion*))(objectclass=container))" dn | egrep -v '(\#|^$)'

 

To search for all computers in a particular zone, add CN=Computers in front of the zone's DN (e.g. -b "CN=Computers,$ZoneDN") and run the command below:

 

#Get all machines for a given Zone

/usr/share/centrifydc/bin/ldapsearch -m -QQQ -LLL -H LDAP:// -b "CN=Computers,$ZONEDN” "(&(displayName=\$cimscomputerversion*)(objectclass=serviceConnectionPoint))" dn | egrep -v '(\#|^$)'

The script can be easily modified for users and groups, but note that the cimsversion filter will need to be updated from what is shown above.

Still have questions? Click here to log a technical support case, or collaborate with your peers in Centrify's Online Community.