Tuesday, May 5, 2009
How to configure LDAP (lightweight Directory Access Protocol)
For this LDAP configuration, I use RedHat Enterprise 4.
First - you should first check if OpenLDAP has been installed or not, you can check it by typing the command:
# rpm-qa | grep openldap
If you have not installed and have a RedHat cd source, then you can use it without downloading it first. The teps that you can do is install the RPM package from the cd source.
# cd /media/cdrom/RedHat/RPMS
# rpm-ivh openldap-clients-2.2.13-2.i386.rpm
# rpm-ivh openldap-servers-2.2.13-2.i386.rpm
Once confident that the OpenLDAP server and client has been installed, you can continue to the next configuration.
The next step is to make slapd.conf configuration that is on
/etc/ penldap/slapd.conf
If not available please add the following schema file
core.schema
cosine.schema
java.schema
nis.schema
inetorgperson.schema
In the picture above, I change the default file with the "dc = rio, dc = com" in the suffix and rootdn, you also change it to your needs.
Then run the service is using the command:
# service ldap start
You should check namingcontexts to enable all service that was created earlier in the slapd.conf using the command:
# ldapsearch-x-b''-s base '(objectclass =*)' namingContexts
And search results will appear as the image below:
After that you can input data in LDAP and the data that have .ldif extension, the data can be stored in /etc/openldap for example rio.ldif, and you can put a file like this
Add the file with the command:
# ldapadd -x -D 'cn=Manager,dc=rio,dc=com' -f /etc/openldap/rio.ldif -W
Once enter is pressed, the LDAP request a password fill in the password in the slapd.conf earlier in this case the password is secret
Then you can check the availability of data:
# ldapsearch -x -b 'dc=rio,dc=com'
If you already have the image will appear as follows:
Maybe this time only for this section, other times it will continue.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment