Comments on: How to Install LDAP on CentOS 7 https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/ Linux Tutorials and Guides Fri, 15 Sep 2023 09:34:21 +0000 hourly 1 https://wordpress.org/?v=6.6.1 By: admin https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-805 Fri, 15 Sep 2023 09:34:21 +0000 https://linuxhostsupport.com/blog/?p=457#comment-805 In reply to Irfan Haque.

Please make sure that your system is connected to the Internet.

]]>
By: Irfan Haque https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-803 Tue, 12 Sep 2023 08:10:39 +0000 https://linuxhostsupport.com/blog/?p=457#comment-803 I am using “yum update” command, but getting below error. how to resolve it?
[root@Linux-reg1 ~]# yum update
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#7 – “Failed to connect to 2a05:d012:8b5:6503:9efb:5cad:348f:e826: Network is unreachable”

One of the configured repositories failed (Unknown),
and yum doesn’t have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work “fix” this:

1. Contact the upstream for the repository and get them to fix the problem.

2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).

3. Run the command with the repository temporarily disabled
yum –disablerepo= …

4. Disable the repository permanently, so yum won’t use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use –enablerepo for temporary usage:

yum-config-manager –disable
or
subscription-manager repos –disable=

5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:

yum-config-manager –save –setopt=.skip_if_unavailable=true

Cannot find a valid baseurl for repo: base/7/x86_64

]]>
By: lewis robson https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-640 Mon, 04 Apr 2022 15:54:44 +0000 https://linuxhostsupport.com/blog/?p=457#comment-640 In reply to Ganeshbabu.

I got around this by doing:
ldapadd -x -W -D “cn=ldapadm,dc=xys,dc=co,dc=uk” -f base.ldif -H ldap://localhost

]]>
By: Marat https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-592 Tue, 01 Feb 2022 07:26:02 +0000 https://linuxhostsupport.com/blog/?p=457#comment-592 In reply to Lukas.

thanks a lot!

]]>
By: Aiden https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-555 Thu, 18 Nov 2021 11:04:57 +0000 https://linuxhostsupport.com/blog/?p=457#comment-555 In reply to Greg.

Hello,

I had the same problem.
Be careful when copying and pasting, a space can be added between each block.
Make sure there is no space.

]]>
By: Divya https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-462 Wed, 14 Apr 2021 20:55:09 +0000 https://linuxhostsupport.com/blog/?p=457#comment-462 In my test environment, i need to use “O=” style schema. Do i just replace dc= to o=? Any guidance would be really helpful.

]]>
By: Ludde https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-388 Fri, 18 Sep 2020 09:05:09 +0000 https://linuxhostsupport.com/blog/?p=457#comment-388 In reply to Peter.

Regarding the error with certs.ldif, try changin the order and put the key first, like this:

——————————————————–
dn: cn=config
changetype: modify
replace: olcTLSCertificateKeyFile
olcTLSCertificateKeyFile: /etc/openldap/certs/myldap.field.linuxhostsupport.com.key

dn: cn=config
changetype: modify
replace: olcTLSCertificateFile
olcTLSCertificateFile: /etc/openldap/certs/myldap.field.linuxhostsupport.com.cert
—————————————————————–

Regarding the password, you are supposed to use the plain text version of the password. So if your password is “supersecretpassword”, write that. You might want to check that you entered hashed version at the bottom of the db.ldif file.
It’s a generic line there that should be changed to the hashed password.

….
olcRootPW: hashed_output_from_the_slappasswd_command

]]>
By: Slawek https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-375 Mon, 27 Jul 2020 03:54:46 +0000 https://linuxhostsupport.com/blog/?p=457#comment-375 In reply to val.

I have exactly the same issue nothing helps, chmod, swapping key with cert order. any other suggestions??

I’ve enabled debug mode and get this output from ldapmodify command

