To change user’s password in django you can use Django admin interface. But what if you do not use admin application for any reason?
You should ssh to you server. Navigate to the directory where your manage.py file is located. Next, activate your virtualenv (if you’re using one) and go to django shell typing python manage.py shell.
Now, you are presented with python interpreter. If you have user with username ‘testuser’ and want to change it’s password to be ‘testpassword’ you should execute fallowing lines:
from django.contrib.auth.models import User
user = User.objects.get(username='testuser')
Hit ctrl+D to exit python interpreter and type exit to exit your ssh session.
You can also use python manage.py changepassword testuser
This will prompt you to enter new password twice.
Both methods are exactly the same but first one is using shell witch allows you to do more powerful stuff but you can easily make some problems too.