Snow Leopard, Ubuntu, LDAP & Automounter Step 1: Remove any vestiges of LDAP & automounter

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.

Written by W. Curtis Preston (@wcpreston), four-time O'Reilly author, and host of The Backup Wrap-up podcast. I am now the Technology Evangelist at Sullivan Strickler, which helps companies manage their legacy data

1 comment
  • I think you can do:
    sudo apt-get purge slapd

    remove uninstalls but leaves the data but I believe purge removes the DB and all config files. I’ve been banging my head on this as well and purge is useful ๐Ÿ™‚