Re: OpenLDAP & Mysql backend
Am Mon, 30 Apr 2018 10:54:52 +0200 schrieb Arianna Milazzo: > Hello! > I already read the docs. > I did as described in the documentation that I found here: > https://github.com/openldap/openldap/tree/master/servers/slapd/back-sql/docs > and here: > https://github.com/openldap/openldap/tree/master/servers/slapd/back-sql/rdbms_depend [...] > > 2018-04-30 10:21 GMT+02:00 Dieter Klünter : > > > Am Thu, 26 Apr 2018 18:48:00 +0200 > > schrieb Arianna Milazzo : > > > > > Hello! > > > I installed openLDAP on Debian 9 with mysql backend. I followed > > > the guide and I used example database > > > (http://www.openldap.org/faq/data/cache/978.html ) > > > > > > Now, I can connect to openldap with root credential (in > > > slapd.conf) or with a "person" present in ldap_entries, but I > > > don't see nothing: no search result. > > > With Apache Directory Studio I see only organization. > > > > > > Even it's impossible add something: ldap_add: Server is unwilling > > > to perform (53) > > > additional info: operation not permitted within > > > namingContext > > > > > > Please, someone can tell me why? [...] 1. with regard to 'no search result' check with mysql if you can read the sql-database check your myODBC and unixODBC configuration, run slapd in debugging mode 2. with regard to 'error 53: AFAIK write operations can't performed. 3. provide your database sql configuration of slapd.conf 4. read slapd-sql(5) carefully -Dieter -- Dieter Klünter | Systemberatung http://sys4.de GPG Key ID: E9ED159B 53°37'09,95"N 10°08'02,42"E
Re: OpenLDAP & Mysql backend
Hello! I already read the docs. I did as described in the documentation that I found here: https://github.com/openldap/openldap/tree/master/servers/slapd/back-sql/docs and here: https://github.com/openldap/openldap/tree/master/servers/slapd/back-sql/rdbms_depend Thanks, Arianna 2018-04-30 10:21 GMT+02:00 Dieter Klünter: > Am Thu, 26 Apr 2018 18:48:00 +0200 > schrieb Arianna Milazzo : > > > Hello! > > I installed openLDAP on Debian 9 with mysql backend. I followed the > > guide and I used example database > > (http://www.openldap.org/faq/data/cache/978.html ) > > > > Now, I can connect to openldap with root credential (in slapd.conf) > > or with a "person" present in ldap_entries, but I don't see nothing: > > no search result. > > With Apache Directory Studio I see only organization. > > > > Even it's impossible add something: ldap_add: Server is unwilling to > > perform (53) > > additional info: operation not permitted within namingContext > > > > Please, someone can tell me why? > > Get the openldap source code, > http://www.openldap.org/software/repo.html, within > servers/slapd/back-sql/rdbms_depend/mysql/ you will find all > documentation required. > > -Dieter > > -- > Dieter Klünter | Systemberatung > http://sys4.de > GPG Key ID: E9ED159B > 53°37'09,95"N > 10°08'02,42"E > >
OpenLDAP & Mysql backend
Hello! I installed openLDAP on Debian 9 with mysql backend. I followed the guide and I used example database (http://www.openldap.org/faq/data/cache/978.html ) Now, I can connect to openldap with root credential (in slapd.conf) or with a "person" present in ldap_entries, but I don't see nothing: no search result. With Apache Directory Studio I see only organization. Even it's impossible add something: ldap_add: Server is unwilling to perform (53) additional info: operation not permitted within namingContext Please, someone can tell me why? Thanks, Arianna
Re: OpenLDAP + MySQL BackEnd
Am Mon, 10 Apr 2017 15:45:27 + (UTC) schrieb Alexandre Vilarinho: > Hello all, > Recently I've donwload the OpenLDAP 2.4.44 and enable mysql as > followed. apt-get install libssl-dev libdb-dev unixodbc-dev time > wget > ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.26.tgz > tar xvfz openldap-*.tgz cd openldap-* > ./configure --enable-sql > make depend > make > make install cd servers/slapd/back-sql/rdbms_depend/mysql this provides you with sufficient informmation. -Dieter -- Dieter Klünter | Systemberatung http://sys4.de GPG Key ID: E9ED159B 53°37'09,95"N 10°08'02,42"E
OpenLDAP + MySQL BackEnd
Hello all, Recently I've donwload the OpenLDAP 2.4.44 and enable mysql as followed. apt-get install libssl-dev libdb-dev unixodbc-dev time wget ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.26.tgz tar xvfz openldap-*.tgz cd openldap-* ./configure --enable-sql make depend make make install apt-get install mysql-server libmyodbc # put mysql root password and confirm password that you want mysql -u root -p # put mysql root password CREATE USER 'openldap'@'localhost' IDENTIFIED BY 'yourpassword'; CREATE DATABASE IF NOT EXISTS openldap; GRANT ALL PRIVILEGES ON openldap.* TO 'openldap'@'localhost'; FLUSH PRIVILEGES; exit edit /etc/odbc.ini [openldap] Description = Example for OpenLDAP's back-sql Driver = MySQL Trace = No Database = openldap Servername = localhost UserName = openldap Password = yourpassword ReadOnly = No RowVersioning = No ShowSystemTables = No ShowOidColumn = No FakeOidIndex = No ConnSettings = SOCKET = /var/run/mysqld/mysqld.sock /etc/odbcinst.ini [MySQL] Description = ODBC for MySQL Driver = /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.soo FileUsage = 1 cd servers/slapd/back-sql/rdbms_depend/mysql/ mysql -u openldap -p openldap < backsql_create.sql mysql -u openldap -p openldap < testdb_create.sql mysql -u openldap -p openldap < testdb_data.sql mysql -u openldap -p openldap < testdb_metadata.sql /usr/local/etc/openldap/slapd.conf # $OpenLDAP$ # # See slapd.conf(5) for details on configuration options. # This file should NOT be world readable. # include /usr/local/etc/openldap/schema/core.schema include /usr/local/etc/openldap/schema/cosine.schema include /usr/local/etc/openldap/schema/inetorgperson.schema # Define global ACLs to disable default read access. # Do not enable referrals until AFTER you have a working directory # service AND an understanding of referrals. #referral ldap://root.openldap.org pidfile /usr/local/var/slapd.pid argsfile /usr/local/var/slapd.args ### # sql database definitions ### database sql suffix "dc=example,dc=com" rootdn "cn=root,dc=example,dc=com" rootpw rootpassword dbname openldap dbuser openldap dbpasswd yourpassword subtree_cond "ldap_entries.dn LIKE CONCAT('%',?)" insentry_stmt "INSERT INTO ldap_entries (dn,oc_map_id,parent,keyval) VALUES (?,?,?,?)" has_ldapinfo_dn_ru no When I execute the following command /usr/local/libexec/slapd -d 1 I receive the following information 58eba756 backsql_db_open(): entry deletion SQL statement not specified (use "renentry_stmt" directive in slapd.conf)58eba756 backsql_db_open(): setting "UPDATE ldap_entries SET dn=?,parent=?,keyval=? WHERE id=?" by default58eba756 backsql_db_open(): objclasses deletion SQL statement not specified (use "delobjclasses_stmt" directive in slapd.conf)58eba756 backsql_db_open(): setting "DELETE FROM ldap_entry_objclasses WHERE entry_id=?" by default58eba756 ==>backsql_get_db_conn()58eba756 ==>backsql_open_db_handle()Floating point exception (core dumped) Apparently there is no error. When I execute the following command ldapsearch -x -D cn=root,dc=example,dc=com -w rootpassword -s sub -b "dc=example,dc=com" "(objectClass=*)" I receive the following error root@DNS-TESTE:~# ldapsearch -x -D cn=root,dc=example,dc=com -w teste -s sub -b "dc=example,dc=com" "(objectClass=*)"ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1) Apparently after the installation of the ldap, the sldap demon wasn't created. I'm doing something wrong? Is there another way to configure LDAP to support MySQL? Regards Alex