Languages

OS X Server: Configuring clients to use SSL for Open Directory binding

This article explains how to configure an Open Directory server and OS X client to use SSL encryption for Open Directory binding.

Server configuration

First enable SSL encryption for Open Directory on the server and select a certificate to use. Refer to Server Help or the Administration Guide for your version of OS X Server.

Apple strongly recommends that you Obtain a trusted certificate to secure your SSL connection, but you can also use a self-signed certificate.

Client configuration

OS X Mountain Lion and Lion clients will automatically use SSL and import the necessary certificate when binding to an Open Directory server that supports it.

  1. Open System Preferences and select Users and Groups.
  2. Click the lock to make changes and enter an administrator password, if necessary.
  3. Click Login Options.
  4. Next to Network Account Server, click Add or Edit.
  5. If necessary, click the + button. Enter the name of the Open Directory server, then click OK.
  6. When prompted to trust the SSL certificates provided by the server, click Trust.

On Mac OS X v10.6 and v10.5 clients, you must manually import the server's SSL certificate before binding.

  1. On the client computer, open Terminal and use one of the following commands to obtain the certificate from the server:

    openssl s_client -connect myServerName:636
    openssl s_client -connect myServerName:636 -showcerts

    Replace myServerName with the fully qualified domain name of the server. Note: the '-showcerts' argument is only necessary when binding to a Lion Server.
     
  2. If necessary, press Control-C to exit the openssl command.
  3. Copy the lines starting from the first "-----BEGIN CERTIFICATE-----" line up to and including the last "-----END CERTIFICATE-----" line. Important: A Lion Server will contain a chain of certificates. Be sure to include them all.
  4. Use the following command to create a file called "mycert" containing the text you copied:

    pbpaste > ~/Desktop/mycert
  5. Use the following command to move the new certificate file to the openldap directory:

    sudo mv ~/Desktop/mycert /etc/openldap/
  6. Using the sudo command and these instructions, edit the /etc/openldap/ldap.conf file. For example:

    sudo pico /etc/openldap/ldap.conf
  7. Under the line "TLS_REQCERT demand" add a new line "TLS_CACERT /etc/openldap/mycert".
  8. Save the changes.
  9. Restart the client computer.
  10. Bind the client to the Open Directory server:

    • In Mac OS X v10.6.4 to 10.6.8, open the Accounts pane of System Preferences, click Login Options, then click the "Join" or "Edit" button next to Network Account Server. Click the + button, enter the FQDN of the Open Directory master, and check the box "Require secure connection (SSL)" and click OK.
    • In Mac OS X v10.6 through 10.6.3, open the Directory Utility application (located in /System/Library/CoreServices) and click the lock to make changes. Double-click "LDAPv3", then click the "New..." button. Enter the FQDN of the Open Directory master, check the box "Encrypt using SSL" and click Continue.
    • In Mac OS X v10.5.x, open the Directory Utility application (located in /Applications/Utilities) and click the + button. Choose type "Open Directory", enter the FQDN of the Open Directory master, and check the box "Encrypt using SSL" and click OK.

 

Additional Information

You may use a different name for the "mycert" file as long as the name of the file matches the reference in ldap.conf.

If SSL is not properly configured on the server, the client will report "Unable to add server. (Server name or IP address) does not support directory connections encrypted with SSL" or "Unable to add server. Operation is not supported by the directory node. (10000)".

Last Modified: Jun 8, 2013
Helpful?
Yes
No
  • Last Modified: Jun 8, 2013
  • Article: HT4183
  • Views:

    10823
  • Rating:
    • 20.0

    (1 Responses)

Additional Product Support Information

Start a Discussion
in Apple Support Communities
See all questions on this article See all questions I have asked