[GH-ISSUE #905] Unable to Reset Admin Password #794

Closed
opened 2026-02-27 11:13:34 +03:00 by kerem · 10 comments
Owner

Originally created by @nthisler on GitHub (Aug 15, 2016).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/905

I have not been able to determine a way to reset the admin password. Is this possible?

Originally created by @nthisler on GitHub (Aug 15, 2016). Original GitHub issue: https://github.com/modoboa/modoboa/issues/905 I have not been able to determine a way to reset the admin password. Is this possible?
kerem 2026-02-27 11:13:34 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@tonioo commented on GitHub (Aug 26, 2016):

There is no shortcut for that but if you know a bit of python, you can run this:

> cd modoboa_dir
> python manage.py shell

(don't forget to load your virtual env if you use one) and then:

> from modoboa.core.models import User
> u = User.objects.get(pk=1)
> u.set_password("new password")
> u.save()
Ctr+D
<!-- gh-comment-id:242693863 --> @tonioo commented on GitHub (Aug 26, 2016): There is no shortcut for that but if you know a bit of python, you can run this: ``` shell > cd modoboa_dir > python manage.py shell ``` (don't forget to load your virtual env if you use one) and then: ``` python > from modoboa.core.models import User > u = User.objects.get(pk=1) > u.set_password("new password") > u.save() Ctr+D ```
Author
Owner

@tonioo commented on GitHub (Aug 30, 2016):

@nrotschafer Did it help you?

<!-- gh-comment-id:243346856 --> @tonioo commented on GitHub (Aug 30, 2016): @nrotschafer Did it help you?
Author
Owner

@Avalarion commented on GitHub (Nov 11, 2016):

Would it make sense to add a script with argument ( new password ) for this?

<!-- gh-comment-id:260074444 --> @Avalarion commented on GitHub (Nov 11, 2016): Would it make sense to add a script with argument ( new password ) for this?
Author
Owner

@gawel commented on GitHub (Nov 12, 2016):

If you write a script use https://docs.python.org/3/library/getpass.html#getpass.getpass
Storing a password in ~/.bash_history seems a bad idea.

<!-- gh-comment-id:260113954 --> @gawel commented on GitHub (Nov 12, 2016): If you write a script use https://docs.python.org/3/library/getpass.html#getpass.getpass Storing a password in ~/.bash_history seems a bad idea.
Author
Owner

@Avalarion commented on GitHub (Nov 12, 2016):

Will put this on my agenda ( even is python is not my preferred language ) as soon as there is a plan with the mail throttling.

<!-- gh-comment-id:260127279 --> @Avalarion commented on GitHub (Nov 12, 2016): Will put this on my agenda ( even is python is not my preferred language ) as soon as there is a plan with the mail throttling.
Author
Owner

@tonioo commented on GitHub (Oct 1, 2018):

A builtin django command is available for that:

> python manage.py changepassword admin
<!-- gh-comment-id:425873929 --> @tonioo commented on GitHub (Oct 1, 2018): A builtin django command is available for that: ```shell > python manage.py changepassword admin ```
Author
Owner

@mamair commented on GitHub (Apr 27, 2019):

Thanx, worked for me too. Resetting password via webinterface seemed not to work, didnt get the email with the resetting instruction ... (since half an hour or so)

<!-- gh-comment-id:487300534 --> @mamair commented on GitHub (Apr 27, 2019): Thanx, worked for me too. Resetting password via webinterface seemed not to work, didnt get the email with the resetting instruction ... (since half an hour or so)
Author
Owner

@mamair commented on GitHub (Apr 27, 2019):

Background of my problem: I want to run nginx behind hiawatha as reverse proxy and change the prts of nginx so my password was not available in my browser any more ... hope there are no problems in running other modoboa web interface on other ports

<!-- gh-comment-id:487300923 --> @mamair commented on GitHub (Apr 27, 2019): Background of my problem: I want to run nginx behind hiawatha as reverse proxy and change the prts of nginx so my password was not available in my browser any more ... hope there are no problems in running other modoboa web interface on other ports
Author
Owner

@iQiexie commented on GitHub (Sep 13, 2024):

You can also try this

/srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py changepassword admin

<!-- gh-comment-id:2350342213 --> @iQiexie commented on GitHub (Sep 13, 2024): You can also try this /srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py changepassword admin
Author
Owner

@TahaKazi commented on GitHub (Feb 28, 2025):

You can also try this

/srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py changepassword admin

Your method was plain simple... most recommended... thanks a lot

<!-- gh-comment-id:2689790779 --> @TahaKazi commented on GitHub (Feb 28, 2025): > You can also try this > > /srv/modoboa/env/bin/python /srv/modoboa/instance/manage.py changepassword admin Your method was plain simple... most recommended... thanks a lot
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#794
No description provided.