Article Title: RedHatAS3 configure OpenLDAP. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
The system I use is RedHat AS3. Originally, the system directly carries OpenLDAP, but we 'd better not use the one that comes with the system. The DN will not be able to help decide what the reason is, I cannot understand it for the moment.
(1) Go to http://www.openldap.org/software/download/download the latest OpenLDAP
(2) tar-zxvf openldap.tar.gz and then cd openldap
(3 ). /configure -- disbale-db -- enable-lbdm (if -- disbale-db is not used during compilation, you will be prompted to need Bekerl DB and find that the database has been installed in the system .. I don't understand why I prompted you to install it, So I disabled it. Lbdm is used for LDAP database types)
(3) make depend; make
(4) make test (this step is not required)
(5) make install
The OpenLDAP installation is complete. Next we will configure our OpenLDAP!
(1) first, stop the OpenLDAP/etc/rc. d/init. d/ldap stop of the system.
(2) Configure/usr/local/etc/openldap/slapd. conf.
Database bdb
Suffix "dc = , Dc = "
Rootdn "cn = Manager, dc = , Dc = "
Rootpw secret
Directory/usr/local/var/openldap-data
Is:
Database lbdm (database type)
Suffix "dc = example, dc = com"
Rootdn "cn = Manager, dc = example, dc = com" (set DN)
Rootpw secret (SET Password)
Directory/usr/local/var/openldap-data
(3) Start OpenLDAP
/Usr/local/libexec/slapd
(4) run the following command to test
Ldapsearch-x-B '-s base' (objectclass = *) 'namingcontexts
If
Dn:
NamingContexts: dc = example, dc = com
Indicates that LDAP is correctly started.
(5) Create an LDIF file and add data
Dn: dc = example, dc = com
Objectclass: dcObject
Objectclass: organization
O: Example Company
Dc: example
Dn: cn = Manager, dc = example, dc = com
Objectclass: organizationalRole
Cn: Manager
Run the following command to add a data file:
Ldapadd-x-D "cn = Manager, dc = example, dc = com"-W-f example. ldif
(6) test whether the added data file is correct
Ldapsearch-x-B 'dc = example, dc = com ''(objectclass = *)'
If any data is returned, the configuration is successful!
In this way, your OpenLDAP configuration is successful.
Note:
Creating an LDIF file is prone to input errors.
You can go to http://sourceforge.net/project/showfiles.php? Group_id = 61828 & package_id = 58284 & release_id = 204829
Download a software named phpldapadmin, which is based on PHP, so that LDAP can be easily configured.
The DN cannot be bound only when LDAP is configured in REDHAT AS3.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service