Reply
New Member
Posts: 3
Registered: ‎02-14-2018
Accepted Solution

Unifi cloud key, new I.T. company

We took over a network from another IT company recently and need access to their Unifi controller

New customer has a Cloud Key with 7 UAC-AC-PROs

 

Former company wouldn't give us a password for the controller, because I believe it's linked to their Ubiquiti cloud account however I was able to find the Cloud Key appliance on the network, and by guessing some of the passwords they gave us I was able to use ROOT with one of those passwords to "Configure your Unifi Cloud key"

I can also ssh into the device into the linux shell

 

Knowing I can get this far, is there a method I can use to create myself an account on the controller or recover the password?
My alternative is to have to take a ladder around the building and reset APs

 

Thank you in advance!

 


Accepted Solutions
Established Member
Posts: 1,695
Registered: ‎03-02-2016
Kudos: 391
Solutions: 131

Re: Unifi cloud key, new I.T. company

[ Edited ]

It's probably best to just reset the CK and start afresh.

 

If you really want to hack into it on the back end, you can.

 

SSH into the CK.

Type mongo --port 27117

Type use ace

Type db.admin.find()

 

Copy one of the blurbs in curly braces into a text editor. It will be something like this:

 

{ "_id" : ObjectId("5a84eadb5e0ad40e72f8cc02"), "x_shadow" : "$6$9Ter1EZ9$lSt6/tkoPguHqsDK0mXmUsZ1WE2qCM4m9AQ.x9/eVNJxws.hAxt2Pe8oA9TFB7LPBgzaHBcAfKFoLpRQlpBiX1", "requires_new_password" : false, "name" : "winky", "email" : "me@email.com", "time_created" : NumberLong(1518660315), "last_site_name" : "73rpgsnh" }

Take note of the "name" field - this is your username. You can change it if you'd like, or just create a new user in the GUI later. Change the listed "x_shadow" value to the one in my code block above. This will set your password to "password". 

 

In your Mongo command window, enter

db.admin.save({your entire record in curly braces here})

Make sure that the record in curly braces is on one line (no wrapping).

 

Type exit.

 

You should now be able to log in to Unifi on port 8443 with the listed username and a password of password

 

View solution in original post


All Replies
Member
Posts: 281
Registered: ‎02-19-2015
Kudos: 57
Solutions: 12

Re: Unifi cloud key, new I.T. company

Ask them for the unifi device username and password and login to each device and reset 

New Member
Posts: 3
Registered: ‎02-14-2018

Re: Unifi cloud key, new I.T. company

No luck with that, they've turned over everything as far as they're concerned.

 

Highlighted
Emerging Member
Posts: 120
Registered: ‎07-24-2017
Kudos: 62
Solutions: 9

Re: Unifi cloud key, new I.T. company

The way I look at it is that you inherited a unfi cloud key and 7 APs. Reset the controller and the APs to the factory defaults and set up another network. Done.

Established Member
Posts: 1,695
Registered: ‎03-02-2016
Kudos: 391
Solutions: 131

Re: Unifi cloud key, new I.T. company

[ Edited ]

It's probably best to just reset the CK and start afresh.

 

If you really want to hack into it on the back end, you can.

 

SSH into the CK.

Type mongo --port 27117

Type use ace

Type db.admin.find()

 

Copy one of the blurbs in curly braces into a text editor. It will be something like this:

 

{ "_id" : ObjectId("5a84eadb5e0ad40e72f8cc02"), "x_shadow" : "$6$9Ter1EZ9$lSt6/tkoPguHqsDK0mXmUsZ1WE2qCM4m9AQ.x9/eVNJxws.hAxt2Pe8oA9TFB7LPBgzaHBcAfKFoLpRQlpBiX1", "requires_new_password" : false, "name" : "winky", "email" : "me@email.com", "time_created" : NumberLong(1518660315), "last_site_name" : "73rpgsnh" }

Take note of the "name" field - this is your username. You can change it if you'd like, or just create a new user in the GUI later. Change the listed "x_shadow" value to the one in my code block above. This will set your password to "password". 

 

In your Mongo command window, enter

db.admin.save({your entire record in curly braces here})

Make sure that the record in curly braces is on one line (no wrapping).

 

Type exit.

 

You should now be able to log in to Unifi on port 8443 with the listed username and a password of password

 

New Member
Posts: 3
Registered: ‎02-14-2018

Re: Unifi cloud key, new I.T. company

[ Edited ]

Thanks for the detailed, step by step instructions Dave. Saved me some precious time there.

 

This worked like a charm, a clever way to replace the password on the admin acccount using mongo. I had been hoping there was a way as historically I'd been able to do something similiar for password recovery on a Windows OS. Did not disappoint, thanks again!

 

 

 

Reply