How to reinstall nextcloud from scratch (remove all settings) on nethserver

Hi,
I had an issue with nextcloud not talking to my ldap after first install on nethserver 7.5 (using nethserve dc) even though passwords and connection was correct as all this information was supplied by the nethserver system (first install).

I’ve tried to reset the information and now have only a white page at the nextcloud link. (even after install/uninstall using the software centre) It looks like the nethserver configuration is keeping something it shouldn’t so how do I manually remove nextcloud fully and reinstall by the software manager, or better yet what commands via terminal to kick the nextcloud beast to Netherland.

Otherwise if I’m going to have to reinstall the server to get it working I’m going to cry and get a strong drink as multiple users on a domain and loads of data so not an option… sometimes simplicity comes at a cost and this looks like a doozy

Thanks.

Don’t forget to drop the database:

mysql -e "drop database nextcloud"

Thanks… tried now am getting forbidden and noticed that the usr/share/nextcloud folder doesn’t exist on reinstall…

Does it work now?

You may also do

yum remove nethserver-nextcloud nextcloud
mysql -e "drop database nextcloud"
yum install nethserver-nextcloud nextcloud

Thanks for that… I didn’t realise that nextcloud wasn’t installed with nethserver-nextcloud :smile:
Now I’ve got the nextcloud admin page back but still have the same issue…
Configuration incorrect under the LDAP/AD integration screen.
And no access to users. When I click on users it comes up with Internal Server Error.
Considering the information is supplied by the nethserver-nextcloud module I can’t see why it’s not working… I can login to my domain and have all the shares working so not an LDAP/AD issue.

This looks similar to your issue:

If it does now work maybe we find some hints in /var/lib/nethserver/nextcloud/nextcloud.log or in the config:

cat /usr/share/nextcloud/config/config.php
config show nextcloud

Still no go.

