Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

Admin password reset - email not working

first-time

Started by Trimita Chakma 4 years ago · 2 replies · 1387 views
4 years ago

I did not change my admin password but getting "login failed"

Forgot password is not sending email. I checked the email plugin (user>config>plugins>email.yaml) and the setting seems fine but still not working.

Also tried deleting user>accounts> user> yaml file to create a new user but the form is not taking inputs for reason.

Is there any other way to recover/reset admin password?


enabled: true
from: EMAIL
from_name: 'NAME'
to: EMAIL
to_name: 'NAME'
queue:
enabled: false
flush_frequency: ' *'
flush_msg_limit: 10
flush_time_limit: 100
mailer:
engine: smtp
smtp:
server: smtp.gmail.com
port: 587
encryption: tls
user: 'GMAIL EMAIL ADDRESS'
password: 'GMAIL PASSWORD'
sendmail:
bin: '/usr/sbin/sendmail -bs'
content_type: text/html
debug: false
charset: null
cc: null
cc_name: null
bcc: null
reply_to: null
reply_to_name: null
body: null

last edited 03/29/22 by Trimita Chakma
4 years ago

Hi and welcome here 🙂

There are many ways to reset the password, but I have to rely on my memory. User accounts are stored as files in user/accounts with file name <yourname>.yaml. Back that folder up before you do anything else.

  • You can edit your user file by hand and (I think) change the hashed password to a plain text one. It should be hashed when you next log in.
  • You can edit your user file and (I think) blank out the hashed password in there (or maybe get rid of that line altogether). I can't remember what happens then exactly, but I think you are prompted for a new one when you go to the login screen again.
  • If you are the only user, or if registering new users is enabled, you can just delete your user file and you'll be prompted to set up an admin account when you use the site.
  • At the command prompt at the Grav system root, you can issue this command (documented in the login plugin readme): bin/plugin login change-password -u <name> and follow the prompts. The old password is not required.

Hope something there sticks. Sorry I didn't go to the trouble of confirming a lot of those options, but I figured there are so many!

4 years ago

Hi thanks @hughbris!

So I was able to create a new user using the terminal but I am still getting "login failed". Seems like the login form is not working. Is it possible something related to AJAX broke after the last update? My PHP version is 7.3

Suggested topics

Topic Participants Replies Views Activity
Support · by Water Science, 3 weeks ago
11 166 5 hours ago
Support · by Duc , 20 hours ago
1 44 20 hours ago
Support · by Thomas, 1 week ago
3 116 1 day ago
Support · by Anna, 4 days ago
2 109 2 days ago
Support · by Justin Young, 2 days ago
1 87 2 days ago