ber_scanf fmt ({) ber:
ber_dump: buf=0x5640523751a0 ptr=0x5640523751a5 end=0x564052375205 len=96
0000: 66 5e 04 09 63 6e 3d 63 6f 6e 66 69 67 30 51 30 f^..cn=config0Q0
0010: 4f 0a 01 02 30 4a 04 18 6f 6c 63 54 4c 53 43 65 O…0J..olcTLSCe
0020: 72 74 69 66 69 63 61 74 65 4b 65 79 46 69 6c 65 rtificateKeyFile
0030: 31 2e 04 2c 2f 65 74 63 2f 6f 70 65 6e 6c 64 61 1..,/etc/openlda
0040: 70 2f 63 65 72 74 73 2f 6c 64 61 70 2d 63 70 34 p/certs/ldap-cp4
0050: 73 2e 64 61 72 6b 64 6f 74 2e 63 6f 2e 6b 65 79 s.darkdot.co.key
ber_flush2: 101 bytes to sd 4
0000: 30 63 02 01 02 66 5e 04 09 63 6e 3d 63 6f 6e 66 0c…f^..cn=conf
0010: 69 67 30 51 30 4f 0a 01 02 30 4a 04 18 6f 6c 63 ig0Q0O…0J..olc
0020: 54 4c 53 43 65 72 74 69 66 69 63 61 74 65 4b 65 TLSCertificateKe
0030: 79 46 69 6c 65 31 2e 04 2c 2f 65 74 63 2f 6f 70 yFile1..,/etc/op
0040: 65 6e 6c 64 61 70 2f 63 65 72 74 73 2f 6c 64 61 enldap/certs/lda
0050: 70 2d 63 70 34 73 2e 64 61 72 6b 64 6f 74 2e 63 p-cp4s.darkdot.c
0060: 6f 2e 6b 65 79 o.key
ldap_write: want=101, written=101
0000: 30 63 02 01 02 66 5e 04 09 63 6e 3d 63 6f 6e 66 0c…f^..cn=conf
0010: 69 67 30 51 30 4f 0a 01 02 30 4a 04 18 6f 6c 63 ig0Q0O…0J..olc
0020: 54 4c 53 43 65 72 74 69 66 69 63 61 74 65 4b 65 TLSCertificateKe
0030: 79 46 69 6c 65 31 2e 04 2c 2f 65 74 63 2f 6f 70 yFile1..,/etc/op
0040: 65 6e 6c 64 61 70 2f 63 65 72 74 73 2f 6c 64 61 enldap/certs/lda
0050: 70 2d 63 70 34 73 2e 64 61 72 6b 64 6f 74 2e 63 p-cp4s.darkdot.c
0060: 6f 2e 6b 65 79 o.key
ldap_result ld 0x564052367480 msgid 2
wait4msg ld 0x564052367480 msgid 2 (timeout 100000 usec)
wait4msg continue ld 0x564052367480 msgid 2 all 1
** ld 0x564052367480 Connections:
* host: (null) port: 0 (default)
refcnt: 2 status: Connected
last used: Sun Jul 26 21:20:28 2020

** ld 0x564052367480 Outstanding Requests:
* msgid 2, origid 2, status InProgress
outstanding referrals 0, parent count 0
ld 0x564052367480 request count 1 (abandoned 0)
** ld 0x564052367480 Response Queue:
Empty
ld 0x564052367480 response count 0
ldap_chkResponseList ld 0x564052367480 msgid 2 all 1
ldap_chkResponseList returns ld 0x564052367480 NULL
ldap_int_select
read1msg: ld 0x564052367480 msgid 2 all 1
ber_get_next
ldap_read: want=8, got=8
0000: 30 0c 02 01 02 67 07 0a 0….g..
ldap_read: want=6, got=6
0000: 01 50 04 00 04 00 .P….
ber_get_next: tag 0x30 len 12 contents:
ber_dump: buf=0x5640523761f0 ptr=0x5640523761f0 end=0x5640523761fc len=12
0000: 02 01 02 67 07 0a 01 50 04 00 04 00 …g…P….
read1msg: ld 0x564052367480 msgid 2 message type modify
ber_scanf fmt ({eAA) ber:
ber_dump: buf=0x5640523761f0 ptr=0x5640523761f3 end=0x5640523761fc len=9
0000: 67 07 0a 01 50 04 00 04 00 g…P….
read1msg: ld 0x564052367480 0 new referrals
read1msg: mark request completed, ld 0x564052367480 msgid 2
request done: ld 0x564052367480 msgid 2
res_errno: 80, res_error: , res_matched:
ldap_free_request (origid 2, msgid 2)
ldap_parse_result
ber_scanf fmt ({iAA) ber:
ber_dump: buf=0x5640523761f0 ptr=0x5640523761f3 end=0x5640523761fc len=9
0000: 67 07 0a 01 50 04 00 04 00 g…P….
ber_scanf fmt (}) ber:
ber_dump: buf=0x5640523761f0 ptr=0x5640523761fc end=0x5640523761fc len=0

ldap_msgfree
ldap_err2string
ldap_modify: Other (e.g., implementation specific) error (80)

ldap_free_connection 1 1
ldap_send_unbind
ber_flush2: 7 bytes to sd 4
0000: 30 05 02 01 03 42 00 0….B.
ldap_write: want=7, written=7
0000: 30 05 02 01 03 42 00 0….B.
ldap_free_connection: actually freed

]]>
By: val https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-373 Tue, 30 Jun 2020 09:04:10 +0000 https://linuxhostsupport.com/blog/?p=457#comment-373 In reply to gelo.

