Ubuntu 14.04 Ultimate Server Guide

Part 9: Connecting Mac OS X Clients

This guide is for OS X 10.8 (Mountain Lion). The implementation of Kerberos in 10.7 and above has changed drastically from previous versions of OS X. Before you begin, please make sure you are running the most up to date version of OS X.

It’s easiest to start with a fresh install and just a single local user account (adminlocal).

Changes to the Server

In order for your Ubuntu server to allow OS X clients to connect, we need to modify /etc/krb5.conf slightly by adding the following to the libdefaults section:

allow_weak_crypto = true

So the top of /etc/krb5.conf on the server (neo) should now look something like this:

        default_realm = DANBISHOP.ORG

# The following krb5.conf variables are only for MIT Kerberos.
        krb4_config = /etc/krb.conf
        krb4_realms = /etc/krb.realms
        kdc_timesync = 1
        ccache_type = 4
        forwardable = true
        proxiable = true
        allow_weak_crypto = true

That’s it… restart the server and you’re ready to connect your first OS X client.

Kerberos Configuration

Firstly, we’re going to create a /etc/krb5.conf file so that OS X knows how to talk to our Kerberos server.

sudo nano /etc/krb5.conf

Paste the following into the file:

    ticket_lifetime = 36000
    default_realm = DANBISHOP.ORG
    allow_weak_crypto = TRUE
    noaddresses = TRUE
    forwardable = TRUE

        kdc = neo.danbishop.org
        admin_server = neo.danbishop.org
        default_domain = DANBISHOP.ORG

    .danbishop.org = DANBISHOP.ORG
    danbishop.org = DANBISHOP.ORG

Now we need to tell OS X to use Kerberos as an authentication method. We do this by editing /etc/pam.d/authorization

sudo nano /etc/pam.d/authorization

You might want to backup the original first just in case, then replace it with the following:

# authorization: auth account
auth       optional       pam_krb5.so use_first_pass use_kcminit default_principal
auth       sufficient     pam_krb5.so use_first_pass default_principal
auth       optional       pam_ntlm.so use_first_pass
auth       required       pam_opendirectory.so use_first_pass nullok
account    required       pam_opendirectory.so

That’s Kerberos sorted!

LDAP Configuration

Now OS X needs to know where to find our LDAP server and how to read from it. This is done using System Preferences > Users & Groups.

Select Login Options from the left hand pane and click the padlock to allow changes.

The first thing to do is to set “display login window as” to “Name and Password”. Then hit the Join button by Network Account Server.

When prompted for a server, enter neo.danbishop.org.

Add LDAP server to OS X

Hit ok and OS X will attempt to get the server’s information. You will be warned about the server not providing a secure (SSL) connection. Click continue.

Your server address will appear with a green dot to show it is connected and an edit button to the right. Click “Edit…” then hit “Open Directory Utility…”

Switch to the services tab on Directory Utility and click the lock to make changes. Then double click on LDAPv3 to edit its settings.

Edit LDAPv3 settings OS X

Under LDAP Mappings where “From Server” is currently selected, click the dropdown and select “RFC2307”. You will be prompted to supply a search base suffix.

Supply search base suffix for LDAP on Mac OS X

Enter dc=danbishop,dc=org and hit OK. Hit OK again and then close the directory utility.