Admin password reset - email not working

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_name: ‘NAME’
enabled: false
flush_frequency: ‘* * * * *’
flush_msg_limit: 10
flush_time_limit: 100
engine: smtp
port: 587
encryption: tls
password: ‘GMAIL PASSWORD’
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

Hi and welcome here :slight_smile:

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!

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