Ubiquiti Controller forgotten password and unable to login! Recently, I’ve ran into this weird issue where I could not log into a Ubiquiti Controller for the life of me. I knew the password was correct because I had used it before and I’ve even had it written down. I’ve wasted countless hours trying out derivatives of the password that I had, mixing up capital letters etc. without any success. I still don’t know for sure why this happened, my best guess would be that I’ve picked a password that did not pass Ubiquiti’s password complexity requirements and thus causing it to lock me out. I am however surprised that it went through in the first place. If anyone out there know exactly why this happens please let me know in the comments below. Anyhow, here is the resolution I’ve found during my research on how to reset your UniFi controller admin password.
How to Reset an Ubiquiti Controller Password?
Step 1 – Download Robomongo
This amazing program will allow you to access the configuration files of the UniFi Controller. Not only does it allow you to access the files but it also lets you to edit the config files. An older version may be harder to find now so I am adding a direct link to the download below. All credit goes to Robomongo developers, you may visit them at Robo 3T.
Please make sure that you install the Robomongo software on the same computer UniFi Controller is running. Running it on a remote PC will not let you authenticate to the UniFi database. Once you have the program installed and running, please continue to step two.
Step 2 – Edit Ubiquiti UniFi Config Files
Open up the Robomongo software & connect to the Ubiquiti Database. The screenshots below will show you how this is done, address should be “localhost” port should be “27117 “.
Navigate your way to the ace > admin file, there you will see the password in its encrypted format. Your password will be the longest line there in its encrypted form. Now we want to replace this password with another encrypted password, for that continue to step three.
Step 3 – Reset Ubiquiti Controller Administrator Password
We will head over to Quickhash.com and generate a new encrypted password to be used with our UniFi controller.
Once you have generated a new password in its encrypted form, copy that data and replace the password field “x_shadow“ in the Controller’s database as shown below.
Alternatively, you may also use the pre-created password that I have below and reset it to your own once logged in.
Encryption the password uses is : SHA-512 / crypt(3) / $6$ (just in case anyone is wondering)
Step 4 – UniFi Controller Access & Login
Now you may try the login again using the password that you’ve set in step three. You should now be able to successfully sign into the UniFi Controller. I would also restart the controller if it is already running just to double check it is working properly.
If anyone has any idea why this issue occurs in the first place, I would appreciate it if you can shed some light on this problem in a comment below.
I hope this article was helpful for you in resolving the UniFi forgotten password issue. Thank You, for visiting & I hope you will stick around for more useful content.