OpenLDAP in Debian 4.1
I'm trying to install OpenLDAP on DEbian 4.1 Etch, as the title suggests. I have found several howtos, but they always fail on the first step (apt-get install slapd or some package that installs slapd as a dependency). I get a whole heap of output as a result, but I think the main part is this:
Setting up slapd (2.3.30-5) ...
Creating initial slapd configuration... done.
Creating initial LDAP directory... slapadd: bad configuration file!
Failed to slapadd this data:
This has happened consistently through several attempts and despite several minimal attempts to troubleshoot (minimal only because I only know enough to break it further). It seems a simple matter of recovering a valid configuration file, as the service is installed and can even be started/stopped in /etc/init.d/; however, I'm not sure what file that is and exhaustive googling of everything I can think of has turned up 0 results (other than one guy who apparently had the same error I did and got no help on it, some other forum). Any advice would be appreciated.
Installing openldap on Etch is incredibly easy. The Debian maintainers did a great job at automating the installation for you. It sounds like your openldap install has been corrupted some how.
Normally, you would just do:
# apt-get install slapd
Debian would fetch the files it needs, examine your system to determine your server and domain name, ask you what 'admin' password you want, then automatically create the /etc/ldap/slapd.conf file for you, install the /etc/init.d/slapd start-up file, create a default DIT, add the admin user, and bring up the server! Debian is great... other distro's don't do any of these things. They just install the program files, then leave you to figure out everything by yourself.
Since it sounds like your openldap is messed up somehow, I'd say do a reconfigure on it first.
# dpkg-reconfigure slapd
This will reforce it to ask you configuration questions, then regenerate everything for you, like in the original install.
If you are new to openldap, I should warn you it can be very hard to learn. Depending on what you want to use openldap for, it can be quite challenging.
As for how-to's, most are written for Sarge. I haven't seen any good ones written for Etch. Here's a good one I've used, it was written for sarge (3.1), but works for etch (mostly), and covers openldap and samba integration pretty nicely:
If the above dpkg-reconfigure didn't help, then I'd suggest totally uninstalling the slapd package:
# dpkg --purge slapd
Normally, when you uninstall a package in Debian, it removes everything EXCEPT the config files. The --purge will tell it to remove everything. That way, when you re-install, it should be from scratch.
If you still get errors after reconfiguring and uninstall/reinstalling slapd, I'd suggest if that's a new install, format that hard disk, and start over. I get the feeling you might have tried installing from source... on Debian, it is always best to install from packages when they are available.
Hope this helps
Hi drokmed, thanks for your advice. dpkg --purge was actually one of the first things I tried, thinking the package may have become corrupted as sometimes happens. However, that didn't resolve it. I may compile from source, but I'd prefer to avoid that avenue if possible.
I've been contemplating reformatting, but this server has remained stable for nigh a year (pretty much since I moved), so I would prefer to avoid that as well. However, I am not totally adverse to it as a last resort.
I gave in and reformatted -- there were other problems with my server from when I had tried, unsuccessfully, to setup Xen. After reformatting, apt-get install slapd returned no errors whatsoever. Just figured you would want to know. Thanks for your help in the meantime!
Glad to hear that, I was wondering if you were able to get it working.
|All times are GMT -5. The time now is 07:52 AM.|