Skip to main content

Django management commands for changing users' hashed passwords.

Project description

django-hashedpass

Django management commands for changing users' hashed passwords.

Installation

Requirements: Django >= 2.2, Python >= 3.5.

Install:

$ pip install django-hashedpass

Then, edit your Django project's settings.py file:

INSTALLED_APPS = [
    # ...
    'django_hashedpass',  # NOTE: underscore (_), not dash (-).
    # ...
]

Usage

  • changehashedpass - Change a user's hashed password.

    $ python3 manage.py changehashedpass 'admin' 'pbkdf2_sha256$150000$yAhqE5ZDGEii$lD5JUoCuz6qRA+BVlvetFPGyGMwLmYl0rCc3awcNYLo='
    Successfully changed the hashed password for "admin".
    
  • genhashedpass - Generate a hashed password from a plaintext password.

    $ python3 manage.py genhashedpass
    Password:
    Password (again):
    pbkdf2_sha256$150000$ZOTZr0AKGQyW$y6+Bdqwn9UsP/riDoEaMQ9Q17Sw8zZoH1jxmlgy94oA=
    
    $ python3 manage.py genhashedpass --password '123456'
    pbkdf2_sha256$150000$AnoGZfdqz6pW$GUGUJR5CggZA4e4JUMdtN8GU1CejLYTKs3PIdOnbF4k=
    

Development

To run unit tests: python3 ./run_tests.py.

Tested on Django 2.22, Python 3.6.8, Ubuntu 18.04.

Project started on: 2019-07-21

License

This project is distributed under the BSD 3-Clause License (see LICENSE).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-hashedpass-0.1.0.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

django_hashedpass-0.1.0-py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page