1

I have Drupal 6 site. In deleting spammers I accidently knocked myself out. Can I reclaim admin on my own site? Help.

  • Did you block or did you delete the admin account? – Triskelion May 19 '13 at 18:18
  • I accidently deleted myself. – Michael Creegan May 19 '13 at 18:57
  • Then the only way is that suggested by Prem Ababd. For more information, check out the post by Wolfflow on drupal.org. – Triskelion May 19 '13 at 19:08
3

If u are able to create account,create it and in the database for the 'users' table update '1' to the 'uid' field for the account you created and if you are unable to create a account then create a account manually in the database

INSERT INTO users (uid, name, pass) VALUES ('1', 'yourname',> md5('yourpassword'));
  • relatively new to drupal i appreciate your suggestion – Michael Creegan May 19 '13 at 18:59
  • But is there other ways too? – Michael Creegan May 19 '13 at 18:59
  • u dont kno how to follow the answer?? – Prem Anand May 19 '13 at 19:05
  • Not really I m a newbie – Michael Creegan May 19 '13 at 19:59
  • Do u kno to create a account? or else post the url of your site. – Prem Anand May 19 '13 at 20:30
0

Default method should be to backup entire page before mass operations, and then restore it in case of failure. If you cannot do it on your own, your hosting company probably have nightly backups they can restore for you if you ask them.

If that's not the case, but you can access SQL console or SQL web admin tool, see this answer.

If you can't access SQL console directly, but have file access, you can put SQL code in settings.php wrapped in db_query(), but be extremely careful, as it gets executed on almost every page hit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.