ive done both, swapping the sequence nor chown..but still get the same error

]]>
By: Mike https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-350 Wed, 29 Apr 2020 19:58:21 +0000 https://linuxhostsupport.com/blog/?p=457#comment-350 In reply to Mike.

Argh… figured #3 out. Changed “dc=field,dc=linuxhostsupport” to match my server and it worked….

]]>
By: Mike https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-349 Wed, 29 Apr 2020 19:56:30 +0000 https://linuxhostsupport.com/blog/?p=457#comment-349 Three things:
1 – I changed the admin user from ldapadm to ldap since openldap is running as user ldap on my centos 7 installation.
2 – I had to change this line ‘ldapmodify -Y EXTERNAL -H ldapi:/// -f certs.ldif’ to this ‘ldapmodify -H ldapi:/// -f certs.ldif’ for it to work.
3 – I cannot get past this error:
[ldapadm@openldapserver ~]$ sudo ldapadd -x -W -D “cn=ldap,dc=field,dc=linuxhostsupport,dc=com” -f base.ldif
[sudo] password for ldapadm:
Enter LDAP Password:
ldap_bind: Invalid credentials (49)

Any ideas?
Thanks, Mike

]]>
By: Mike https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-348 Wed, 29 Apr 2020 19:50:43 +0000 https://linuxhostsupport.com/blog/?p=457#comment-348 In reply to Greg.

Greg, if you edit in vi use :set list to view the hidden characters. You will find an extra character on line 5 that you need to delete.
Mike

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-347 Mon, 27 Apr 2020 06:05:19 +0000 https://linuxhostsupport.com/blog/?p=457#comment-347 In reply to Greg.

Please check each line for trailing spaces.

]]>
By: Greg https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-345 Wed, 22 Apr 2020 11:22:36 +0000 https://linuxhostsupport.com/blog/?p=457#comment-345 Getting the following error :
[root@LDAP slapd.d]# ldapmodify -Y EXTERNAL -H ldapi:/// -f db.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
ldapmodify: wrong attributeType at line 5, entry “olcDatabase={2}hdb,cn=config”

here my db.ldif
[root@LDAP slapd.d]# cat db.ldif
dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcSuffix
olcSuffix: dc=field,dc=tenedis,dc=com

dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcRootDN
olcRootDN: cn=ldapadm,dc=field,dc=tenedis,dc=com

dn: olcDatabase={2}hdb,cn=config
changetype: modify
replace: olcRootPW
olcRootPW: hashed_output_from_the_slappasswd_command

any ideas ?

]]>
By: asdasd https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-324 Sun, 22 Mar 2020 13:58:57 +0000 https://linuxhostsupport.com/blog/?p=457#comment-324 In reply to Lukas.

