Skip to content

Instantly share code, notes, and snippets.

@coldclimate
Created January 29, 2013 19:15
Show Gist options
  • Save coldclimate/4666801 to your computer and use it in GitHub Desktop.
Save coldclimate/4666801 to your computer and use it in GitHub Desktop.
How to reset user password in Graphite
cd /opt/graphite/webapp/graphite
python ./manage.py shell
P
(InteractiveConsole)
>>> from django.contrib.auth.models import User
>>> users = User.objects.all()
>>> users
[<User: graphite>, <User: default>]
>>> users[0].set_password('password-here')
>>> users[0].save()
@auctionsjeff
Copy link

Wasn't working, but I followed the guide here and it worked. Key was not accessing the user from the array (queryset) but accessing the instance directly:

user = users[0]
user.set_password('123')
user.save()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment