By Gladiator@code0range.net on
Hello all,
After few "bad manipulations", i lost my user #1 (deleted somehow) with obviously all admin powers. I'm still able to view and navigate throughout the site but unable to access any admin navigation panel.
Is there a way to either retreive my lost #1 user access, or give full power to a new one using phpmyadmin or?... without having to reinstall drupal from scratch?
Any help will be greatly appreciated
Gladiator
Comments
Untested solution
I haven't tested this, but a variation of this approach should work.
In phpmyadmin: Check the 'users' table to make sure that there is no user with uid=1. If there isn't, add a new row and set 'uid' to 1, 'name' to your desired username and 'pass' to the md5 hash of your desired password (you use http://md5-hash-online.waraxe.us/ to calculate the hash).
in phpmyadmin when inserting
in phpmyadmin when inserting or updating, you can also MD5 the data and automatically regenerate the correct password
http://01businesses.com
Yes!!!
Thanks so much guys!!! It worked.
Hi wulf, Can you be please
Hi wulf,
Can you be please more precise into how you create UID 1 again in the db after losing it for whatever reason.
I'm experiencing a similar problem an notices the UID 1 does no longer exist within my db.
Thx.
my advice... WARNING - I
my advice... WARNING - I never tried this before:
Backup your drupal
Install another Drupal... a export all SQL statements for user # 1 within these tables.
'users'
'sessions'
'role'
'authmap'
'sequences'
Then import them to your damaged database.
Marcel
http://scriptmigration.com
http://cardiary.com