<?php
$CONFIG = array ( 'passwordsalt' => '*****************************************',
'secret' => '*************************************************',
'trusted_domains' =>
array (
0 => 'localhost',
1 => 'server.***********.co.nz',
2 => '192.168.155.200',
),
'datadirectory' => '/var/lib/nethserver/nextcloud/',
'overwrite.cli.url' => 'http://localhost',
'dbtype' => 'mysql',
'version' => '13.0.4.0',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'nextcloud',
'dbpassword' => '****************',
'installed' => true,
'instanceid' => '****************',
'ldapIgnoreNamingRules' => false,
'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
'memcache.local' => '\\OC\\Memcache\\APCu',

I've stared out the passwords and domain.

config show nextcloud
nextcloud=configuration
TrustedDomains=
VirtualHost=

The config.php looks ok but config show nextcloud should show your trusted domains.

Are there errors in /var/log/messages or /var/lib/nethserver/nextcloud/nextcloud.log?

Nextcloud.log
{“reqId”:“W0-IMB06acDpcXB21mi-jAAAAAI”,“level”:2,“time”:“2018-07-18T23:07:34+00:00”,“remoteAddr”:“192.168.155.94”,“user”:"–",“app”:“user_ldap”,“method”:“GET”,“url”:"/nextcloud/cron.php",“message”:“Bind failed: 49: Invalid credentials”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-IMB06acDpcXB21mi-jAAAAAI”,“level”:3,“time”:“2018-07-18T23:07:34+00:00”,“remoteAddr”:“192.168.155.94”,“user”:"–",“app”:“PHP”,“method”:“GET”,“url”:"/nextcloud/cron.php",“message”:“ldap_control_paged_result_response(): Result is: Operations error (1) at /usr/share/nextcloud/apps/user_ldap/lib/LDAP.php#74”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-IMB06acDpcXB21mi-jAAAAAI”,“level”:3,“time”:“2018-07-18T23:07:34+00:00”,“remoteAddr”:“192.168.155.94”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"/nextcloud/cron.php",“message”:“Error while running background job (class: OCA\Files\BackgroundJob\ScanFiles, arguments: ): {“Exception”:“Exception”,“Message”:“LDAP Operations error”,“Code”:1,“Trace”:”#0 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/LDAP.php(371): OCA\\User_LDAP\\LDAP->processLDAPError(Resource id #15)\n#1 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/LDAP.php(75): OCA\\User_LDAP\\LDAP->postFunctionCall()\n#2 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Access.php(1113): OCA\\User_LDAP\\LDAP->controlPagedResultResponse(Resource id #15, false, NULL)\n#3 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Access.php(1264): OCA\\User_LDAP\\Access->processPagedSearchStatus(Array, ‘(&(&(|(objectcl…’, Array, 0, 500, 0, true, false)\n#4 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Access.php(953): OCA\\User_LDAP\\Access->search(’(&(&(|(objectcl…’, Array, Array, 500, 0)\n#5 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Access.php(858): OCA\\User_LDAP\\Access->searchUsers(’(&(&(|(objectcl…’, Array, 500, 0)\n#6 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/User_LDAP.php(286): OCA\\User_LDAP\\Access->fetchListOfUsers(’(&(&(|(objectcl…’, Array, 500, 0)\n#7 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/User_Proxy.php(159): OCA\\User_LDAP\\User_LDAP->getUsers(’’, 500, 0)\n#8 \/usr\/share\/nextcloud\/lib\/private\/User\/Manager.php(225): OCA\\User_LDAP\\User_Proxy->getUsers(’’, 500, 0)\n#9 \/usr\/share\/nextcloud\/apps\/files\/lib\/BackgroundJob\/ScanFiles.php(101): OC\\User\\Manager->search(’’, 500, 0)\n#10 \/usr\/share\/nextcloud\/lib\/private\/BackgroundJob\/Job.php(61): OCA\\Files\\BackgroundJob\\ScanFiles->run(NULL)\n#11 \/usr\/share\/nextcloud\/lib\/private\/BackgroundJob\/TimedJob.php(55): OC\\BackgroundJob\\Job->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#12 \/usr\/share\/nextcloud\/cron.php(146): OC\\BackgroundJob\\TimedJob->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#13 {main}",“File”:"\/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/LDAP.php",“Line”:339}",“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-IO-04hN7pXhCL8gTJNwAAAAo”,“level”:2,“time”:“2018-07-18T23:07:39+00:00”,“remoteAddr”:“192.168.155.94”,“user”:“admin”,“app”:“user_ldap”,“method”:“GET”,“url”:"/nextcloud/index.php/settings/users",“message”:“Bind failed: 49: Invalid credentials”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-IO-04hN7pXhCL8gTJNwAAAAo”,“level”:3,“time”:“2018-07-18T23:07:39+00:00”,“remoteAddr”:“192.168.155.94”,“user”:“admin”,“app”:“PHP”,“method”:“GET”,“url”:"/nextcloud/index.php/settings/users",“message”:“ldap_control_paged_result_response(): Result is: Operations error (1) at /usr/share/nextcloud/apps/user_ldap/lib/LDAP.php#74”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-IO-04hN7pXhCL8gTJNwAAAAo”,“level”:3,“time”:“2018-07-18T23:07:39+00:00”,“remoteAddr”:“192.168.155.94”,“user”:“admin”,“app”:“index”,“method”:“GET”,“url”:"/nextcloud/index.php/settings/users",“message”:“Exception: {“Exception”:“Exception”,“Message”:“LDAP Operations error”,“Code”:1,“Trace”:”#0 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/LDAP.php(371): OCA\\User_LDAP\\LDAP->processLDAPError(Resource id #8)\n#1 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/LDAP.php(75): OCA\\User_LDAP\\LDAP->postFunctionCall()\n#2 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Access.php(1113): OCA\\User_LDAP\\LDAP->controlPagedResultResponse(Resource id #8, false, NULL)\n#3 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Access.php(1264): OCA\\User_LDAP\\Access->processPagedSearchStatus(Array, ‘(&(&(objectClas…’, Array, 0, 500, NULL, true, false)\n#4 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Access.php(978): OCA\\User_LDAP\\Access->search(’(&(&(objectClas…’, Array, Array, 500, NULL)\n#5 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Access.php(916): OCA\\User_LDAP\\Access->searchGroups(’(&(&(objectClas…’, Array, 500, NULL)\n#6 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Group_LDAP.php(987): OCA\\User_LDAP\\Access->fetchListOfGroups(’(&(&(objectClas…’, Array, 500, NULL)\n#7 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Group_LDAP.php(1026): OCA\\User_LDAP\\Group_LDAP->getGroupsChunk(’’, 500, NULL)\n#8 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Group_Proxy.php(225): OCA\\User_LDAP\\Group_LDAP->getGroups(’’, NULL, NULL)\n#9 \/usr\/share\/nextcloud\/lib\/private\/Group\/Manager.php(244): OCA\\User_LDAP\\Group_Proxy->getGroups(’’, NULL, NULL)\n#10 \/usr\/share\/nextcloud\/lib\/private\/Group\/MetaData.php(189): OC\\Group\\Manager->search(’’)\n#11 \/usr\/share\/nextcloud\/lib\/private\/Group\/MetaData.php(91): OC\\Group\\MetaData->getGroups(’’)\n#12 \/usr\/share\/nextcloud\/settings\/users.php(77): OC\\Group\\MetaData->get()\n#13 \/usr\/share\/nextcloud\/lib\/private\/Route\/Route.php(155): require_once(’\/usr\/share\/next…’)\n#14 [internal function]: OC\\Route\\Route->OC\\Route\\{closure}(*** sensitive parameters replaced )\n#15 \/usr\/share\/nextcloud\/lib\/private\/Route\/Router.php(297): call_user_func(Object(Closure), Array)\n#16 \/usr\/share\/nextcloud\/lib\/base.php(999): OC\\Route\\Router->match(’\/settings\/users’)\n#17 \/usr\/share\/nextcloud\/index.php(42): OC::handleRequest()\n#18 {main}",“File”:"\/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/LDAP.php",“Line”:339}",“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-ITv04hN7pXhCL8gTJOQAAAAo”,“level”:3,“time”:“2018-07-18T23:07:58+00:00”,“remoteAddr”:“192.168.155.94”,“user”:“admin”,“app”:“PHP”,“method”:“GET”,“url”:"/nextcloud/index.php/settings/admin/ldap",“message”:“Undefined index: s02 at /usr/share/nextcloud/apps/user_ldap/templates/part.wizard-server.php#13”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-IT9VOzbESN0rNrx2RxAAAAAs”,“level”:2,“time”:“2018-07-18T23:07:59+00:00”,“remoteAddr”:“192.168.155.94”,“user”:“admin”,“app”:“user_ldap”,“method”:“POST”,“url”:"/nextcloud/index.php/apps/user_ldap/ajax/testConfiguration.php",“message”:“Bind failed: 49: Invalid credentials”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-MOQs94IOW@4tg6gbrbAAAAAw”,“level”:3,“time”:“2018-07-18T23:24:41+00:00”,“remoteAddr”:“192.168.155.94”,“user”:“admin”,“app”:“PHP”,“method”:“POST”,“url”:"/nextcloud/index.php/apps/user_ldap/ajax/wizard.php",“message”:“ldap_bind(): Unable to bind to server: Invalid credentials at /usr/share/nextcloud/apps/user_ldap/lib/LDAP.php#293”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-MOQs94IOW@4tg6gbrbQAAAAw”,“level”:2,“time”:“2018-07-18T23:24:41+00:00”,“remoteAddr”:“192.168.155.94”,“user”:“admin”,“app”:“user_ldap”,“method”:“POST”,“url”:"/nextcloud/index.php/apps/user_ldap/ajax/testConfiguration.php",“message”:“Bind failed: 49: Invalid credentials”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-MQCytP2bmI43oa4n24gAAAAE”,“level”:2,“time”:“2018-07-18T23:24:48+00:00”,“remoteAddr”:“192.168.155.94”,“user”:“admin”,“app”:“user_ldap”,“method”:“POST”,“url”:"/nextcloud/index.php/apps/user_ldap/ajax/getConfiguration.php",“message”:“Configuration Error (prefix s02): No LDAP Host given!”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-MQCytP2bmI43oa4n24gAAAAE”,“level”:2,“time”:“2018-07-18T23:24:48+00:00”,“remoteAddr”:“192.168.155.94”,“user”:“admin”,“app”:“user_ldap”,“method”:“POST”,“url”:"/nextcloud/index.php/apps/user_ldap/ajax/getConfiguration.php",“message”:“Configuration Error (prefix s02): No LDAP Port given!”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-MQCytP2bmI43oa4n24gAAAAE”,“level”:2,“time”:“2018-07-18T23:24:48+00:00”,“remoteAddr”:“192.168.155.94”,“user”:“admin”,“app”:“user_ldap”,“method”:“POST”,“url”:"/nextcloud/index.php/apps/user_ldap/ajax/getConfiguration.php",“message”:“Configuration Error (prefix s02): No LDAP Login Filter given!”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-MQCytP2bmI43oa4n24gAAAAE”,“level”:2,“time”:“2018-07-18T23:24:48+00:00”,“remoteAddr”:“192.168.155.94”,“user”:“admin”,“app”:“user_ldap”,“method”:“POST”,“url”:"/nextcloud/index.php/apps/user_ldap/ajax/getConfiguration.php",“message”:“Configuration Error (prefix s02): Not a single Base DN given.”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-MQCytP2bmI43oa4n24gAAAAE”,“level”:2,“time”:“2018-07-18T23:24:48+00:00”,“remoteAddr”:“192.168.155.94”,“user”:“admin”,“app”:“user_ldap”,“method”:“POST”,“url”:"/nextcloud/index.php/apps/user_ldap/ajax/getConfiguration.php",“message”:“Configuration Error (prefix s02): login filter does not contain %uid place holder.”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-MQyytP2bmI43oa4n25AAAAAE”,“level”:2,“time”:“2018-07-18T23:24:51+00:00”,“remoteAddr”:“192.168.155.94”,“user”:“admin”,“app”:“user_ldap”,“method”:“POST”,“url”:"/nextcloud/index.php/apps/user_ldap/ajax/testConfiguration.php",“message”:“Bind failed: 49: Invalid credentials”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-PGaM3sv7Fby5tlPPJlAAAAAA”,“level”:2,“time”:“2018-07-18T23:36:57+00:00”,“remoteAddr”:“192.168.155.94”,“user”:“admin”,“app”:“user_ldap”,“method”:“GET”,“url”:"/nextcloud/index.php/settings/users",“message”:“Bind failed: 49: Invalid credentials”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-PGaM3sv7Fby5tlPPJlAAAAAA”,“level”:3,“time”:“2018-07-18T23:36:57+00:00”,“remoteAddr”:“192.168.155.94”,“user”:“admin”,“app”:“PHP”,“method”:“GET”,“url”:"/nextcloud/index.php/settings/users",“message”:“ldap_control_paged_result_response(): Result is: Operations error (1) at /usr/share/nextcloud/apps/user_ldap/lib/LDAP.php#74”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-PGaM3sv7Fby5tlPPJlAAAAAA”,“level”:3,“time”:“2018-07-18T23:36:57+00:00”,“remoteAddr”:“192.168.155.94”,“user”:“admin”,“app”:“index”,“method”:“GET”,“url”:"/nextcloud/index.php/settings/users",“message”:“Exception: {“Exception”:“Exception”,“Message”:“LDAP Operations error”,“Code”:1,“Trace”:”#0 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/LDAP.php(371): OCA\\User_LDAP\\LDAP->processLDAPError(Resource id #6)\n#1 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/LDAP.php(75): OCA\\User_LDAP\\LDAP->postFunctionCall()\n#2 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Access.php(1113): OCA\\User_LDAP\\LDAP->controlPagedResultResponse(Resource id #6, false, NULL)\n#3 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Access.php(1264): OCA\\User_LDAP\\Access->processPagedSearchStatus(Array, ‘(&(&(objectClas…’, Array, 0, 500, NULL, true, false)\n#4 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Access.php(978): OCA\\User_LDAP\\Access->search(’(&(&(objectClas…’, Array, Array, 500, NULL)\n#5 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Access.php(916): OCA\\User_LDAP\\Access->searchGroups(’(&(&(objectClas…’, Array, 500, NULL)\n#6 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Group_LDAP.php(987): OCA\\User_LDAP\\Access->fetchListOfGroups(’(&(&(objectClas…’, Array, 500, NULL)\n#7 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Group_LDAP.php(1026): OCA\\User_LDAP\\Group_LDAP->getGroupsChunk(’’, 500, NULL)\n#8 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Group_Proxy.php(225): OCA\\User_LDAP\\Group_LDAP->getGroups(’’, NULL, NULL)\n#9 \/usr\/share\/nextcloud\/lib\/private\/Group\/Manager.php(244): OCA\\User_LDAP\\Group_Proxy->getGroups(’’, NULL, NULL)\n#10 \/usr\/share\/nextcloud\/lib\/private\/Group\/MetaData.php(189): OC\\Group\\Manager->search(’’)\n#11 \/usr\/share\/nextcloud\/lib\/private\/Group\/MetaData.php(91): OC\\Group\\MetaData->getGroups(’’)\n#12 \/usr\/share\/nextcloud\/settings\/users.php(77): OC\\Group\\MetaData->get()\n#13 \/usr\/share\/nextcloud\/lib\/private\/Route\/Route.php(155): require_once(’\/usr\/share\/next…’)\n#14 [internal function]: OC\\Route\\Route->OC\\Route\\{closure}(
sensitive parameters replaced )\n#15 \/usr\/share\/nextcloud\/lib\/private\/Route\/Router.php(297): call_user_func(Object(Closure), Array)\n#16 \/usr\/share\/nextcloud\/lib\/base.php(999): OC\\Route\\Router->match(’\/settings\/users’)\n#17 \/usr\/share\/nextcloud\/index.php(42): OC::handleRequest()\n#18 {main}",“File”:"\/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/LDAP.php",“Line”:339}",“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-PV@TnjFtaw0jwBukHhgAAAAk”,“level”:2,“time”:“2018-07-18T23:37:59+00:00”,“remoteAddr”:“192.168.155.94”,“user”:“admin”,“app”:“user_ldap”,“method”:“GET”,“url”:"/nextcloud/index.php/settings/users",“message”:“Bind failed: 49: Invalid credentials”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-PV@TnjFtaw0jwBukHhgAAAAk”,“level”:3,“time”:“2018-07-18T23:37:59+00:00”,“remoteAddr”:“192.168.155.94”,“user”:“admin”,“app”:“PHP”,“method”:“GET”,“url”:"/nextcloud/index.php/settings/users",“message”:“ldap_control_paged_result_response(): Result is: Operations error (1) at /usr/share/nextcloud/apps/user_ldap/lib/LDAP.php#74”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-PV@TnjFtaw0jwBukHhgAAAAk”,“level”:3,“time”:“2018-07-18T23:37:59+00:00”,“remoteAddr”:“192.168.155.94”,“user”:“admin”,“app”:“index”,“method”:“GET”,“url”:"/nextcloud/index.php/settings/users",“message”:“Exception: {“Exception”:“Exception”,“Message”:“LDAP Operations error”,“Code”:1,“Trace”:”#0 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/LDAP.php(371): OCA\\User_LDAP\\LDAP->processLDAPError(Resource id #6)\n#1 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/LDAP.php(75): OCA\\User_LDAP\\LDAP->postFunctionCall()\n#2 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Access.php(1113): OCA\\User_LDAP\\LDAP->controlPagedResultResponse(Resource id #6, false, NULL)\n#3 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Access.php(1264): OCA\\User_LDAP\\Access->processPagedSearchStatus(Array, ‘(&(&(objectClas…’, Array, 0, 500, NULL, true, false)\n#4 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Access.php(978): OCA\\User_LDAP\\Access->search(’(&(&(objectClas…’, Array, Array, 500, NULL)\n#5 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Access.php(916): OCA\\User_LDAP\\Access->searchGroups(’(&(&(objectClas…’, Array, 500, NULL)\n#6 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Group_LDAP.php(987): OCA\\User_LDAP\\Access->fetchListOfGroups(’(&(&(objectClas…’, Array, 500, NULL)\n#7 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Group_LDAP.php(1026): OCA\\User_LDAP\\Group_LDAP->getGroupsChunk(’’, 500, NULL)\n#8 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Group_Proxy.php(225): OCA\\User_LDAP\\Group_LDAP->getGroups(’’, NULL, NULL)\n#9 \/usr\/share\/nextcloud\/lib\/private\/Group\/Manager.php(244): OCA\\User_LDAP\\Group_Proxy->getGroups(’’, NULL, NULL)\n#10 \/usr\/share\/nextcloud\/lib\/private\/Group\/MetaData.php(189): OC\\Group\\Manager->search(’’)\n#11 \/usr\/share\/nextcloud\/lib\/private\/Group\/MetaData.php(91): OC\\Group\\MetaData->getGroups(’’)\n#12 \/usr\/share\/nextcloud\/settings\/users.php(77): OC\\Group\\MetaData->get()\n#13 \/usr\/share\/nextcloud\/lib\/private\/Route\/Route.php(155): require_once(’\/usr\/share\/next…’)\n#14 [internal function]: OC\\Route\\Route->OC\\Route\\{closure}(
sensitive parameters replaced ***)\n#15 \/usr\/share\/nextcloud\/lib\/private\/Route\/Router.php(297): call_user_func(Object(Closure), Array)\n#16 \/usr\/share\/nextcloud\/lib\/base.php(999): OC\\Route\\Router->match(’\/settings\/users’)\n#17 \/usr\/share\/nextcloud\/index.php(42): OC::handleRequest()\n#18 {main}",“File”:"\/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/LDAP.php",“Line”:339}",“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-PWiytP2bmI43oa4n28wAAAAE”,“level”:2,“time”:“2018-07-18T23:38:03+00:00”,“remoteAddr”:“192.168.155.94”,“user”:"–",“app”:“user_ldap”,“method”:“GET”,“url”:"/nextcloud/cron.php",“message”:“Bind failed: 49: Invalid credentials”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-PWiytP2bmI43oa4n28wAAAAE”,“level”:3,“time”:“2018-07-18T23:38:03+00:00”,“remoteAddr”:“192.168.155.94”,“user”:"–",“app”:“PHP”,“method”:“GET”,“url”:"/nextcloud/cron.php",“message”:“ldap_control_paged_result_response(): Result is: Operations error (1) at /usr/share/nextcloud/apps/user_ldap/lib/LDAP.php#74”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-PWiytP2bmI43oa4n28wAAAAE”,“level”:3,“time”:“2018-07-18T23:38:03+00:00”,“remoteAddr”:“192.168.155.94”,“user”:"–",“app”:“core”,“method”:“GET”,“url”:"/nextcloud/cron.php",“message”:“Error while running background job (class: OCA\User_LDAP\Jobs\UpdateGroups, arguments: ): {“Exception”:“Exception”,“Message”:“LDAP Operations error”,“Code”:1,“Trace”:”#0 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/LDAP.php(371): OCA\\User_LDAP\\LDAP->processLDAPError(Resource id #8)\n#1 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/LDAP.php(75): OCA\\User_LDAP\\LDAP->postFunctionCall()\n#2 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Access.php(1113): OCA\\User_LDAP\\LDAP->controlPagedResultResponse(Resource id #8, false, NULL)\n#3 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Access.php(1264): OCA\\User_LDAP\\Access->processPagedSearchStatus(Array, ‘(&(&(objectClas…’, Array, 0, 500, 0, true, false)\n#4 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Access.php(978): OCA\\User_LDAP\\Access->search(’(&(&(objectClas…’, Array, Array, 500, 0)\n#5 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Access.php(916): OCA\\User_LDAP\\Access->searchGroups(’(&(&(objectClas…’, Array, 500, 0)\n#6 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Group_LDAP.php(987): OCA\\User_LDAP\\Access->fetchListOfGroups(’(&(&(objectClas…’, Array, 500, 0)\n#7 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Group_LDAP.php(1026): OCA\\User_LDAP\\Group_LDAP->getGroupsChunk(’’, 500, 0)\n#8 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Jobs\/UpdateGroups.php(67): OCA\\User_LDAP\\Group_LDAP->getGroups()\n#9 \/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/Jobs\/UpdateGroups.php(60): OCA\\User_LDAP\\Jobs\\UpdateGroups::updateGroups()\n#10 \/usr\/share\/nextcloud\/lib\/private\/BackgroundJob\/Job.php(61): OCA\\User_LDAP\\Jobs\\UpdateGroups->run(NULL)\n#11 \/usr\/share\/nextcloud\/lib\/private\/BackgroundJob\/TimedJob.php(55): OC\\BackgroundJob\\Job->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#12 \/usr\/share\/nextcloud\/cron.php(146): OC\\BackgroundJob\\TimedJob->execute(Object(OC\\BackgroundJob\\JobList), Object(OC\\Log))\n#13 {main}",“File”:"\/usr\/share\/nextcloud\/apps\/user_ldap\/lib\/LDAP.php",“Line”:339}",“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-PaiytP2bmI43oa4n29AAAAAE”,“level”:3,“time”:“2018-07-18T23:38:18+00:00”,“remoteAddr”:“192.168.155.94”,“user”:“admin”,“app”:“PHP”,“method”:“GET”,“url”:"/nextcloud/index.php/settings/admin/ldap",“message”:“Undefined index: s02 at /usr/share/nextcloud/apps/user_ldap/templates/part.wizard-server.php#13”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}
{“reqId”:“W0-Pa4VgiQt3QXAXuQvdKgAAAAc”,“level”:2,“time”:“2018-07-18T23:38:19+00:00”,“remoteAddr”:“192.168.155.94”,“user”:“admin”,“app”:“user_ldap”,“method”:“POST”,“url”:"/nextcloud/index.php/apps/user_ldap/ajax/testConfiguration.php",“message”:“Bind failed: 49: Invalid credentials”,“userAgent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0”,“version”:“13.0.4.0”}


