Skip to content

Disable LDAP TLS connection

Cema edited this page Jul 17, 2015 · 3 revisions

Some ownCloud users experience an issue when already switched off 'SSL certificate validation' in ownCloud Administration GUI doesn't cause changes in database.

It leads to errors in /usr/share/webapps/owncloud/data/owncloud.log:

{
"reqId":"abc1ac1020dbda66970651f039359229",
"remoteAddr":"94.127.178.121",
"app":"PHP",
"message":"ldap_start_tls(): Unable to start TLS: Connect error at \/usr\/share\/webapps\/owncloud\/apps\/user_ldap\/lib\/ldap.php#252",
"level":3,
"time":"2015-06-01T07:34:37+00:00"
}
{
"reqId":"abc1ac1020dbda66970651f039359229",
"remoteAddr":"94.127.178.121",
"app":"user_ldap",
"message":"Bind failed: -1: Can't contact LDAP server",
"level":3,
"time":"2015-06-01T07:34:37+00:00"
}

Assuming your DB name is ocdb, you can verify actual configuration stored in database with command:

(inside container):

mysql -e "select * from oc_appconfig where configkey='ldap_tls';" ocdb # OR
psql -c "select * from oc_appconfig where configkey='ldap_tls';" ocdb postgres

(outside container, assuming oc is your container name):

docker exec oc mysql -e "select * from oc_appconfig where configkey='ldap_tls';" ocdb # OR
docker exec oc psql -c "select * from oc_appconfig where configkey='ldap_tls';" ocdb postgres

To fix this issue and completely turn off SSL certificate verification, run:

(inside container):

mysql -e "update oc_appconfig set configvalue=0 where configkey='ldap_tls';" ocdb # OR
psql -c "update oc_appconfig set configvalue=0 where configkey='ldap_tls';" ocdb postgres

(outside container, assuming oc is your container name):

docker exec oc mysql -e "update oc_appconfig set configvalue=0 where configkey='ldap_tls';" ocdb # OR
docker exec oc psql -c "update oc_appconfig set configvalue=0 where configkey='ldap_tls';" ocdb postgres