Skip to main content
All CollectionsUniFiUniFi - Advanced Guides
How to reset UniFi password from SSH
How to reset UniFi password from SSH
Reilly Chase avatar
Written by Reilly Chase
Updated over 5 years ago

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.

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.

Did this answer your question?