This article is one part in a multi-part series about how to have centralized logins and home directories with Mac OS 10.6 using an Ubuntu 9.10 server, LDAP & Automounter. You can find the parent article here.
Important Note: Unless stated otherwise, all the commands in this procedure should be run as root. To become root from a typical admin user, just type sudo su and enter your password. You can also just stay the regular user and put the word sudo in front of every command. I’m using to a root prompt and that drives me crazy, so I just su to root.
My procedure assumes that you have a virgin slapd configuration. In case you’ve played with slapd before, here’s how to clean it all out. Run the following commands on the Ubuntu server as root.
# /etc/init.d/slapd stop
# cd /var/lib/ldap
# rm -r *
# apt-get autoremove -y slapd ldap-utils migrationtools unixodbc odbcinst1debian1
# cd /etc/ldap
# rm -rf slapd.d
This stops slapd (the LDAP daemon) & removes the LDAP database. The apt-get command then removes slapd and related tools, and any prerequisite software. Then we cd to the slapd.d directory and remove the slapd configuration files.
Now that you have removed any vestiges of slapd and its friends, the next step is to install slapd and configure it.
----- Signature and Disclaimer -----
Written by W. Curtis Preston (@wcpreston). For those of you unfamiliar with my work, I've specialized in backup & recovery since 1993. I've written the O'Reilly books on backup and have worked with a number of native and commercial tools. I am now Chief Technologist at Druva, the leading provider of cloud-based data protection and data management tools for endpoints, infrastructure, and cloud applications. These posts reflect my own opinion and are not necessarily the opinion of my employer.