No failure messages in /var/log/messages

Seems like a credential error, you can get your AD settings with and compare it:

account-provider-test dump

My sample nextcloud config:

EDIT:

Sometimes it helps to change remote LDAP uri from ldap:// to ldaps:// in account provider settings and run nethserver-nextcloud-update.

Hi,
Have checked the config and everything matches what the
Active Directory local accounts provider page shows… same user, same password but just doesn’t connect :frowning:

Can I change this password and if so will I lose my DC services? Also how can I change this password… or better yet what terminal command to manually connect to see if I get an error which isn’t related to password.
UPDATE
Just tried connecting using ldapwhoami and got invalid credentials??? Very strange How do I reset these
Question??
Is this something to do with SAMBA 4 which is what I am running and a security option stopping ldap from working correctly by being insecure using a self signed certificate?
ie. reply from ldap ‘Strong authentication is required.’

There are options for the strong auth problem but it usually doesn’t affect Nextcloud.

Just to clarify: You are using a local active directory account provider or do you connect to a remote AD?

Maybe there is still something wrong with the account provider settings:

config show nsdc
config show sssd
config show dns

Another method is to try a manual join:

http://docs.nethserver.org/projects/nethserver-devel/en/v7/nethserver-dc.html#manual-join

Hi, I checked the following
config show nsdc
config show sssd
config show dns

