# Invalid username or password on login (deprecated crypt package) (python3.13.3 breaking)

**URL:** <https://forum.hestiacp.com/t/invalid-username-or-password-on-login-deprecated-crypt-package-python3-13-3-breaking/18813>\
**Category:** Web\
**Created:** [April 24, 2025, 8:04am UTC](https://forum.hestiacp.com/t/invalid-username-or-password-on-login-deprecated-crypt-package-python3-13-3-breaking/18813 "2025-04-24T08:04:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![nu01](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/nu01/32/7639_2.png) [@nu01](https://forum.hestiacp.com/u/nu01)\
**Post date:** [April 24, 2025, 8:04am UTC](https://forum.hestiacp.com/t/invalid-username-or-password-on-login-deprecated-crypt-package-python3-13-3-breaking/18813/1 "2025-04-24T08:04:08Z")

</div>

I went through all posts here, tried firewall unban etc, literally everything, even the RSA key deletion, but I keep on getting `Invalid username or password` after giving the password.  
I am unable to enter the CP, no matter what. I can login to SFTP, SSH, and auth log only shows `DATE TIME admin IP failed to login`  
There is nothing in any other logs. All systems are running as well. I even rebooted, but not sure why I cannot login anymore. It was working till Tuesday.

`v-check-user-2fa admin tokenhere`  
`Error: Authentication token mismatch.`

I deleted the token, qr, and even MD5, but I still cannot login.

```auto
MD5=''
RKEY=''
TWOFA=''
QRCODE=''

```

`tail -f /var/log/auth.log`

```auto
2025-04-24T15:35:01.297443+05:30 cp sudo: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
2025-04-24T15:35:01.353824+05:30 cp sudo: pam_unix(sudo:session): session closed for user root
2025-04-24T15:35:01.354967+05:30 cp CRON[27310]: pam_unix(cron:session): session closed for user hestiaweb
2025-04-24T15:35:02.057868+05:30 cp sudo: pam_unix(sudo:session): session closed for user root
2025-04-24T15:35:02.058688+05:30 cp CRON[27309]: pam_unix(cron:session): session closed for user hestiaweb
2025-04-24T15:36:01.062394+05:30 cp CRON[27728]: pam_unix(cron:session): session opened for user hestiaweb(uid=1004) by (uid=0)
2025-04-24T15:36:01.069459+05:30 cp sudo: hestiaweb : PWD=/var/spool/cron ; USER=root ; COMMAND=/usr/local/hestia/bin/v-update-sys-queue restart
2025-04-24T15:36:01.070015+05:30 cp sudo: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
2025-04-24T15:36:01.121808+05:30 cp sudo: pam_unix(sudo:session): session closed for user root
2025-04-24T15:36:01.122833+05:30 cp CRON[27728]: pam_unix(cron:session): session closed for user hestiaweb
2025-04-24T15:38:01.126162+05:30 cp CRON[27779]: pam_unix(cron:session): session opened for user hestiaweb(uid=1004) by (uid=0)
2025-04-24T15:38:01.132346+05:30 cp sudo: hestiaweb : PWD=/var/spool/cron ; USER=root ; COMMAND=/usr/local/hestia/bin/v-update-sys-queue restart
2025-04-24T15:38:01.134254+05:30 cp sudo: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1004)
2025-04-24T15:38:01.182163+05:30 cp sudo: pam_unix(sudo:session): session closed for user root
2025-04-24T15:38:01.182936+05:30 cp CRON[27779]: pam_unix(cron:session): session closed for user hestiaweb

```

`v-check-user-password admin PWD`

```auto
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import crypt, os; print(crypt.crypt(os.getenv("PASS"), os.getenv("SALT")))
    ^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'crypt'
Error: password missmatch

```

---

<div class="post-metadata">

**Author:** ![nu01](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/nu01/32/7639_2.png) [@nu01](https://forum.hestiacp.com/u/nu01)\
**Post date:** [April 24, 2025, 11:34am UTC](https://forum.hestiacp.com/t/invalid-username-or-password-on-login-deprecated-crypt-package-python3-13-3-breaking/18813/2 "2025-04-24T11:34:08Z")

</div>

So I solved it. Seems, I had upgraded to python 3.13.3 which has [deprecated crypt package](https://docs.python.org/3/library/crypt.html) and hestia uses crypt package for hashing passwords.  
I removed python3.13.3 & reinstalled 3.11.2 for the time being.  
I was able to login.

Update: fail2ban gets uninstalled due to uninstallation of python3.11.\*, so had to reinstall it via apt.

---

<div class="post-metadata">

**Author:** ![eris](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/eris/32/1241_2.png) [@eris](https://forum.hestiacp.com/u/eris)\
**Post date:** [April 24, 2025, 11:38am UTC](https://forum.hestiacp.com/t/invalid-username-or-password-on-login-deprecated-crypt-package-python3-13-3-breaking/18813/3 "2025-04-24T11:38:48Z")

</div>

> [@nu01](#):
>
> `MD5=''`

Make sure to run v-change-user-password so the MD5=‘’ is not empty it will break your login after Hestia updates …

---

<div class="post-metadata">

**Author:** ![nu01](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/nu01/32/7639_2.png) [@nu01](https://forum.hestiacp.com/u/nu01)\
**Post date:** [April 24, 2025, 11:41am UTC](https://forum.hestiacp.com/t/invalid-username-or-password-on-login-deprecated-crypt-package-python3-13-3-breaking/18813/4 "2025-04-24T11:41:26Z")

</div>

Yes. I already did that and now will turn on 2FA as well.  
Do we know what will we be using with python 3.13.3.  
I am just lucky I did not break my system.

---

<div class="post-metadata">

**Author:** ![eris](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/eris/32/1241_2.png) [@eris](https://forum.hestiacp.com/u/eris)\
**Post date:** [April 24, 2025, 12:31pm UTC](https://forum.hestiacp.com/t/invalid-username-or-password-on-login-deprecated-crypt-package-python3-13-3-breaking/18813/5 "2025-04-24T12:31:43Z")

</div>

Still can’t believe it that Python doesn’t has a suitable solution for Yescrypt…

---

<div class="post-metadata">

**Author:** ![eris](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/eris/32/1241_2.png) [@eris](https://forum.hestiacp.com/u/eris)\
**Post date:** [April 24, 2025, 12:42pm UTC](https://forum.hestiacp.com/t/invalid-username-or-password-on-login-deprecated-crypt-package-python3-13-3-breaking/18813/6 "2025-04-24T12:42:14Z")

</div>

For the new releases we are hoping to replace the current system and build something new based of Symphony instead

---

<div class="post-metadata">

**Author:** ![nu01](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/nu01/32/7639_2.png) [@nu01](https://forum.hestiacp.com/u/nu01)\
**Post date:** [April 24, 2025, 12:51pm UTC](https://forum.hestiacp.com/t/invalid-username-or-password-on-login-deprecated-crypt-package-python3-13-3-breaking/18813/7 "2025-04-24T12:51:39Z")

</div>

So kind of from scratch. Woah, I have to say hats off mate. 🙃🙃

---

<div class="post-metadata">

**Author:** ![Fero](https://forum.hestiacp.com/user_avatar/forum.hestiacp.com/fero/32/7492_2.png) [@Fero](https://forum.hestiacp.com/u/Fero)\
**Post date:** [April 27, 2025, 7:27am UTC](https://forum.hestiacp.com/t/invalid-username-or-password-on-login-deprecated-crypt-package-python3-13-3-breaking/18813/8 "2025-04-27T07:27:19Z")

</div>

@eris  
@nu01

Hi All,

So, I am also having the same problem after (apt update & apt upgrade with **root** )  
But when I check python version **python3 --version** :Python 3.10.12

So obviously this isn’t the case for me. Could any one help, please? 😢

And thanks in advance ❤

**UPDATE: NO WORRIES I FIXED IT! BUT THERE IS ANOTHER PROBLEM:**

The update was unrelated it was just a coincidence, what really happened was that when I tried to click: _ **Do not allow user to log in to Control Panel** _ for a specific user it didn’t work, as after I click: _ **Save** _ it returns to be unchecked.  
I then updated, and tried to login as admin, and I recieved this message: **Invalid username or password**. So I thought it was the update. Then I remembered trying to check the _ **Do not allow user to log in to Control Panel** _ button in another user’s profile.  
So I seeked `nano /usr/local/hestia/data/users/admin/user.conf` and set `LOGIN_DISABLED='no'` **And then I could login normally**.

I now have 2 questions:  
1- Why when I checked: _ **Do not allow user to log in to Control Panel** _ it wasn’t saved?  
2- Why was the admin user affected?

**Note:** I tried reproducing the issue and I succeeded.

---

<div class="post-metadata">

**Author:** ![system](https://forum.hestiacp.com/uploads/default/original/1X/d9a5b68bf50ced83e880b56452e592b204761b19.png) [@system](https://forum.hestiacp.com/u/system)\
**Post date:** [May 27, 2025, 7:27am UTC](https://forum.hestiacp.com/t/invalid-username-or-password-on-login-deprecated-crypt-package-python3-13-3-breaking/18813/9 "2025-05-27T07:27:57Z")

</div>

Closed on May 27, 2025, 7:27am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
