All posts by admin

Binding to an Open Directory via Command Line

To add an OD via command line, you need to first bind to it using the command below.

$ dsconfigldap -v -a server.example.com

then use dscl to add the custom search path (CSP).

$ dscl /search append / CSPSearchPath /LDAv3/server.example.com

However, i am not too sure how exactly you would select the CSP after using dscl, but i think the below could work.

$ dscl -q localhost -change /Search SearchPolicy dsAttrTypeStandard:CSPSearchPath

Restart Directory Services after the changes are made.

$ sudo killall DirectoryServices

Setting or Resetting Hostname in OSX

There are 3 ways to do this. Some of which are for local service names within OSX. I suggest keeping them all in sync.

Edit the /etc/hostconfig file and change
HOSTNAME=-AUTOMATIC-
to
HOSTNAME=servername.example.com
sudo scutil --set HostName servername
sudo scutil –-set LocalHostName servername
systemsetup -setcomputername servername