lost admin password
-
@baris OK, I needed to restart nodebb - was getting a 403 on that
-
Hello @colornote, sorry to hear you got locked out!
The instructions have changed as the schema has changed.
Now:
- First create a user as normal. Note down their username.
- Get the uid of the new user:
hget username:uid <username>
sadd group:administrators:members <replace with value from step 2>
-
@julian Thank you!
I use another way which you offer, and reset the admin's password successfully.To reset the password even if no email is installed:
- Go to
/reset
and key in your email. It won't send out the password reset email, but a key will be generated. This key expires after 2 hours. redis-cli
to enter the redis console. If redis is installed on a different port, host, or socket, use-p
,-h
, and-s
respectivelyhgetall reset:uid
, and locate the reset id corresponding to your uid- Go to
/reset/{reset-uid}
- Go to
-
I use mongodb, here is the solution: // I just wanted to share
// Show collections
show collections
// Find the userid you want to add to the
db.objects.find( { "_key" : "username:uid" } )
// Find members id in administrators group
db.objects.find( { "_key" : "group:administrators:members" } )
// To update, 3 was my userid
db.objects.update( { "_id" : ObjectId("54022b7f60757d4944a05931") }, { "_key" : "group:administrators:members", "members" : [ "1", "2", "3" ] }, { upsert: true }More info here
http://docs.mongodb.org/manual/reference/mongo-shell/ -
Slight Update To Jenkler's approach, not sure in which version this changed* but:
modify the key "value" with the array of users you want to give admin permissions to
"value" : [ "1", "2" ]as opposed to
"members" : ["1","2"]Note: the ObjectId() used in the first parameter of the update query is the id of the object found from the find query { "_key" : "group:administrators:members" }
If you have rockmongo you may also just edit the result that you find from { "_key" : "group:administrators:members" } -
Np, Its nice to give back to the community
-
@Alexander-Anderson your are right, updates:
show collections
db.objects.find( { "_key" : "username:uid" } )
db.objects.find( { "_key" : "group:administrators:members" } )
db.objects.update( { "_id" : ObjectId("54022b7f60757d4944a05931") }, { "_key" : "group:administrators:members", "value" : [ "1", "2", "3" ] }, { upsert: true }) -
Sorry about reviving such an old thread but there is a simpler solution to this:
- create a new user
db.objects.find( {"username" : "newuser"} )
copy "password" value hash
db.objects.find( {"username" : "admin"} )
paste new password in "value"
now you have access to the admin account
- create a new user
-
@jenkler which plugin shows this nice preview/card to mongodb url?