Removed admin - how to get back into Dashboard
Permalink
Hi guys, I was doing some stuff on my dev box and deleted my admin user
My purpose was to get rid of all my test users, and yeah ... I didn't think about 'admin'. So, any help would be greatly appreciated. Can't I just add an admin user from mysql and somehow assign it the correct permissions?
mysql>delete from Users;
My purpose was to get rid of all my test users, and yeah ... I didn't think about 'admin'. So, any help would be greatly appreciated. Can't I just add an admin user from mysql and somehow assign it the correct permissions?
Problem is, I don't have a very recently copy of the db. Won't reinstalling wipe the db? My preferred method is to just INSERT into Users the admin user and populate all the columns with the correct values. Does anyone know what I should populate the following with?
uIsActive
uIsValidated
uIsFullRecord
My assumption would be Yes, Yes, Yes respectively, but I doubt I'm right. Maybe 1, 1, 1 respectively?
And after I insert admin into Users, do I need to do anything else with any other tables?
uIsActive
uIsValidated
uIsFullRecord
My assumption would be Yes, Yes, Yes respectively, but I doubt I'm right. Maybe 1, 1, 1 respectively?
And after I insert admin into Users, do I need to do anything else with any other tables?
I got some assistance in #concrete5 and got this fixed. For anyone that cares to know, here's what I did.
I created a file in my home directory and added the following code:
Ran that php script and used the outputted encrypted password in my mysql insert statement
I created a file in my home directory and added the following code:
Ran that php script and used the outputted encrypted password in my mysql insert statement
mysql> insert into Users (uID, uName, uEmail, uPassword, uIsActive, uIsValidated, uIsFullRecord) values ('1','admin', 'your_email', 'encrypted_password', '1', '-1', '1');
Second thing to try is to re-install C5 (from the download, check the Readme/INSTALL files for how to install/re-install on your site..
The other thing you can try is an INSERT SQL in the users table.
Good luck!
HTH,
Kent