UPDATE: Connecting owncloud server to LDAP?




Hello everyone,

I managed to solve the database issue by dropping the owncloud database in mysql. After reinstalling Owncloud 9.1 the application itselfs works, however the Server cannot conntect to the LDAP service. Hence, the UCS user accounts cannot be created in owncloud. I also cannot add them manually via the admin user interface. An error message occurs referring to the owncloud log file.

Here is the relevant extract from the log:

{"reqId":"UybCKeQTj+c616DHY5tV","remoteAddr":"","app":"user_ldap","message":"No LDAP Connection to server SERVERNAME.DOMAIN.intranet","level":3,"time":"2017-08-27T17:46:35+00:00","method":"GET","url":"\/owncloud\/index.php\/settings\/users","user":"owncloudadmin"}
{"reqId":"UybCKeQTj+c616DHY5tV","remoteAddr":"","app":"index","message":"Exception: {\"Exception\":\"OC\\\\ServerNotAvailableException\",\"Message\":\"Connection to LDAP server could not be established\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/apps\\\/user_ldap\\\/lib\\\/Access.php(855): OCA\\\\User_LDAP\\\\Connection->getConnectionResource()\\n#1 \\\/var\\\/www\\\/owncloud\\\/apps\\\/user_ldap\\\/lib\\\/Access.php(1021): OCA\\\\User_LDAP\\\\Access->executeSearch('(&(&(objectClas...', Array, Array, '500', NULL)\\n#2 \\\/var\\\/www\\\/owncloud\\\/apps\\\/user_ldap\\\/lib\\\/Access.php(816): OCA\\\\User_LDAP\\\\Access->search('(&(&(objectClas...', Array, Array, '500', NULL)\\n#3 \\\/var\\\/www\\\/owncloud\\\/apps\\\/user_ldap\\\/lib\\\/Access.php(754): OCA\\\\User_LDAP\\\\Access->searchGroups('(&(&(objectClas...', Array, '500', NULL)\\n#4 \\\/var\\\/www\\\/owncloud\\\/apps\\\/user_ldap\\\/lib\\\/Group_LDAP.php(801): OCA\\\\User_LDAP\\\\Access->fetchListOfGroups('(&(&(objectClas...', Array, '500', NULL)\\n#5 \\\/var\\\/www\\\/owncloud\\\/apps\\\/user_ldap\\\/lib\\\/Group_LDAP.php(843): OCA\\\\User_LDAP\\\\Group_LDAP->getGroupsChunk('', '500', NULL)\\n#6 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Group\\\/Manager.php(213): OCA\\\\User_LDAP\\\\Group_LDAP->getGroups('', NULL, NULL)\\n#7 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Group\\\/MetaData.php(188): OC\\\\Group\\\\Manager->search('')\\n#8 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Group\\\/MetaData.php(90): OC\\\\Group\\\\MetaData->getGroups('')\\n#9 \\\/var\\\/www\\\/owncloud\\\/settings\\\/users.php(68): OC\\\\Group\\\\MetaData->get()\\n#10 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Route\\\/Route.php(154) : runtime-created function(1): require_once('\\\/var\\\/www\\\/ownclo...')\\n#11 [internal function]: __lambda_func()\\n#12 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/Route\\\/Router.php(280): call_user_func('\\\\x00lambda_1203', Array)\\n#13 \\\/var\\\/www\\\/owncloud\\\/lib\\\/base.php(891): OC\\\\Route\\\\Router->match('\\\/settings\\\/users')\\n#14 \\\/var\\\/www\\\/owncloud\\\/index.php(54): OC::handleRequest()\\n#15 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/apps\\\/user_ldap\\\/lib\\\/Connection.php\",\"Line\":173}","level":3,"time":"2017-08-27T17:46:35+00:00","method":"GET","url":"\/owncloud\/index.php\/settings\/users","user":"owncloudadmin"}
{"reqId":"HhN05dA2prF+4nRd0Ibk","remoteAddr":"","app":"user_ldap","message":"Bind failed: 49: Invalid credentials","level":2,"time":"2017-08-27T17:46:41+00:00","method":"POST","url":"\/owncloud\/index.php\/apps\/user_ldap\/ajax\/testConfiguration.php","user":"owncloudadmin"}

As pointed out here, this occurs because the User “owncloudsystemuser”, which pulls the entries from the LDAP directory, is not created when reinstalling owncloud.

Does anyone no by any chance how to create that user account (owncloudsystemuser) manually to get owncloud working again?

Many thanks!


Original Post

For the English version please see below

Hallo zusammen,

ich betreibe die UCS in der Version 4.1.4 als Homserver und bin daher leider kein Experte.

Um auf Owncloud Version 10 zu Upgraden, deinstallierte ich auf Anweisung des AppCenters Version 9.1. Da die Installation von Version 10 fehlschlug, installierte ich 9.1 erneut. Da jedoch die Anmeldung der LDAP Konten am Owncloud Server nicht funktionierte, führte ich nach Anweisung des AppCenters den Befehl “app-get remove owncloud --purge” aus und verschob /var/lib/owncloud in ein anderes Verzeichnes und führte erneut eine Neuinstallation durch.

Nun scheint es aber Probleme bei der Registrierung von Owncloud in der MySQL DB zu geben. So werde ich aufgefordert das Datenbankpasswort für den User owncloudDbUser einzugeben und in Bezug auf den Admin User wird die Fehlermeldung “Der Benutzername existiert bereits” ausgegeben. Das Problem scheint dabei ähnlich dem hier “Installation Owncloud” gelegen zu seien. Jedoch existiert ein owncloud folder noch unter /var/lib/mysql und auch die Variabel owncloud/db/name ist nicht vorhanden. Auch wenn ich jetzt erneut “apt-get remove owncloud --purge” ausführe, meldet das System, dass das Paket Ownlcoud nicht gefunden werden kann?

Daher die Frage, wie setze ich die config Daten zurück und wie führe ich die Datenbank Registrierung und die der LDAP Daten durch (bitte entschuldigt dass ich hier nicht so bewandert bin).

Vielen Dank!


Dear all,

I am using UCS 4.1.4 on my homserver. Please excuse that I am not too familar with the OS.

To upgrade to Owncloud 10 I uninstalled owncloud 9.1 as recommended by the appcenter. As the installation failed though I tried to reinstall owncloud 9.1. However, the I could not log on the system through the LDAP accounts. Thus, to reset the config files I executed the comand “app-get remove owncloud --purge” and moved the /var/lib/owncloud floder to another directory. Then I reinstalled owncloud 9.1.

However, now it seems that owncloud cannot register with the MySQL database. More specifically, when accessing the logon page I am asked to provide the database password for the owncloudDbUser. Futhermore, the systems returns the error “this username already exists” for the owncloudadmin user.

To my knowledge this issue partly resembles the one described in here “Installation Owncloud” (sorry, it’s in German). However, there is still an owncloud folder in the /var/lib/mysql directory and the UCR variable owncloud/db/name does not exist. In addition, “apt-get remove owncloud --purge” does no longer work. The system returns that the ownlcoud package cannot be found.

I would to kindly ask how I could reset the config files and register the LDAP accounts as well as owncloud with the MySQL database. Again, please excuse that I am not too familiar with that topics.

Your help will be highly appreciated. Many thanks!

Kind regards,