Step-by-step OpenLDAP Installation and Configuration - Page 2

Step-by-step OpenLDAP Installation and Configuration of Client System

LDAP Client Configuration

Step #1. Installation

[root@ldapclient ~]#  yum install authconfig

Step #2. Run the command

[root@ldapclient ~]# authconfig

Step #3. Settings

         [*] Use LDAP     [*] Use LDAP Authentication

    [Both should be checked]

        Click "Next".

        [ ] Use TLS   
        Server: ldap.adminmart.com
        Base DN: dc=adminmart,dc=com

        Click "Ok" to confirm.

Note: Use your domain name instead of adminmart.

---------------------------------------------------------------------------

Share this page:

22 Comment(s)

Add comment

Comments

From: at: 2007-02-19 16:39:00

Thanks for the tuto.

Here is a link to  help you configure a backup server (slave server) and another one to configure ProFTPD to use LDAP for authentication (french link but you can google translate ;)).

Nicolargo 

From: Anonymous at: 2010-05-04 06:02:54

Can i have document to configure secure replication.

From: at: 2007-03-12 19:22:03

I had to add a blank line to fix an error in /etc/openldap/adminmart.com.ldif, and I added for groups :

dn: dc=adminmart,dc=com
dc: adminmart
description: LDAP Admin
objectClass: dcObject
objectClass: organizationalUnit
ou: rootobject

dn: ou=People, dc=adminmart,dc=com
ou: People
description: Users of adminmart
objectClass: organizationalUnit

dn: ou=Group, dc=adminmart,dc=com
ou: Group
description: Groups of adminmart
objectClass: organizationalUnit

I copied all of my groups that I wanted in ldap from /etc/groups to /etc/openldap/groups.txt and then ran:
/usr/share/openldap/migration/migrate_groups.pl /etc/openldap/groups.txt /etc/openldap/groups.ldif
After I imported users, and groups, I used phpldapadmin to import shadow passwords. I opened /etc/shadow and copied the password field:
username:$1$0oDpBoKc$qw6grPT4jqgfqkc5Kzd/G.:_____:_:_____:_:::
as {crypt}$1$0oDpBoKc$qw6grPT4jqgfqkc5Kzd/G.
And selected clear in the drop down so it would not try to re-encrypt (mangle) the password.

There is likely a scripted solution for shadow passwords, but I only had about 15 users and it was faster to just do it.

From: ashadeep nagar at: 2009-04-03 13:02:17

          ldap_bind: Invalid credentials (49)

From: anand pavithran at: 2011-01-27 06:44:53

Check for free space in the ldif file.(Some times there will be unwanted space  in the line).

From: Ken at: 2008-09-19 19:02:04

I can't add the domain ldif file - I get prompted for the password, I enter the password used in the slapd.conf (tried both encrypted and plaintext) but still get the error below:

ldap_bind: Can't contact LDAP server (-1)

Thoughts?

From: Anonymous at: 2011-07-13 13:48:53

 ldap_bind: Can't contact LDAP server (-1)

This is when your server is not reachable

 Start the LDAP server and try add the user :)

 

From: vinu at: 2009-02-14 03:34:59

When i entered the password while importing the domain ldif file to LDAP, there was an error

 

ldap_bind: Invalid credentials (49)

 

What might be the problem. The password i entered was same as the one created using slappasswd.  

From: zaza at: 2009-09-08 07:37:21

have u solve the problem with the  "ldap_bind: Invalid credentials (49)"??

 

im facing the same too....

From: Anonymous at: 2011-02-15 19:06:19

I know I'm late to the thread for this, but hopefully this will be of value to future readers.

For the password problem, I was confusing the root password for the user's password.  When doing the ldapadd, I used the root user's password, and that fixed the credentials problem.  Don't use the password of the user you are adding.

For the problem with not finding the server, specify "-h 127.0.0.1" to resolve to localhost.  It doesn't default to any server in the add or search, not even localhost.

From: Anonymous at: 2011-07-13 13:53:02

Hi,

 In the configuration file the line starting with a space is considered a continuation of the previous line

so guys check in the slapd.conf for the "rootpw" line.

if there is a space at the starting of the line then remove it and restart the server it will resolve your problem.

From: Vkram at: 2012-03-29 06:03:07

U rocks..... bro... It worked for me space before rootpw.......

From: Anonymous at: 2010-04-19 13:05:20

Great tutorial, got me up and running in a few hours, after looking for over a week for a decent document to follow...

There is a typo error above that I should highlight. In /etc/openldap/adminmart.com.ldif example above, you need to insert a blank line between each "dn" text area. The result should be:

dn: dc=adminmart,dc=com
dc: adminmart
description: LDAP Admin
objectClass: dcObject
objectClass: organizationalUnit
ou: rootobject
dn: ou=People, dc=adminmart,dc=com
ou: People
description: Users of adminmart
objectClass: organizationalUnit

 

enjoy

From: Anonymous at: 2011-06-16 04:59:24

Really Great DOC... Thanks a lot

From: RogierDikkes at: 2012-03-29 10:02:23

Yeah good document, had some problems with the configuration. Followed all steps but got the error that username and password was incorrect when trying to login with phpadmin environment, after changing cn "Manager" to admin it worked perfect. Thanks for the guide!

From: maryam at: 2012-03-13 06:59:32

I don't have any thing to ldap service in step 2,can I do slapd service instead of ldap?

From: HardeL at: 2014-06-25 13:25:23

Service slapd is the correct service

 so 'service slapd start' to start the service and

 'chkconfig --levels 235 ldap on' to start the service on runlevels 2 3 and 5

From: MacPhotoBiker at: 2012-08-29 15:04:49

Hi,

I did the installation from step one (on CentOS 6), and all went well. But already in step 2, I get an error message: root@vps [~]# chkconfig --levels 235 ldap on

error reading information on service ldap: No such file or directory

Could somebody please guide me how to proceed from here? Any help would be greatly appreciated!

From: Anonymous at: 2012-11-18 11:38:25

I am not able to adding my second entry. Anyone Could you please help me.
[root@client ~]# ldapadd -x -D "cn=Manager,dc=adminmart,dc=com" -W -f /etc/openldap/test1.ldif
Enter LDAP Password:
adding new entry "uid=test1,ou=People,dc=adminmart,dc=com"
ldap_add: No such object (32)
        matched DN: dc=adminmart,dc=com

[root@client ~]# ldapadd -x -D "cn=Manager,dc=adminmart,dc=com" -W -f /etc/openldap/test2.ldif
Enter LDAP Password:
adding new entry "uid=test2,ou=People,dc=adminmart,dc=com"
ldap_add: No such object (32)
        matched DN: dc=adminmart,dc=com

From: Shahid at: 2014-04-23 06:57:42

Hi ,

I have installed LDAP using comand

#yum install *openldap* -y

after installation  service is not running using this command

#service ldap start

 showing the message

service unrecognized

From: Stephen at: 2009-08-11 20:55:24

These directions work on eve F11, but authconfig's gui is now "authconfig-gtx" so you will need both packages.

From: Stephen at: 2009-08-11 20:56:20

These directions work on eve F11, but authconfig's gui is now "authconfig-gtk" so you will need both packages.

SORRY for first post its "authconfig-gtk"