Unifi Controller

I had a docker container of the jacobalberty/unifi “all-in-one” Unifi Network Application, and I somehow garbled the password…

The fix?

  • enter the container:
    • docker exec -it <container_name> /bin/bash
  • run MongoDB CLI:
    • mongo --port 27117
  • find the administrator user name/s:
    • use ace;
    • db.admin.find().forEach(printjson);
  • you should see one or more name entry/entries:
    • "name" : "<user_name>"
  • set/reset the password (to “password“):
    • db.admin.update( { "name" : "<user_name>" }, { $set : { "x_shadow" : "$6$ybLXKYjTNj9vv$dgGRjoXYFkw33OFZtBsp1flbCpoFQR7ac8O0FrZixHG.sw2AQmA5PuUbQC/e5.Zu.f7pGuF7qBKAfT/JRZFk8/" } } )

You should be able to log right back in with the reset password.