Blog from the Loft

Thoughts without walls

Blog from the Loft header image 2

Resetting Django Admin Password

August 7th, 2008 · 1 Comment · django

This barely qualifies for a blog post, but what to do if you loaded, via django-admin.py loaddata
a full json file from someone during testing, and don’t have their user’s password?

Just run the django-admin.py shell, and by hand reset all the passwords:

from django.contrib.auth.models import User
for u in Users:
u.set_password(’secret’)
u.save()

That’s why you have to keep your shell login and settings files safe !!

  • Share/Bookmark

Tags:

1 response so far ↓

Leave a Comment