apt get life

Life around technology

  • Technology
    • Guides
    • Linux
    • Development
      • Laravel
    • Misc
    • Raspberry Pi
  • Writing
  • Crafts
    • Crochet
    • Model Making
    • Painting
  • Privacy Policy
You are here: Home / Technology / Resetting a UniFi controller password

Resetting a UniFi controller password

2019/05/06 by sudo

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!

 

Related

Filed Under: Technology Tagged With: UniFi

Recent Posts

  • System Hang on Ubuntu 24.04 “e1000_print_hw_hang”
  • Disable iLO on HP Microserver Gen8
  • Ubuntu Desktop 24.04 Change Wallpaper Settings
  • Customising Ubuntu Desktop 24.04
  • Remove domains from Let’s Encrypt using Certbot

Tags

API auditing crochet data recovery debian debudding development Dingo API docker email Getting started with Laravel 5 & Dingo API hard drive health HP Microserver KVM Laravel larvel 5 lenovo Linux Minion mint netgear nas networking network shares php PHP development Postfix raspberry pi review samba security SMART smartctl smartmontools smb testing traefik ubuntu ubuntu 18.04 ubuntu 20.04 ubuntu 22.04 ubuntu server vagrant Virtual machines xdebug xubuntu

© Copyright 2015 apt get life