Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am working on a script that verifies a computer is connection correctly to both our AD domain and our OpenDirectory server. I bind to the two services using dsconfigad and dsconfigldap and then set the search path using the following commands:

/usr/bin/dscl /Search -create / SearchPolicy CSPSearchPath
/usr/bin/dscl /Search -append / CSPSearchPath "/Active Directory/All Domains"
/usr/bin/dscl /Search/Contacts -create / SearchPolicy CSPSearchPath
/usr/bin/dscl /Search/Contacts -append / CSPSearchPath "/Active Directory/All Domains"
/usr/bin/dscl /Search -append / CSPSearchPath "/LDAPv3/opendirectoryserver.local"
/usr/bin/dscl /Search/Contacts -append / CSPSearchPath "/LDAPv3/opendirectoryserver.local"

It's easy to verify and unbind the computer from the domains but how to I list the SearchPath to check if I need to reset it?

share|improve this question
add comment

2 Answers 2

You can use /usr/bin/dscl /Search -read / to list the items in the SearchPath

share|improve this answer
add comment

you can also use

mcxquery -user = -group = -computer =

you don't need to add anything after the "=" to see details for the current user/group/computer

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.