camscape - for excellent IT solutions itkb.ro - IT knowledge base

pentru tonti :: unifi controller password reset

David
David G.
TitleUniFi controller password reset
TagsUniFi,Password reset
Desc.UniFi controller password reset
CodeKBCR0008 v1.0
Date 4 septembrie 2018

SSH to a UniFi controller, one that you still know the password.


 

cd /public/UniFi/mongo/bin

./mongo --port 27117

MongoDB shell version: 1.6.5
connecting to: 127.0.0.1:27117/test
> use ace
switched to db ace
> db.admin.find()

 

You''ll get something like this:

 

{ "_id" : ObjectId("5768dc4cb97a564219ff9256"), "name" : "Administrator", "email" : "something@domain.ro", "x_shadow" : "$6$j_a_lot_of_characters", "time_created" : NumberLong(1466489932), "last_site_name" : "default", "requires_new_password" : false }

 

Copy the $6$j_a_lot_of_characters above

 

Now, SSH to the UniFi that you don''t remember the password:

cd /public/UniFi/mongo/bin

./mongo --port 27117

MongoDB shell version: 1.6.5
connecting to: 127.0.0.1:27117/test
> use ace
switched to db ace
> db.admin.find()

 

Note the "name" of your admin user and input:

 

db.admin.update( { name: "name_of_admin" }, {$set: { x_shadow: "$6$j_a_lot_of_characters" } } )

 

Now, it has the same password as the one you already know. Change it on first login