thanks 🙂

]]>
By: Sandro Cicero https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-292 Tue, 04 Feb 2020 10:23:54 +0000 https://linuxhostsupport.com/blog/?p=457#comment-292 At certs.ldif i have change order to olcTLSCertificateKeyFile first and olcTLSCertificateFile after. Its works for me

]]>
By: Taylor https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-278 Mon, 06 Jan 2020 07:21:22 +0000 https://linuxhostsupport.com/blog/?p=457#comment-278 In reply to mike.

It works for me. Thanks a lot Mike!

]]>
By: Otto https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-259 Thu, 14 Nov 2019 08:58:43 +0000 https://linuxhostsupport.com/blog/?p=457#comment-259 In reply to Allen D Ford.

may be the same mistake as I did initially…in step Configure OpenLDAP you should enter as password the complete line returned from slappasswd command, including {SSHA}…at least this was the issue I had

]]>
By: Peter https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-250 Sat, 12 Oct 2019 09:33:30 +0000 https://linuxhostsupport.com/blog/?p=457#comment-250 In reply to admin.

Hi, I have an same problem , after following all steps to the one character , I got the message for the last step : Enter LDAP Password: ldap_bind: Invalid credentials (49).. I tried to change the password, once again and the same. Only error I got from the OS , was after edit the certs.ldif.
ldapmodify -Y EXTERNAL -H ldapi:/// -f certs.ldif

modifying entry “cn=config”
ldap_modify: Other (e.g., implementation specific) error (80)

I will little play with that 🙂 but I typing the password correctly

Nice day and thank you for post.. Really helpfull

]]>
By: Mike https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-245 Fri, 27 Sep 2019 21:20:57 +0000 https://linuxhostsupport.com/blog/?p=457#comment-245 ldapmodify: wrong attributetype at line 9, entry “olcDatabase={2}hdb,cn=config”

]]>
By: Allen D Ford https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-244 Tue, 24 Sep 2019 18:38:03 +0000 https://linuxhostsupport.com/blog/?p=457#comment-244 i am having password issues as most i see on here is, i do not see a fix or way to reset it…
i believe the ;password is linked to the cn. how can i see the username and password i should be using or reset it.. mainly the username

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-228 Wed, 07 Aug 2019 07:51:20 +0000 https://linuxhostsupport.com/blog/?p=457#comment-228 In reply to Wai Htut Paing.

Did you generate a certificate and private key for your server hostname?

]]>
By: Wai Htut Paing https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-227 Wed, 07 Aug 2019 07:17:59 +0000 https://linuxhostsupport.com/blog/?p=457#comment-227 [root@centos user]# hostname
field
[root@centos user]# cat /etc/resolv.conf
# Generated by NetworkManager
search linuxhostsupport.com
nameserver 8.8.8.8
nameserver 8.8.4.4

Above line is my hostname.
When I was try to modify certs.ldif file .
I got ” modifying entry “cn=config”
ldap_modify: Other (e.g., implementation specific) error (80) ”

vim certs.ldif
dn: cn=config
changetype: modify
replace: olcTLSCertificateFile
olcTLSCertificateFile: /etc/openldap/certs/myldap.field.linuxhostsupport.com.cert

dn: cn=config
changetype: modify
replace: olcTLSCertificateKeyFile
olcTLSCertificateKeyFile: /etc/openldap/certs/myldap.field.linuxhostsupport.com.key

May I how how can I trace to solve it.

# ldapmodify -Y EXTERNAL -H ldapi:/// -f certs.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
modifying entry “cn=config”
ldap_modify: Other (e.g., implementation specific) error (80)

Please may I know which state has wrong?

]]>
By: fabiola https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-218 Wed, 10 Jul 2019 20:46:02 +0000 https://linuxhostsupport.com/blog/?p=457#comment-218 [root@localhost ~]# ldapadd -x -W -D “cn=ldapadm,dc=field,dc=linuxhostsupport,dc=com” -f base.ldif
Enter LDAP Password:
ldap_bind: Server is unwilling to perform (53)
additional info: unauthenticated bind (DN with no password) disallowed

