Closed (fixed)
Project:
Drupal core
Version:
6.9
Component:
user system
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
31 Aug 2008 at 21:42 UTC
Updated:
5 Sep 2012 at 00:46 UTC
Hello peopele,
How do I recover my password if all I get is
"warning: mail() [function.mail]: Bad parameters to mail() function, mail not sent. " error when trying? any help???
THanks
Comments
Comment #1
francort commentedI can give you some tips. I've never faced such a problem but i think what you can do.
The information is inside you database in users table password for user with uid 1.
In user.module there is the function who load a user. That function is user_load. It uses md5() for encryption( see php reference for more details ).
You gonna need to read somethings, but i hope what i've written is gonna be a good start point
good luck!
Comment #2
copy commentedThanks for the reply
THis surely hints something
thank you once again
have a nice day
Comment #3
yuriy.babenko commentedOpen Drupal's index.php file in the site root and right after
put:
Then open any page on your Drupal site and you should see the text 'done'. At this point remove the above code from index.php and login with your admin user (uid = 1) and password '123'. Change password to something more secure :)
Comment #4
absolutezero273c commentedMy apologies, but I am completely new to drupal. My sys admin who was responsible for our drupal site has left the company and I am trying to recover admin rights so I can begin maintaining it. I have an account on the machine which has admin rights but the password has changed and need to reset it.
I've modified my index.php file as described above, but have changed the uid to equal what is set for my account. Unfortunately I am receiving the following error after modifying the last line above "?>":
Parse error: syntax error, unexpected '<' in /usr/share/drupal5/index.php on line 18
Thanks for any help.
Comment #5
francort commented.
Comment #6
francort commentedDon't use "
<?php" and "?>" tags. Copy/paste just what is inside those tags.Comment #7
absolutezero273c commentedThanks. I tried that, but am getting different errors now:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/share/drupal5/index.php:7) in /usr/share/drupal5/includes/bootstrap.inc on line 900
Warning: Cannot modify header information - headers already sent by (output started at /usr/share/drupal5/index.php:7) in /usr/share/drupal5/includes/bootstrap.inc on line 531
Warning: Cannot modify header information - headers already sent by (output started at /usr/share/drupal5/index.php:7) in /usr/share/drupal5/includes/bootstrap.inc on line 532
Warning: Cannot modify header information - headers already sent by (output started at /usr/share/drupal5/index.php:7) in /usr/share/drupal5/includes/bootstrap.inc on line 533
Warning: Cannot modify header information - headers already sent by (output started at /usr/share/drupal5/index.php:7) in /usr/share/drupal5/includes/bootstrap.inc on line 534
done
Do you have any other recommendations?
Thanks, again.
Comment #8
francort commentedThat's because of the
<?php echo 'done';?>line. Anyway, password might have been reset to "123".You can see username of user with id=1 in your database, and now you know what password is :)
Comment #9
absolutezero273c commentedThanks for the help francort!
Comment #10
ainigma32 commentedSolution provided so setting to fixed.
- Arie
Comment #12
maytechu commentedI am sure I'm entering the right user name and password, but it doesn't let me. I wrote it down when I installed drupal this morning!!!!
Is the user name case sensitive? I doubt it, anyway.
I need to reset this as soon as possible, it is installed in my localhost so I can't get e-mails .....
Comment #13
maytechu commentedHi!
I have done all of the above. I got the page done. I have removed the text and save the file. I've tried to login with username: 1 and password: 123, but I get the same result. It must be something else..... I know it sounds stupid, but normally I do not mess with usernames and passwords and I wrote this down...
Comment #14
maytechu commentedHi Thanks. I fixed it. I mean you did. I just didn't read properly your instructions.
Thanks a million.
Comment #15
stevenpatzComment #16
deltaag commentedyuriy,
This is great. I had this problem and your code solved it.
Thank you very much.
I love the community support of Drupal.
Thanks again.
Comment #17
mcurry commented*subscribing*
@ yuriy.babenko: Worked like a charm - thanks for that.
Comment #18
jacobroufa commentedA great tip to have! Throwing this in my bag'o'tricks for sure!
Comment #19
digitalpbk commentedSee more @ Reset admin password on drupal
Comment #20
salem2 commentedthanks it's work for me
Comment #21
lnachiappa commented@digitalpbk
Great tip ,thanks a lot (i am using postgresql, and drupal 6.19 where also this worked)
Comment #22
Batman's Byte commentedThis worked and was really easy.
Comment #23
syodash commentedyuriy.babenko your tip save my ass, Four years later THANKS!.