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?

link|improve this question

71% accept rate
feedback

1 Answer

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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