Hey guys,

I'm getting an "operation not permitted within namingContext" error when trying to add an entry into a test environment using back-sql. I created the database using the backsql_create.sql, testdb_create.sql, testdb_data.sql, and testdb_metadata.sql files in the OpenLDAP source. I've also tried just using one of the entries in the testdb as a template. Still didn't work. Not sure where the issue is. If you guys can help point me in the right direction that would be awesome.

Thanks!

I'm building using version 2.4.40 on Linux Mint 17. More relevant info:

/etc/odbc.ini:

[openldap]
Description         = Example for OpenLDAP's back-sql
Driver              = MySQL
Trace               = No
Database            = openldap
Servername          = localhost
UserName            = openldap
Password            = thisisatest
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/odbc/libmyodbc.so
FileUsage       = 1

/usr/local/openldap/slapd.conf:

include        /usr/local/etc/openldap/schema/core.schema
include        /usr/local/etc/openldap/schema/cosine.schema
include        /usr/local/etc/openldap/schema/inetorgperson.schema
pidfile        /usr/local/var/run/slapd.pid
argsfile    /usr/local/var/run/slapd.args
database        sql
suffix          "dc=example,dc=com"
rootdn          "cn=root,dc=example,dc=com"
rootpw          thisisatest
dbname          openldap
dbuser          openldap
dbpasswd        thisisatest
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

File permissions:

srwxrwxrwx 1 mysql mysql 0 Dec  8 12:22 /var/run/mysqld/mysqld.sock
lrwxrwxrwx 1 root root 43 Dec  8 16:25 /usr/lib/odbc/libmyodbc.so -> /usr/lib/x86_64-linux-gnu/odbc/libmyodbc.so
-r--r--r-- 1 root     root     20499 Dec 15 11:52 /usr/local/etc/openldap/schema/core.schema
-r--r--r-- 1 root     root     73994 Dec 15 11:52 /usr/local/etc/openldap/schema/cosine.schema
-r--r--r-- 1 root     root      6267 Dec 15 11:52 /usr/local/etc/openldap/schema/inetorgperson.schema
-rw-r--r-- 1 openldap openldap    29 Dec 15 12:00 /usr/local/var/run/slapd.args
-rw-r--r-- 1 openldap openldap     6 Dec 15 12:00 /usr/local/var/run/slapd.pid