When trying to access my local UniFi controller web console I discovered that it was rejecting my username and password. After double checking the credentials I was certain they were correct.
After doing some research I was able to find a way to reset the password for the user accounts inside the server itself. If you have SSH access, it’s possible to run the following commands to access the mongoDB database and update the password.
Find all admin user accounts and print them to the console:
mongo --port 27117 ace --eval "db.admin.find().forEach(printjson);"
From that list you should be able to run the following, adding in your username where <UserName> is:
admin.update( { "name" : "<UserName>" }, { $set : { "x_shadow" : "$6$ybLXKYjTNj9vv$dgGRjoXYFkw33OFZtBsp1flbCpoFQR7ac8O0FrZixHG.sw2AQmA5PuUbQC/e5.Zu.f7pGuF7qBKAfT/JRZFk8/" } } )'
What this does is reset the password for the specified username to “password”.
From there you should be able to access the web console and update the password to something more secure!