Closed doc75 closed 2 years ago
Thank you for taking the time to report a bug! 👍
As this seems to be a setup issue I would like to ask you to raise your question in the forums: https://help.nextcloud.com If you wish support with setup issues from Nextcloud GmbH we offer this as part of the Nextcloud subscription. Learn more about this at https://nextcloud.com/enterprise/
@szaimen I am not sure why you think this is a setup issue. It seems to me that when migrating from PostgreSQL 13 to 14, it is currently not possible to have Nextcloud working with the new default authentication scheme.
I have not found in the doc any information on how to support this new scheme or how to migrate to this new scheme.
It is a problem to me as Nextcloud will not benefit from the new scheme which is more robust than md5.
@szaimen after some more research (I have spent the day on this yesterday already 😉 ), I found out how to solve this. Here is the information in case somebody else needs it. It could be interesting to add it in the documentation (in a troubleshooting section).
This procedure should allow you to move from md5
to scram-sha-256
authentication scheme with PrstgreSQL DB.
After your upgrade, make sure to change the password of the users.
select * from pg_shadow;
It should return something like this (md5 is not the one of a real password in this example):
-----------+----------+-------------+----------+---------+--------------+---------------------------------------------------------------------------------------------------------------------------------------+----------+-----------
oc_user | 12345 | t | f | f | f | md5de1b45a87f674a6bd2ecf299340b7767 | |
nextcloud | 10 | t | t | t | t | md582d1e5440ec2196ab71b72fb448f9a10 | |
(2 rows)
ALTER ROLE nextcloud WITH PASSWORD 'yourSecuredPassword';
ALTER ROLE oc_user WITH PASSWORD 'yourSecuredPassword';
select * from pg_shadow;
:
-----------+----------+-------------+----------+---------+--------------+---------------------------------------------------------------------------------------------------------------------------------------+----------+-----------
oc_user | 12345 | t | f | f | f | SCRAM-SHA-256$4096:xxxxxxxxxxxxxxxxxxxx | |
nextcloud | 10 | t | t | t | t | SCRAM-SHA-256$4096:yyyyyyyyyyyyyyyyyyyyy | |
(2 rows)
That's it.
@doc75 What password do you use for oc_user
here ? The one I use to log in as that user doesn't seem to make things work
@doc75 What password do you use for
oc_user
here ? The one I use to log in as that user doesn't seem to make things work
oc_user
password to use is the one found in the config.php
of your nextcloud installation (I don’t remind the key name by heart)
Oh wow, I had forgotten that was a thing. Thanks a lot!
Thanks a lot. Yesterday evening I tried upgrade from postgres 13 to 16 on nextcloud 27. So I had expermiented the same 'internal server error' message. Nothing on my docker service logs, not more in nextcloud.log... After updating password all work fine.
⚠️ This issue respects the following points: ⚠️
Bug description
I just upgraded my installation from postgreSQL 13 to PostgreSQL 14 (without change of Nextcloud version). After this upgrade, Nextcloud cannot connect anymore to the DB according to the message shown in the Web browser:
I found out that this is related to the change of the default authentication scheme of PostgreSQL from
md5
toscram-sha-256
.If I get back to
md5
, it is working fine.How can we make sure Nextcloud is able to work with this new default authentication scheme of PostgreSQL ?
I am not sure if this is something for Nextcloud or for a library you are using (in the last case let me know which one).
Steps to reproduce
pg_dumpall
Expected behavior
Nextcloud should run without error message
Installation method
Official Docker image
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.0
Web server
Nginx
Database engine version
PostgreSQL
Is this bug present after an update or on a fresh install?
Updated from a minor version (ex. 22.2.3 to 22.2.4)
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info