segunda-feira, março 04, 2019

Ubnt unifi lost password

Some commands I used, to catch user and to "add" when needed.

 very important, find your backup, you may needed, even after you reset the password.

mkpasswd -m sha-512

password (word password in hash...)
mongo --port 27117 ace --eval 'db.admin.update( { "name" : "admin" }, { $set : { "x_shadow" : "$6$9Ter1EZ9$lSt6/tkoPguHqsDK0mXmUsZ1WE2qCM4m9AQ.x9/eVNJxws.hAxt2Pe8oA9TFB7LPBgzaHBcAfKFoLpRQlpBiX1" } } )'

d = { "name" : "ubnt", "lang" : "en_US", "x_password" : "ubnt" , "time_created" : "", "last_site_name" : "default"}
db.admin.insert ( d )

Execute 'mongod --dbpath /usr/lib/unifi/data/db --repair' (this broke my install)

List users admin's

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

Run windows programs and apps on Linux with Wine


Wine enables Linux, Mac, FreeBSD, and Solaris users to run Windows applications without a copy of Microsoft Windows. Wine is free software under constant development. Other platforms may benefit as well.

Debian Sources List Generator

This generate lines for repository file on apt