i need change the password

]]>
By: mike https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-213 Thu, 13 Jun 2019 15:04:04 +0000 https://linuxhostsupport.com/blog/?p=457#comment-213 In reply to gelo.

fixed this by swapping the order of the key/cert entries in certs.ldif.

]]>
By: John https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-210 Fri, 07 Jun 2019 01:59:18 +0000 https://linuxhostsupport.com/blog/?p=457#comment-210 In reply to gelo.

I encountered the similar problem, I found a workaround by splitting the file in two, and load each section in two different ldap_modify command. Perhaps try that?

]]>
By: Goose https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-209 Thu, 06 Jun 2019 09:52:25 +0000 https://linuxhostsupport.com/blog/?p=457#comment-209 In reply to admin.

I have the same problem and the password is definitely correct. The ldapadm dn is mine too.

What else could the problem be?

]]>
By: Lukas https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-197 Fri, 10 May 2019 09:51:25 +0000 https://linuxhostsupport.com/blog/?p=457#comment-197 In reply to Lukas.

OK i have it :D. To all others. In the 2 new lines there are white spaces you must delete them ;).

]]>
By: Lukas https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-196 Fri, 10 May 2019 09:37:29 +0000 https://linuxhostsupport.com/blog/?p=457#comment-196 In reply to Dana.

What do you mean ? I have the same error, can you send the correct version please ?

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-195 Fri, 10 May 2019 08:14:41 +0000 https://linuxhostsupport.com/blog/?p=457#comment-195 In reply to gelo.

Please try to change the permissions of the ‘/etc/openldap/certs’ directory:

chown -R ldap:ldap /etc/openldap/certs

]]>
By: gelo https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-194 Fri, 10 May 2019 05:47:23 +0000 https://linuxhostsupport.com/blog/?p=457#comment-194 centos]# ldapmodify -Y EXTERNAL -H ldapi:/// -f certs.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
modifying entry “cn=config”
ldap_modify: Other (e.g., implementation specific) error (80)

]]>
By: Dana https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-190 Mon, 06 May 2019 09:30:23 +0000 https://linuxhostsupport.com/blog/?p=457#comment-190 In reply to Dana.

It was a space in a new line.

]]>
By: Dana https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-189 Mon, 06 May 2019 09:02:49 +0000 https://linuxhostsupport.com/blog/?p=457#comment-189 After deploy of db.ldif:
[root@X slapd.d]# vim db.ldif
[root@X slapd.d]# ldapmodify -Y EXTERNAL -H ldapi:/// -f db.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
SASL SSF: 0
ldapmodify: wrong attributeType at line 5, entry “olcDatabase={2}hdb,cn=config”

]]>
By: Nathan https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-185 Sun, 28 Apr 2019 20:18:29 +0000 https://linuxhostsupport.com/blog/?p=457#comment-185 In reply to Sriram.

I encountered this on Centos 7. The problem was SElinux.

edit /etc/selinux/config

SELINUX=enforcing can be changed to SELINUX=disabled

See if that fixes it.

]]>
By: Konrad Pieniawski https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-177 Fri, 29 Mar 2019 13:02:05 +0000 https://linuxhostsupport.com/blog/?p=457#comment-177 In reply to admin.

yes…what to do?

]]>
By: Samuele https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-159 Thu, 31 Jan 2019 14:25:14 +0000 https://linuxhostsupport.com/blog/?p=457#comment-159 Meanwhile, congratulations for the guide. I have a problem with the last step:
ldapadd -x -W -D “cn=ldapadm,dc=ldap,dc=halldis,dc=cloud” -f base.ldif
Enter LDAP Password:
ldap_bind: Invalid credentials (49)

I need to use encrypted password o clear password?
It does not work in both cases.

Thanks

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-138 Thu, 06 Dec 2018 15:48:56 +0000 https://linuxhostsupport.com/blog/?p=457#comment-138 In reply to Ruben.

Hi Ruben,

Try using ‘dc=cycleon’ instead of ‘dc: admin’ on the second line of the file.

]]>
By: Ruben https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-136 Wed, 05 Dec 2018 14:23:50 +0000 https://linuxhostsupport.com/blog/?p=457#comment-136 this is my base.ldif:
dn: dc=cycleon,dc=com
dc: admin
objectClass: top
objectClass: domain

