lost admin password
-
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?
-
@andreas-pcw said in lost admin password:
@jenkler which plugin shows this nice preview/card to mongodb url?
I don't know, Its just a standard link Link without any tags.
@julian <-- Do you have a clue about what plugin is used in this forum to display nice links?