and everything was correct. I did a disconnect/reconnect manual binding and it worked.
I then Installed lets-encrypt certificate (after shutting down remote access to the cms system) as this server isn’t on the internet. Had an issue on installing of nextcloud but solved by using config delete nextcloud.

Then did the commands:

yum remove nethserver-nextcloud nextcloud
mysql -e “drop database nextcloud”
yum install nethserver-nextcloud nextcloud

Nextcloud installed but same issue with connection. So must be an issue that’s not related to user/password.

I am out of ideas. Nextcloud uses the values from config show sssd. Does net ads info work?

Could you post the result of rpm -qa "nethserver-*" | sort to see the software you installed?

Maybe it helps to delete the complete nextcloud dir between remove and install:
rm -Rf /usr/share/nextcloud

[root@server /]# config show sssd
sssd=service
AdDns=192.168.155.201
BindDN=ldapservice@AD.FxxxxxxxxL.CO.NZ
BindPassword=****************
DiscoverDcType=dns
LdapURI=
Provider=ad
Realm=AD.F***********L.CO.NZ
Workgroup=F**********L
status=enabled

[root@server /]# rpm -qa “nethserver-*” | sort
nethserver-antivirus-1.2.1-1.ns7.noarch
nethserver-backup-config-2.1.0-1.ns7.noarch
nethserver-backup-data-1.3.4-1.ns7.noarch
nethserver-base-3.4.1-1.ns7.noarch
nethserver-dc-1.5.3-1.ns7.x86_64
nethserver-diagtools-1.0.2-1.ns7.noarch
nethserver-dnsmasq-1.6.6-1.ns7.noarch
nethserver-duc-1.4.3-1.ns7.noarch
nethserver-fail2ban-1.0.4-1.ns7.noarch
nethserver-firewall-base-3.4.1-1.ns7.noarch
nethserver-firewall-base-ui-3.4.1-1.ns7.noarch
nethserver-hosts-1.2.2-1.ns7.noarch
nethserver-httpd-3.2.6-1.ns7.noarch
nethserver-httpd-admin-2.3.2-1.ns7.noarch
nethserver-lang-en-1.2.13-1.ns7.noarch
nethserver-letsencrypt-1.1.6-1.ns7.noarch
nethserver-lib-2.2.8-1.ns7.noarch
nethserver-libvirt-1.1.0-1.ns7.noarch
nethserver-lsm-1.2.3-1.ns7.noarch
nethserver-mail-common-1.6.7-1.ns7.noarch
nethserver-mail-disclaimer-1.6.7-1.ns7.noarch
nethserver-mail-filter-1.4.4-1.ns7.noarch
nethserver-mail-server-1.12.3-1.ns7.noarch
nethserver-mail-smarthost-1.0.1-1.ns7.noarch
nethserver-mysql-1.1.3-1.ns7.noarch
nethserver-nethforge-release-7-2.ns7.noarch
nethserver-nextcloud-1.2.2-1.ns7.noarch
nethserver-ntp-1.1.3-1.ns7.noarch
nethserver-openssh-1.2.2-1.ns7.noarch
nethserver-openvpn-1.6.13-1.ns7.noarch
nethserver-phonehome-1.3.0-1.ns7.noarch
nethserver-php-1.2.0-1.ns7.noarch
nethserver-postgresql-1.1.0-1.ns7.noarch
nethserver-release-7-8.ns7.noarch
nethserver-restore-data-1.2.4-1.ns7.noarch
nethserver-rh-php71-php-fpm-1.0.0-1.ns7.noarch
nethserver-samba-4.1.0-1.ns7.noarch
nethserver-smartd-1.1.0-1.ns7.noarch
nethserver-sssd-1.4.0-1.ns7.noarch
nethserver-unbound-1.1.0-1.ns7.noarch
nethserver-vsftpd-1.1.0-1.ns7.noarch
nethserver-webvirtmgr-1.1.1-1.ns7.noarch
nethserver-yum-1.4.1-1.ns7.noarch

