Unthinkable - deleted default admin before creating new one

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
websmith
Posts: 2
Joined: 10 Apr 2005, 11:59
Location: pune, india
Contact:

Unthinkable - deleted default admin before creating new one

Post 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
thraxisp
Developer
Posts: 509
Joined: 14 Feb 2005, 03:38
Location: Ottawa, Canada
Contact:

Post 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" )
vboctor
Site Admin
Posts: 1304
Joined: 13 Feb 2005, 22:11
Location: Redmond, Washington
Contact:

Post 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
websmith
Posts: 2
Joined: 10 Apr 2005, 11:59
Location: pune, india
Contact:

the solution worked thanks!

Post 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
Post Reply