strongswan / strongMan

Management UI for strongSwan
https://www.strongswan.org/
Other
118 stars 39 forks source link

how can i add an user other than 'John Lennon'? #101

Closed wilsli closed 6 years ago

wilsli commented 6 years ago

i wanna INSERT a new user into the auth_user in db.sqlite3 database, but don't know how to encrypt the 'password' field, could you state a little bit more in docs?

tobiasbrunner commented 6 years ago

The password is set via set_password(), which, I think, internally uses make_password(). You may use the Django shell to call that:

$ . env/bin/activate
(env) $ python manage.py shell --settings=strongMan.settings.local
>>> from django.contrib.auth.hashers import make_password
>>> make_password("...")

Hope this helps.

wilsli commented 6 years ago

@tobiasbrunner Thank you!