I've recently started hosting my own Cloud using Nextcloud on a Ubuntu machine hosted by a provider. Yesterday I wanted to make a change to the configuration but noticed that the admin account has been blocked, since I enabled a maximum of three trys until users are blocked.
Now I am trying to find a way to unblock the admin account. I have tried accessing my server via SSH and then tried running the occ script to unblock the admin account, however I can't seem to properly access the file. I am running Ubuntu 18.04.5 LTS:
sudo -u www-data php /var/lib/docker/volumes/nextcloud/_data/occ
Could not open input file: /var/lib/docker/volumes/nextcloud/_data/occ
/var/lib/docker/volumes/nextcloud/_data# ./occ user:enable admin
n unhandled exception has been thrown:
Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: could not find driver in /var/lib/docker/volumes/nextcloud/_data/lib/private/DB/Connection.php:85
Stack trace:
#0 /var/lib/docker/volumes/nextcloud/_data/3rdparty/doctrine/dbal/src/Connection.php(1486): OC\DB\Connection->connect()
#1 /var/lib/docker/volumes/nextcloud/_data/3rdparty/doctrine/dbal/src/Connection.php(1014): Doctrine\DBAL\Connection->getWrappedConnection()
#2 /var/lib/docker/volumes/nextcloud/_data/lib/private/DB/Connection.php(226): Doctrine\DBAL\Connection->executeQuery()
#3 /var/lib/docker/volumes/nextcloud/_data/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php(210): OC\DB\Connection->executeQuery()
#4 /var/lib/docker/volumes/nextcloud/_data/lib/private/DB/QueryBuilder/QueryBuilder.php(287): Doctrine\DBAL\Query\QueryBuilder->execute()
#5 /var/lib/docker/volumes/nextcloud/_data/lib/private/AppConfig.php(345): OC\DB\QueryBuilder\QueryBuilder->execute()
#6 /var/lib/docker/volumes/nextcloud/_data/lib/private/AppConfig.php(110): OC\AppConfig->loadConfigValues()
#7 /var/lib/docker/volumes/nextcloud/_data/lib/private/AppConfig.php(301): OC\AppConfig->getApps()
#8 /var/lib/docker/volumes/nextcloud/_data/lib/private/legacy/OC_App.php(957): OC\AppConfig->getValues()
#9 /var/lib/docker/volumes/nextcloud/_data/lib/private/Server.php(682): OC_App::getAppVersions()
#10 /var/lib/docker/volumes/nextcloud/_data/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}()
#11 /var/lib/docker/volumes/nextcloud/_data/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#12 /var/lib/docker/volumes/nextcloud/_data/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
#13 /var/lib/docker/volumes/nextcloud/_data/lib/private/ServerContainer.php(137): OC\AppFramework\Utility\SimpleContainer->query()
#14 /var/lib/docker/volumes/nextcloud/_data/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query()
#15 /var/lib/docker/volumes/nextcloud/_data/lib/private/AppFramework/Utility/SimpleContainer.php(177): OC\AppFramework\Utility\SimpleContainer->get()
#16 /var/lib/docker/volumes/nextcloud/_data/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#17 /var/lib/docker/volumes/nextcloud/_data/3rdparty/pimple/pimple/src/Pimple/Container.php(114): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#18 /var/lib/docker/volumes/nextcloud/_data/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
#19 /var/lib/docker/volumes/nextcloud/_data/lib/private/ServerContainer.php(137): OC\AppFramework\Utility\SimpleContainer->query()
#20 /var/lib/docker/volumes/nextcloud/_data/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query()
#21 /var/lib/docker/volumes/nextcloud/_data/lib/private/Server.php(1031): OC\AppFramework\Utility\SimpleContainer->get()
#22 /var/lib/docker/volumes/nextcloud/_data/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}()
#23 /var/lib/docker/volumes/nextcloud/_data/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#24 /var/lib/docker/volumes/nextcloud/_data/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
#25 /var/lib/docker/volumes/nextcloud/_data/lib/private/ServerContainer.php(137): OC\AppFramework\Utility\SimpleContainer->query()
#26 /var/lib/docker/volumes/nextcloud/_data/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query()
#27 /var/lib/docker/volumes/nextcloud/_data/lib/private/Server.php(1990): OC\AppFramework\Utility\SimpleContainer->get()
#28 /var/lib/docker/volumes/nextcloud/_data/lib/private/Files/View.php(119): OC\Server->getLockingProvider()
#29 /var/lib/docker/volumes/nextcloud/_data/lib/private/Server.php(430): OC\Files\View->__construct()
#30 /var/lib/docker/volumes/nextcloud/_data/lib/private/AppFramework/Utility/SimpleContainer.php(155): OC\Server->OC\{closure}()
#31 /var/lib/docker/volumes/nextcloud/_data/3rdparty/pimple/pimple/src/Pimple/Container.php(118): OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility\{closure}()
#32 /var/lib/docker/volumes/nextcloud/_data/lib/private/AppFramework/Utility/SimpleContainer.php(122): Pimple\Container->offsetGet()
#33 /var/lib/docker/volumes/nextcloud/_data/lib/private/ServerContainer.php(137): OC\AppFramework\Utility\SimpleContainer->query()
#34 /var/lib/docker/volumes/nextcloud/_data/lib/private/AppFramework/Utility/SimpleContainer.php(56): OC\ServerContainer->query()
#35 /var/lib/docker/volumes/nextcloud/_data/lib/private/Server.php(1353): OC\AppFramework\Utility\SimpleContainer->get()
#36 /var/lib/docker/volumes/nextcloud/_data/lib/base.php(588): OC\Server->boot()
#37 /var/lib/docker/volumes/nextcloud/_data/lib/base.php(1076): OC::init()
#38 /var/lib/docker/volumes/nextcloud/_data/console.php(49): require_once('/var/lib/docker...')
#39 /var/lib/docker/volumes/nextcloud/_data/occ(11): require_once('/var/lib/docker...')
Does anyone have an idea what I could try now?
Running "docker exec -u 33 nextcloud ./occ user:enable admin" did the trick!