UniFi - How to reset UniFi password from SSH

Alex Lowe

Last updated: October 9, 2026

If you need to reset your UniFi password at HostiFi, you should use the password reset link from your controller. This article is for resetting passwords on non-HostiFi controllers, to help users migrate when they have lost their old credentials.

If you want fast and reliable UniFi hosting, check out HostiFi with expert support, regular backups, managed updates and prices from $19 per month.

To learn more about our hosting plans, create an account or book a free demo to get started.

Find the "name" of the admin you want to reset with this command:

mongo --port 27117 ace --eval "db.admin.find().forEach(printjson);"

Replace <username> with the admin account name you found above:

mongo --port 27117 ace --eval 'db.admin.update( { "name" : "<username>" }, { $set : { "x_shadow" : "$6$ybLXKYjTNj9vv$dgGRjoXYFkw33OFZtBsp1flbCpoFQR7ac8O0FrZixHG.sw2AQmA5PuUbQC/e5.Zu.f7pGuF7qBKAfT/JRZFk8/" } } )'

Now you can log in as that admin with the password password.

About HostiFi

HostiFi provides hosting for Ubiquiti software platforms, with servers for UniFi and UISP. We also offer network consulting, with HostiFi Professional Services.

Get the Ubiquiti Top 20

Each month our team sifts through Ubiquiti news and content from around the web and delivers 20 of our favorite links to your inbox.

View recent issues

No spam. Unsubscribe anytime.

🤩

Discovered 3+ things that I did not know and will have a material impact on my business.

Newsletter Subscriber

🤩

All the info I want/need in a single clean thread! Perfect!

Newsletter Subscriber

🤩

Providing super valuable information to keep the community in the know. Awesome links page, Thank You.

Newsletter Subscriber