dn: cn=admin,dc=cycleon,dc=com
objectClass: organizationalRole
cn: admin
description: LDAP Admin

dn: ou=People,dc=cycleon,dc=com
objectClass: organizationalUnit
ou: People

dn: ou=Group,dc=field,dc=com
objectClass: organizationalUnit
ou: Group

when trying the last command:
]# ldapadd -x -W -D “cn=admin,dc=cycleon,dc=com” -f base.ldif
Enter LDAP Password:
adding new entry “dc=cycleon,dc=com”
ldap_add: Naming violation (64)
additional info: value of single-valued naming attribute ‘dc’ conflicts with value present in entry

the base.ldif looks correct to me, can you please help?

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-135 Wed, 05 Dec 2018 08:01:45 +0000 https://linuxhostsupport.com/blog/?p=457#comment-135 You need to use your own domain name instead dc=linuxhostsupport.

]]>
By: Ninder https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-134 Tue, 04 Dec 2018 19:51:44 +0000 https://linuxhostsupport.com/blog/?p=457#comment-134 ldapadd -x -W -D “cn=ldapadm,dc=field,dc=linuxhostsupport,dc=com” -f base.ldif
Enter LDAP Password:
ldap_bind: Invalid credentials (49)

I confirm that password entered is correct one.

]]>
By: Phil https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-129 Sat, 10 Nov 2018 19:45:11 +0000 https://linuxhostsupport.com/blog/?p=457#comment-129 In reply to Sriram.

I had this same problem. The default config of the database has directives that point to certain paths and files for certificates. You most likely don’t have those certificates in place yet. What you need to do is either comment out those lines that are looking for certs, or create certs and place them where those directives are looking for.

Ofcourse, since slapd is not running you cannot use ldapmodify to make these changes. See the answer to this post: https://serverfault.com/questions/863274/modify-openldap-cn-config-without-slapd-running

Once you either comment out those lines that are looking for certs, or place certs in the correct locations, you will be able to start slapd and use ldapmodify from then on.

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-122 Mon, 22 Oct 2018 15:45:06 +0000 https://linuxhostsupport.com/blog/?p=457#comment-122 In reply to Ganeshbabu.

Please double check the credentials you are using. The password you are entering seems to be incorrect.

]]>
By: Ganeshbabu https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-121 Mon, 22 Oct 2018 08:36:38 +0000 https://linuxhostsupport.com/blog/?p=457#comment-121 [root@linuxhostsupport ~]# ldapadd -x -W -D “cn=ldapadm,dc=field,dc=linuxhostsupport,dc=com” -f base.ldif
Enter LDAP Password:
ldap_bind: Invalid credentials (49)

Please help on this..

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-111 Mon, 08 Oct 2018 17:58:34 +0000 https://linuxhostsupport.com/blog/?p=457#comment-111 In reply to Hussain.

Are you getting an error message when trying to authenticate using ldap_bind(user,password)?

]]>
By: Hussain https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-110 Mon, 08 Oct 2018 08:44:25 +0000 https://linuxhostsupport.com/blog/?p=457#comment-110 Ran all the steps without errors.
Using ldap_bind() and ldap_search from PHP, I can see users (can’t see ldapadm, though).
Using ldap_bind(user,password), the binding fails.
How do I add a user which can then be authenticated using PHP? A non-OS user, one that exists in the LDAP only.

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-109 Fri, 05 Oct 2018 07:12:23 +0000 https://linuxhostsupport.com/blog/?p=457#comment-109 1. When the monitoring interface is enabled, LDAP clients may be used to access information provided by the monitor backend, subject to access and other controls
2. We created ldapadm user so we can deploy configuration changes to the OpenLDAP server.

]]>
By: Hussain Akbar https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-108 Thu, 04 Oct 2018 18:26:28 +0000 https://linuxhostsupport.com/blog/?p=457#comment-108 A couple of questions:
1. What is meant by “monitor access”?
2. Why was the ldapadm user created? Where is it used?

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-107 Wed, 03 Oct 2018 15:02:37 +0000 https://linuxhostsupport.com/blog/?p=457#comment-107 In reply to stefan.

