You are not logged in.
Pages: 1
I'm trying to install LDAP server on Arch machine according to this wiki:
https://wiki.archlinux.org/index.php/OpenLDAP
However slaptest command fails with:
# slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d/
58c1c863 mdb_db_open: database "dc=my-domain,dc=com" cannot be opened: No such file or directory (2). Restore from backup!
58c1c863 backend_startup_one (type=mdb, suffix="dc=my-domain,dc=com"): bi_db_open failed! (2)
slap_startup failed (test would succeed using the -u switch)So when I use -u flag it works however then when I run slapindex it also fails with:
# slapindex
58c1c89b mdb_db_open: database "dc=my-domain,dc=com": mdb_dbi_open(/var/lib/openldap/openldap-data/id2e) failed: MDB_NOTFOUND: No matching key/data pair found (-30798).
58c1c89b backend_startup_one (type=mdb, suffix="dc=my-domain,dc=com"): bi_db_open failed! (-30798)
slap_startup failedIf I try to run systemctl start slapd it also fails. journal -r shows:
Mar 09 22:28:42 zimniok systemd[1]: slapd.service: Failed with result 'exit-code'.
Mar 09 22:28:42 zimniok systemd[1]: slapd.service: Unit entered failed state.
Mar 09 22:28:42 zimniok systemd[1]: Failed to start OpenLDAP server daemon.
Mar 09 22:28:42 zimniok systemd[1]: slapd.service: Control process exited, code=exited status=1
Mar 09 22:28:42 zimniok slapd[1049]: DIGEST-MD5 common mech free
Mar 09 22:28:41 zimniok slapd[1048]: @(#) $OpenLDAP: slapd 2.4.44 (Jan 12 2017 11:51:56) $
builduser@eworm:/build/openldap/src/openldap-2.4.44/servers/slapd
Mar 09 22:28:41 zimniok systemd[1]: Starting OpenLDAP server daemon...I tried installing LDAP on 2 Arch machines. Both are getting the same errors
Last edited by lapsio (2017-03-09 21:40:45)
Offline
Okay so when I launch slapd without -u -g flags (as root) it works. How can I debug this?
Offline
I have come to exactly the same point as indicated in #1 and have no clue how to get slapd running.
Any suggestions?
Last edited by langen (2017-09-05 11:15:09)
Offline
Nope. Like I said it worked as root. But I finally abandoned idea of using LDAP for my use case
Offline
Problem solved:
Just be sure that the directory /etc/openldap/slapd.d/ is really empty before slapd is started as a service:
# rm -rf /etc/openldap/slapd.d/*
# systemctl start slapd.serviceas stated in the OpenLDAP wiki https://wiki.archlinux.org/index.php/OpenLDAP
Another hint:
After executing
# slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d/as root make sure to fix the ownership in /etc/openldap/slapd.d/* again:
# chown -R ldap:ldap /etc/openldap/slapd.dso that executing
$ sudo -u ldap slapindexdoes not fail with 'Permission denied for "/etc/openldap/slapd.d/cn=config.ldif"'.
(When you execute
$ sudo -u ldap slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d/instead this ownership fix is not required.)
Last edited by langen (2017-09-06 15:03:39)
Offline
Shouldn't this be closed or marked as resolved?
Offline
Shouldn't this be closed or marked as resolved?
Nope. Like I said it worked as root. But I finally abandoned idea of using LDAP for my use case
As lapsio abandoned the use of LDAP lapsio can not verify any proposed solution so it can not be marked as solved.
Lapsio marking the thread as closed would violate Code_of_conduct#How_to_post point 8.
Lapsio could change the thread title to indicate abandonment in it or ask a moderator to delete/close the thread.
To me nothing in the https://wiki.archlinux.org/index.php/Code_of_conduct specifically states / requires lapsio to take such action.
Offline
Pages: 1