Hey all,
I cannot login to MantisBT anymore. Every time I try to login as "myuser", MantisBT replies with an error "Your account may be disabled or blocked or the username/password you entered is incorrect."
The same "myuser" can correctly login to the (remote) MySQL database from the Mantis server.
Server is RHEL 9. MantisBT version is 2.25.7.
I still have shell access to the server. How can I troubleshoot/solve the issue?
Thanks in advance.
Cannot login to Mantis
Moderators: Developer, Contributor
Re: Cannot login to Mantis
Normally you do not login to Mantis with a user that can login to the database, those are 2 different users. Can you not request a new password through the GUI?
-
- Posts: 5
- Joined: 10 Jan 2025, 16:24
Re: Cannot login to Mantis
I clicked on the link for a password reset but I've got no email yet, must be an issue with the mail service.
Is there a way to add an user / reset a password by hand via the config? As said, I have full root shell access to the server and the database.
Is there a way to add an user / reset a password by hand via the config? As said, I have full root shell access to the server and the database.
Re: Cannot login to Mantis
If you have phpmyadmin, you can set the password directly in the DB.
-
- Posts: 5
- Joined: 10 Jan 2025, 16:24
Re: Cannot login to Mantis
I cannot use PhpMyAdmin. What are the commands to do so directly from the MySQL prompt?
Thanks.
Thanks.
Re: Cannot login to Mantis
@ the commandprompt you give the command 'mysql' followed by Enter.
@ the mysql prompt:
- use your_mantis_database ;
- select * from your_mantis_user_table ;
- insert into your_mantis_user_table (username, realname, email, password,
date_created, last_visit, enabled, protected, access_level,
login_count, lost_password_request_count, failed_login_count,
cookie_string)
values ( 'administrator1', '', 'root@localhost', '63a9f0ea7bb98050796b649e85481845', UNIX_TIMESTAMP(CURDATE()), UNIX_TIMESTAMP(CURDATE()), '1', '0', 90,3, 0, 0, '". md5( mt_rand( 0, mt_getrandmax() ) ) "');
- Exit
Now you have a user 'administrator1' with password 'root' including admin rights.
@ the mysql prompt:
- use your_mantis_database ;
- select * from your_mantis_user_table ;
- insert into your_mantis_user_table (username, realname, email, password,
date_created, last_visit, enabled, protected, access_level,
login_count, lost_password_request_count, failed_login_count,
cookie_string)
values ( 'administrator1', '', 'root@localhost', '63a9f0ea7bb98050796b649e85481845', UNIX_TIMESTAMP(CURDATE()), UNIX_TIMESTAMP(CURDATE()), '1', '0', 90,3, 0, 0, '". md5( mt_rand( 0, mt_getrandmax() ) ) "');
- Exit
Now you have a user 'administrator1' with password 'root' including admin rights.
-
- Posts: 5
- Joined: 10 Jan 2025, 16:24
Re: Cannot login to Mantis
Thanks a lot, that worked perfectly!