PDA

View Full Version : [ubuntu] LDAP Server on Ubuntu 9.10



bstear
November 17th, 2009, 08:55 PM
I went through the process of doing an apt-get install slapd ldap-utils and setup my password.

Following the documentation at : https://help.ubuntu.com/9.10/serverguide/C/openldap-server.html#openldap-server-installation

when I do a LDAPSEARCH I get the following error : ldap_result: Can't contact LDAP server (-1).

I have been looking at this error for 2 days now. Most people online say to make sure that you have slapd running which it is. I also do not see any log for ldap even though within slapd.conf I made the log_level 256.

I would appreciate any help because I am really at a loss for what it could be. Thanks!

fbonjour
November 18th, 2009, 09:36 PM
Yes, for some reason when you install slapd, apt-get does not prompt for the LDAP password (it should):

fbonjour@vm1 7 $ sudo apt-get install slapd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
slapd
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,601kB of archives.
After this operation, 4,268kB of additional disk space will be used.
Get:1 http://ch.archive.ubuntu.com karmic/main slapd 2.4.18-0ubuntu1 [1,601kB]
Fetched 1,601kB in 4s (368kB/s)
Preconfiguring packages ...
Selecting previously deselected package slapd.
(Reading database ... 43907 files and directories currently installed.)
Unpacking slapd (from .../slapd_2.4.18-0ubuntu1_i386.deb) ...
Processing triggers for man-db ...
Setting up slapd (2.4.18-0ubuntu1) ...
Creating new user openldap... done.
Creating initial slapd configuration... done.
Starting OpenLDAP: slapd.

bstear
November 18th, 2009, 09:42 PM
Thank you for your reply but I have setup the LDAP password.

I ran dpkg-reconfigure slapd and set that up.

Any other suggestions? Is there anything I need to do with DNS or the host file on my system?

I don't currently have DNS setup but I am running the ldap-search on the system that I installed LDAP on.

fbonjour
November 18th, 2009, 09:43 PM
This was answered several times:

http://ubuntuforums.org/showthread.php?t=1313472
http://ubuntuforums.org/showthread.php?p=8161118
http://ubuntuforums.org/showthread.php?p=8154148

Somebody should fix the doc, though:

https://help.ubuntu.com/9.10/serverguide/C/openldap-server.html

bstear
November 18th, 2009, 09:48 PM
Thank you. I did a search for LDAP on here but didn't really find anything. Guess I didn't use the right KEYWORDS when searching.

I will look through these posts. That should help out alot.

All the how-to's make it seem very straight forward but as I see from the other posts it is anything but.

sameer9900
November 19th, 2009, 06:38 PM
Hi,

I was trying to install slapd and ldap-utils (as mentioned in the instruction) on ubuntu. But when I run this command: apt-get install slapd ldap-utils I get following error:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package slapd


Please note I was running the above command as root. If I run only apt-get install ldap-utils, I get following error:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ldap-utils is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package ldap-utils has no installation candidate


Can anyone help please

TotoTron
December 31st, 2009, 02:24 AM
Sameer,

A new installation requires you to update the repository by running apt-get update before apt-get will work.

Cheers.

mech7
March 17th, 2010, 09:05 AM
Hmmm i try di recongifure and it still not ask for password.. only about purge database and then closes... Any other way to set this?