Mac OS X,  Mac OS X Server

Mac OS X: Changing to a Custom Search Path with dscl

The Search Path in Mac OS X client can be used to define where your system can search for directory services information, whether local or shared.  To set the search path manually you will first need to switch from LSPSearchPath to CSPSearchPath for your Search Policy.  To do so use the following command:

sudo dscl /Search -change / SearchPolicy dsAttrTypeStandard:LSPSearchPath dsAttrTypeStandard:CSPSearchPath

If you were to want to switch back to a local policy you would just run the following command:

sudo dscl /Search -change / SearchPolicy dsAttrTypeStandard:CSPSearchPath dsAttrTypeStandard:LSPSearchPath