and I’ve already tried deleting the nextcloud folder after uninstall. :slight_smile:

You may check nextcloud ldap config:

su - apache -s /bin/bash -c "source /opt/rh/rh-php71/enable; cd /usr/share/nextcloud/; php occ ldap:show-config"

Fixed It (sort of)
I created a new domain user and used this to bind Nextcloud. Not the best fix but it is now working. Not sure why the ldapservice@AD.FLASHELECTRICAL.CO.NZ bind connection can’t be connected to by Nextcloud but I now have a green Configuration OK on Nextcloud

1 Like

I don’t know if your config will survive updates.

Does that work?

ldapsearch -Z -x -D CN=ldapservice,CN=Users,DC=ad,DC=fl,DC=co,DC=nz -w `cat /var/lib/nethserver/secrets/ldapservice` -b CN=Users,DC=ad,DC=fl,DC=co,DC=nz -h 192.168.155.201

The ldapservice password is stored in /var/lib/nethserver/secrets/ldapservice.

https://wiki.nethserver.org/doku.php?id=howto:useful_commands#list_all_entries_with_the_administrator_bind

Thanks for the above… it shows:
ldap_bind: Invalid credentials (49)
additional info: 80090308: LdapErr: DSID-0C0903A9, comment: AcceptSecurityContext error, data 52e, v1db1
So somehow the user isn’t valid??? Could the ldapservice password have expired?

No, the password seems wrong, I get the same error when I change the ldapservice password to a wrong one.

Get ldapservice password…

cat /var/lib/nethserver/secrets/ldapservice

…dive into the samba container…

systemd-run -M nsdc -t /bin/bash

…and change the password of ldapservice:

smbpasswd ldapservice

1 Like