OpenProject can't login admin because email invalid
Posted: Fri Nov 27, 2015 1:45 am
NOTE: Whatever you do, we're not responsible if you break things by using fixes we found.
[Problem]
After everything was set up, i wanted to log on with the admin/admin creds. You are forced to change the password, so i entered the data and wanted to continue. I got the error that an email must be set to continue. However, there is no e-mail field to configure, so i can't change the password, so i can't log in to enter an email addy...
There was a step in the installer that asked for the admins email address. I left that blank, which lead to an empty entry in the user database field for email for that user, causing the admin account to be broken.
[Solution]
You can modify the field in the database directly. For this, you need the mysql root password. You can find it in /etc/openproject/installer.dat - using this login, you should be able to open a sql connection, modify the problematic field, and finally log in + change the pwd to recover admin rights.
As root, execute:
In mysql, execute:
The other option is to run:
And re-do the configuration that prompts for the admin mail address.
You should then be able to log on with admin/admin and do the initial password reset to be able to access the system!
[Problem]
After everything was set up, i wanted to log on with the admin/admin creds. You are forced to change the password, so i entered the data and wanted to continue. I got the error that an email must be set to continue. However, there is no e-mail field to configure, so i can't change the password, so i can't log in to enter an email addy...
There was a step in the installer that asked for the admins email address. I left that blank, which lead to an empty entry in the user database field for email for that user, causing the admin account to be broken.
[Solution]
You can modify the field in the database directly. For this, you need the mysql root password. You can find it in /etc/openproject/installer.dat - using this login, you should be able to open a sql connection, modify the problematic field, and finally log in + change the pwd to recover admin rights.
As root, execute:
Code: Select all
mysql openproject -p<password from installer.dat file>
Code: Select all
mysql> UPDATE users SET mail='your@address.example' WHERE id = '1';
mysql> commit;
Code: Select all
openproject reconfigure
You should then be able to log on with admin/admin and do the initial password reset to be able to access the system!