<p>this is a place for questions rather than bug reports, and it is unclear which this is.</p>
<p>I suggest you start troubleshooting by resetting the password via the <code>users/set-password</code> console command, for example:</p>
<pre class="lang-shell prettyprint-override"><code>php craft users/set-password my-username --password 1234567890
</code></pre>
<p>If that doesn't work, for whatever reason, then perhaps the user record has somehow been corrupted, in which case it may be better to simply create a new admin user.</p>
<pre class="lang-shell prettyprint-override"><code>php craft users/create --admin
</code></pre>
<p>Here are the docs for the <code>users</code> commands, for reference:
<a href="https://craftcms.com/docs/4.x/console-commands.html#users" rel="nofollow noreferrer">https://craftcms.com/docs/4.x/console-commands.html#users</a></p>

CC BY-SA 4.0
2024-05-18T19:28:24.500Z
If you tried both of Ben's console suggestions and still get "invalid username or password" try going into the browser console and clearing all cookies, local storage, and session storage before logging in again
kmgdev
CC BY-SA 4.0
2022-07-31T06:33:17.413Z
2022-07-31T06:33:17.413Z
Ben Croker
<p>I need help getting an admin user logged in. The password was reset and doesn't work. After resetting the admin user password using forgot password, I get prompted with Invalid username or password. I can verify the password is updating in the DB when I change it via forgot password. Server is PHP 7.3.11 and Craft is 3.5.5. I'm not getting any console errors.</p>

<craft3>
Admin user can't login
# Admin user can't login

(Asked by: username_0 on 2022-07-30)

I need help getting an admin user logged in. The password was reset and doesn't work. After resetting the admin user password using forgot password, I get prompted with Invalid username or password. I can verify the password is updating in the DB when I change it via forgot password. Server is PHP 7.3.11 and Craft is 3.5.5. I'm not getting any console errors.

**Tags:** craft3

---

## 1 answers

### Answer by username_1 on 2022-07-31. Score: 1 | Accepted answer

this is a place for questions rather than bug reports, and it is unclear which this is.
I suggest you start troubleshooting by resetting the password via the users/set-password console command, for example:
php craft users/set-password my-username --password 1234567890

If that doesn't work, for whatever reason, then perhaps the user record has somehow been corrupted, in which case it may be better to simply create a new admin user.
php craft users/create --admin

Here are the docs for the users commands, for reference:
https://craftcms.com/docs/4.x/console-commands.html#users

> **Comments:**
> **username_2**: If you tried both of Ben's console suggestions and still get "invalid username or password" try going into the browser console and clearing all cookies, local storage, and session storage before logging in again  

---

