OpenProject can't login admin because email invalid

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
gilthanaz
Site Admin
Posts: 444
Joined: Fri Aug 29, 2003 9:29 pm
Contact:

OpenProject can't login admin because email invalid

Post by gilthanaz »

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:

Code: Select all

    mysql openproject -p<password from installer.dat file>
In mysql, execute:

Code: Select all

    mysql> UPDATE users SET mail='your@address.example' WHERE id = '1';
    mysql> commit;
The other option is to run:

Code: Select all

openproject reconfigure
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!
Post Reply