Setting up LDAP on RHEL4 with Webmin - slapd will not start.
Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Setting up LDAP on RHEL4 with Webmin - slapd will not start.
Mkay so I'll try to speed this up and still be informative as possible so to avoid any questions later on.
OS: RedHat Enterprise Lunix 4 (RHEL4)
- Installed Webmin
- Installed OpenLDAP stuff through Webmin (client, server, user and group settings, etc.)
- Installed OpenLDAP stuff from RPM on RHEL4 disc (I did remove the ones from Webmin before doing so)
- Using some stock settings to set it up (ex= cn=Manager,dc=example,dc=com)
In short - just want create a user account with details then have the computer-name automatically added/resolved when connecting onto the domain.
I'm new to LDAP and its configuration. So I might be replying on more issues later on if I can't find a resource on the net.
Any answers with Webmin would be a bonus for me =D
THE ISSUE
got the LDAP Server configured (so I think) and when I try to start it (through webmin or terminal "service ldap start") I get these errors
Through terminal:
Quote:
[root@redhatbox5 openldap]# service ldap start
Checking configuration files for : config file testing succeeded
Starting slapd: [FAILED]
[root@redhatbox5 openldap]#
Through Webmin
Quote:
Failed to start LDAP server : /usr/sbin/slapd failed :
"slapd -d -1" output
Quote:
[root@redhatbox5 /]# slapd -d -1
@(#) $OpenLDAP: slapd 2.2.13 (Aug 19 2004 21:22:15) $ root@porky.build.redhat.com:/usr/src/build/440386-i386/BUILD/openldap-2.2.13/openldap-2.2.13/build-servers/servers/slapd
daemon_init: <null>
daemon_init: listen on ldap:///
daemon_init: 1 listeners to open...
ldap_url_parse_ext(ldap:///)
daemon: bind(6) failed errno=98 (Address already in use)
daemon: bind(6) failed errno=98 (Address already in use)
slap_open_listener: failed on ldap:///
slapd stopped.
connections_destroy: nothing to destroy.
Here is what my slap.conf looks like
Quote:
# This file should NOT be world readable.
#
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/openldap.schema
# Allow LDAPv2 client connections. This is NOT the default.
allow bind_anon_dn
# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org
# The next three lines allow use of TLS for encrypting connections using a
# dummy test certificate which you can generate by changing to
# /usr/share/ssl/certs, running "make slapd.pem", and fixing permissions on
# slapd.pem so that the ldap user or group can read it. Your client software
# may balk at self-signed certificates, however.
# TLSCACertificateFile /usr/share/ssl/certs/ca-bundle.crt
# TLSCertificateFile /usr/share/ssl/certs/slapd.pem
# TLSCertificateKeyFile /usr/share/ssl/certs/slapd.pem
# Sample access control policy:
# Root DSE: allow anyone to read it
# Subschema (sub)entry DSE: allow anyone to read it
# Other DSEs:
# Allow self write access
# Allow authenticated users read access
# Allow anonymous users to authenticate
# Directives needed to implement policy:
# access to dn.base="" by * read
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/openldap.schema
# Allow LDAPv2 client connections. This is NOT the default.
allow bind_anon_dn
# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org
# The next three lines allow use of TLS for encrypting connections using a
# dummy test certificate which you can generate by changing to
# /usr/share/ssl/certs, running "make slapd.pem", and fixing permissions on
# slapd.pem so that the ldap user or group can read it. Your client software
# may balk at self-signed certificates, however.
# TLSCACertificateFile /usr/share/ssl/certs/ca-bundle.crt
# TLSCertificateFile /usr/share/ssl/certs/slapd.pem
# TLSCertificateKeyFile /usr/share/ssl/certs/slapd.pem
# Sample access control policy:
# Root DSE: allow anyone to read it
# Subschema (sub)entry DSE: allow anyone to read it
# Other DSEs:
# Allow self write access
# Allow authenticated users read access
# Allow anonymous users to authenticate
# Directives needed to implement policy:
# access to dn.base="" by * read
# access to dn.base="cn=Subschema" by * read
# access to *
# by self write
# by users read
# by anonymous auth
#
# if no access controls are present, the default policy
# allows anyone and everyone to read anything but restricts
# updates to rootdn. (e.g., "access to * by * read")
#
# rootdn can always read and write EVERYTHING!
database bdb
suffix dc=example,dc=com
rootdn cn=Manager,dc=example,dc=com
# Cleartext passwords, especially for the rootdn, should
# be avoided. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
# rootpw secret
# rootpw {crypt}ijFYNcSNctBYg
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory /var/lib/ldap
# Indices to maintain for this database
index objectClass eq,pres
index ou,cn,mail,surname,givenname eq,pres,sub
index uidNumber,gidNumber,loginShell eq,pres
index uid,memberUid eq,pres,sub
index nisMapName,nisMapEntry eq,pres,sub
# Replicas of this database
#replogfile /var/lib/ldap/openldap-master-replog
#replica host=ldap-1.example.com:389 starttls=critical
# bindmethod=sasl saslmech=GSSAPI
# authcId=host/ldap-master.example.com@EXAMPLE.COM
rootpw {crypt}52VNMTtThnWumSsTR0SHFY
Last edited by AoiShikaku; 07-29-2008 at 03:27 PM.
Man, I've been stuck on that error for a long time. Thanks for the replies =D
I stopped the service and started the service through webmin and I finally got past that problem, but....
NEW PROBLEM:
Under trees I want to create a new DN with a dummy user account using Webmin. When I am done with what I want it to do I click on create and receive this error:
Quote:
Failed to create new tree : No user to login as has been configured
When I try to browse the database I get this error:
Quote:
The LDAP browser cannot be used : No user to login as has been configured
Under the Schemas tab I have Core, Consine, OpenLDAP, Inetorgperson, and NIS running
I tried to setup the LDAP users and groups, but I wasn't able to create a new user or a new group. (no existing ones there also)
My LDAP client is still on the same computer and I'm still trying to get that setup to talk to the LDAP server.
I dont know what I am missing here or what I should do. Can someone please point me in the correct direction. Such a pain troubleshooting something when you dont know where you are =p
We noticed that the version of OpenLDAP provided by the Red Hat release you are using is 2.2. OpenLDAP 2.4 is now available and OpenLDAP 2.3 is the most common production level. We would highly recommend you upgrade to either of those substantially improved and more capable releases. The easy way to do it is to install Symas OpenLDAP which is a binary package (RPMs available) including OpenLDAP, BDB, OpenSSL, and Cyrus SASL at coordinated patch levels. The package is tested as a unit and installs without interfering with other copies of libraries on your systems. Free downloads are available as is commercial support. See us at www dot symas dot com.
Why don't you try migrating existing users across to make sure your basic setup is working. It may well be the data you are trying to insert is incorrect. See http://www.linuxhomenetworking.com/w...DAP_and_RADIUS as a good example howto (and yes, it works).
Also, I gave up on webmin ages ago, but there are some good ldap utilities like phpldapadmin and ldapam (account manager) that are specifically designed for ldap
I second the suggestion to use something other than Webmin. I like Webmin for many reasons, but LDAP isn't one of them. I now use phpldapadmin to manage my LDAP system.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.