How To Install Ldap On Centos 6 Download

(01) Download CentOS 6 (02) Install CentOS (03) Add a User (04) FW & SELinux (05) Configure Networking (06) Configure Services (07) Update System (08) Add Repositories. (01) Configure LDAP Server (02) Add User Accounts (03) Configure LDAP Client (04) LDAP over TLS (05) LDAP Replication. Setting up OpenLDAP on CentOS 6. These instructions are intended to help first-time LDAP administrators get up and running. The following procedures contain instructions for getting started using OpenLDAP on a CentOS 6 system. For more complete information on how to set up OpenLDAP see the OpenLDAP documentation. – Install EPEL Repository on CentOS / RHEL / Scientific Linx 6.x – Install REMI Repository on CentOS / RHEL / Scientific Linux 6.x In this how-to my LDAP server details are given below.

On this page

  1. Install And Configure OpenLDAP On CentOS 5

Install And Configure OpenLDAP On CentOS 5

This tutorial describes OpenLDAP installation on a computer running Red Hat, Fedora, CentOS or any distribution based on the package installer 'yum.'

If you use a distribution with another package installer we install the same packages but with the installer for (aptitude for Debian-based distros).

1) LDAP installation (as root)

[[email protected] ~]# yum install openldap-servers openldap-clientsnss_ldap

2) Copy the directory DB_CONFIG.example

3) Create a password for LDAP

Copy the output of this command (the password SSHA) and add it to sldap.conf:

At first all we modify what is in bold:

Notes: In the tag 'database' select bdb corresponding to the default OpenLDAP data storage format (you can choose MySQL, PostgreSQL or other database formats despite not being recommended at the official site of the OpenLDAP Project http://www.openldap.org/doc/admin24/backends.html).

In suffix we use the domain that will serve LDAP (in this case ldap-kike.com.uy).

Rootdn contains the name that is authenticated in OpenLDAP (Manager here but can be modified to any desired name).

Rootpw is the password of the administrator user (Manager in the example).

4) We are ready to start the server:

Checking configuration files for slapd: config file testingsucceeded [ OK ]

How To Install Ldap On Centos 6 Download Mac

5) All the information to be loaded is introduced into ldif format files.

6) Create a file to initialize the LDAP database

In this case I call the file ldap-init.ldif, and it contains:

7) Initialize the database with the following command

[[email protected] openldap]# /usr/bin/ldapadd -a -x -D'cn=Manager,dc=ldap-kike,dc=com,dc=uy' -W -f ldap-init.ldif

8) Display the contents of the database

[[email protected] openldap]# ldapsearch -h 127.0.0.1 -x -b'dc=ldap-kike,dc=com,dc=uy'

Returns something like this:

How To Install Ldap On Centos 6 Download

# extended LDIF
#
# LDAPv3
# base

# ldap-kike.com.uy
dn: dc=ldap-kike,dc=com,dc=uy
objectClass: dcObject
objectClass: organization
o: Servidor LDAP ldap-kike
dc: ldap-kike
# Manager, ldap-kike.com.uy
dn: cn=Manager,dc=ldap-kike,dc=com,dc=uy
objectClass: organizationalRole
cn: Manager
# search result
search: 2
result: 0 Success
# numResponses: 3
# numEntries: 2

9) The command authconfig-tui

We will configure the files /etc/nsswitch.conf, /etc/ldap.conf, pam and others. This will run in a console and opens a text menu where you configure LDAP authentication support and complete the information (default options are marked with *).

10) Create a user in the LDAP directory.

We also use a ldif formatted file.

In this case, the userPassword is generated in this way:

The parameter -1 is MD5 and salt are random characters.

11) We also add the LDAP directory with ldapadd command

[[email protected] openldap]# ldapadd -a -x -D'cn=Manager,dc=ldap-kike,dc=com,dc=uy' -W -f user.ldif

Verify that the user is walking with the id command:

Active1 year, 8 months ago

How To Install Ldap On Centos

I'm trying to build a LDAP interface using php but have run into this strange problem. I have installed the php-ldap package using yum on my base php install but whenever I call ldap_connect() it says the function is undefined. Seeing phpinfo() I can verify that the ldap extension is indeed installed and enabled.

mr_abbasimr_abbasi

1 Answer

Are you sure you have openldap included?

How To Install Ldap On Centos 6 Download Windows 7

I just realized I have the same issue where phpinfo shows me several other ldap modules loaded by apache, but I do no have openldap

I just got a successful install following the directions here: http://www.aoddy.com/2009/01/18/how-to-install-php-ldap-module-on-centos5/

Instructions from link:

  • yum install php-ldap
  • vi /etc/php.ini
    • add extension=ldap.so
  • service httpd restart
dave4420
41.4k6 gold badges101 silver badges137 bronze badges
dgibbsdgibbs

How To Install Ldap On Centos 6 Download Windows 10

Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.

How To Install Ldap On Centos 6 Download Free

Not the answer you're looking for? Browse other questions tagged phpcentosopenldap or ask your own question.