Page 1 of 1

Unthinkable - deleted default admin before creating new one

Posted: 10 Apr 2005, 12:04
by websmith
Hi there,

I created a mantis db. Created users, and a number of bugs. I find this tool invaluable.

In my next session, despite reading the instructions, I wanted to create a new admin, but deleted the default admin BEFORE i created a new one. Now I cant log in as Admin or create new users. I would reinstall the package but dont want to lose the bugs all my users created. Can I just create a new admin user in the sql db? What do I need to put there?

PS - I'm not a programmer, just an advanced web user and can do almost anything except code.
B-) Thanks
Ranjan

Posted: 10 Apr 2005, 15:09
by thraxisp
You can recreate the original admin user by using the last line of the sql/db_generate.sql script. (The one starting with "INSERT INTO mantis_user_table"). This can be run by the mysql command line (as you did with the original installation) and will re-create the original entry.

Alternately, you can raise one of your existing users to administrator by changing the value in the "access_level" column to 90. (E.g., "UPDATE `mantis_user_table` SET `access_level`="70" WHERE `username` = "fred" )

Posted: 14 Apr 2005, 12:41
by vboctor
Mantis should stop the user from deleting/disabling/downgrading the last administrator account in the system. This issue should be reported into the bugtracker.

Regards,
Victor
MantisConnect
http://www.futureware.biz/mantisconnect

the solution worked thanks!

Posted: 14 Apr 2005, 13:03
by websmith
Hi Thraxisp,

Your solution worked! Thanks a ton.
To add to what victor says, it might be a good idea to pop up a window that says "You are deleting the default Admin account WITHOUT creating a new one. Are you sure you wish to continue?"

Thanks and regards,
Ranjan