When deploying configuration changes to the OpenLDAP server you need to enter the LDAP root password you set up earlier. Thanks

]]>
By: stefan https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-106 Tue, 02 Oct 2018 13:49:09 +0000 https://linuxhostsupport.com/blog/?p=457#comment-106 which password exactly i should enter? The one I created in slappassword line or the one who terminal back to me when i entered? Anyway, in the last last step none of them dont’t work, i’ve tried severeal times, i couldn’t type wrong one so many times.
Thanks in advance

]]>
By: Paul https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-102 Sun, 23 Sep 2018 21:37:23 +0000 https://linuxhostsupport.com/blog/?p=457#comment-102 In reply to Sriram.

I hope your found your answer, you can just reinstall openldap services again and start the process if you did not go far
sudo yum reinstall openldap compat-openldap openldap-clients openldap-servers openldap-servers-sql openldap-devel

]]>
By: Sriram https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-92 Wed, 29 Aug 2018 23:12:04 +0000 https://linuxhostsupport.com/blog/?p=457#comment-92 In reply to admin.

[root@mspildapsrv lib]# systemctl status slapd.service
● slapd.service – OpenLDAP Server Daemon
Loaded: loaded (/usr/lib/systemd/system/slapd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2018-08-22 03:51:49 IST; 18s ago
Docs: man:slapd
man:slapd-config
man:slapd-hdb
man:slapd-mdb
file:///usr/share/doc/openldap-servers/guide.html
Process: 3571 ExecStart=/usr/sbin/slapd -u ldap -h ${SLAPD_URLS} $SLAPD_OPTIONS (code=exited, status=1/FAILURE)
Process: 3555 ExecStartPre=/usr/libexec/openldap/check-config.sh (code=exited, status=0/SUCCESS)

Aug 22 03:51:45 mspildapsrv.com slapd[3571]: ldif_read_file: checksum error on “/etc/openld…if”
Aug 22 03:51:49 mspildapsrv.com slapd[3571]: Could not get the realpath: No such file or di…ory
Aug 22 03:51:49 mspildapsrv.com slapd[3571]: main: TLS init def ctx failed: -1
Aug 22 03:51:49 mspildapsrv.com slapd[3571]: DIGEST-MD5 common mech free
Aug 22 03:51:49 mspildapsrv.com slapd[3571]: slapd stopped.
Aug 22 03:51:49 mspildapsrv.com slapd[3571]: connections_destroy: nothing to destroy.
Aug 22 03:51:49 mspildapsrv.com systemd[1]: slapd.service: control process exited, code=exi…s=1
Aug 22 03:51:49 mspildapsrv.com systemd[1]: Failed to start OpenLDAP Server Daemon.
Aug 22 03:51:49 mspildapsrv.com systemd[1]: Unit slapd.service entered failed state.
Aug 22 03:51:49 mspildapsrv.com systemd[1]: slapd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

]]>
By: admin https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-85 Wed, 15 Aug 2018 06:45:30 +0000 https://linuxhostsupport.com/blog/?p=457#comment-85 In reply to Sriram.

Hi Sriram,

You can run the systemctl status slapd.service command as suggested, for more details about the issue.

]]>
By: Sriram https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-84 Mon, 13 Aug 2018 07:00:36 +0000 https://linuxhostsupport.com/blog/?p=457#comment-84 Hi Getting the below error .Please let me know what to do.

systemctl start slapd
Job for slapd.service failed because the control process exited with error code. See “systemctl status slapd.service” and “journalctl -xe”

]]>
By: Scott C. Gebers https://linuxhostsupport.com/blog/how-to-install-ldap-on-centos-7/#comment-72 Wed, 20 Jun 2018 00:20:33 +0000 https://linuxhostsupport.com/blog/?p=457#comment-72 Finally a Open Ldap tutorial that works!!!!! a billion stars for the author!

]]>