I’m currently using NC 20.0.10 and I would like to change the MariaDB user password to a more secure one. I can go into phpMyAdmin and change the password for the Nextcloud DB user there but when I open the config.php file I notice that the DB password is hashed. I’ve searched the forums and everyone up until version 19 said it’s in clear text which mine is not. Please see image below.
Is there a way to input the new password into the config.php file without having any issues with the hash portion? I’m just wondering if this new version allows you to input a clear text password and then hashes after you restart the server? Is there anything else I need to do on the NC or DB servers after changing the DB password in the config like running any OC commands?
Thanks for any help,
Maria DB 10.3.24
Synology NAS Server
Did you try if it’s not a legit password? It’s perhaps just a long one with many special characters, or do you see something specific for a hash?
Thank you for your reply. The password has always been hashed in the config.php which I found odd since everyone said it’s clear text. I used the web installer when I first installed NC 19 and it created the new username/password and DB name on the Maria DB server that I typed into the installation fields. I’ve been reading that MariaDB hashes passwords so I’m wondering if this has something to do with what I’m seeing. The password I created originally was very simple since I was only testing but now I want to change that DB password to a more complicated one but see the hash in the config.php. Sorry if I’m not explaining correct as I’m fairly new to all of this setups. Thanks for any assistance.
Did you try if that string is working as a password? For my setup it is still the regular password and I’m not aware of any hash. To connect to the database, Nextcloud needs the password of the database, it must be saved somewhere, a hash doesn’t help (it’s a one-way function). It can be used to verify a password. So the Nextcloud user passwords are saved as hashes in the database.
Ok thanks very much. I will look on the MariaDb server and see if I can find anything.
Just to follow up on this topic. I created a brand new web instance on the same web server and same MariaDB server with a new DB and this time no hash. I must of clicked something along the way or changed something without ever realizing what I was doing as a neophyte. So at the end of all this the password is definitely in clear text in config.php.
I went ahead and created a new user for the Nextcloud DB using phpMyAdmin assigning all the correct privileges, changed config.php to reflect the new DB user and password and I was done.
Thanks tflidd for your assistance.