You will need a hash of the password to put into the database. We don’t cover that in this post. You could copy the password from a different user account or use a different UniFi instance to change the password and then check the DB to find the hash.
SSH into the UniFi Server
Connect to MongoDB
Connect to Mongo by typing in the following.
mongo -port 27117
Then select the ace database by typing
Find user ObjectId
The admins are in the admin collection/table. Use the following command to list all the users and their name, email, and password hash.
Restoring a Pixel to the factory image is a pretty straight forward operation if you are familiar with fastboot and adb. This guide assumes you have fastboot already installed and setup in your user path. If not you can refer to the following link for more information.
WARNING – THESE STEPS WILL DELETE ALL USER DATA OFF THE DEVICE.
There are multiple ways to reset windows passwords. This one replaces the sticky key program with a command prompt from which you can change the password.
To reset the forgotten windows password, follow these steps:
Boot from a Windows setup DVD. Any setup DVD should work. Access the command prompt.
Find the drive letter of the partition where Windows is installed. In Vista, Windows 8 and XP, it is usually C:, I have read that in Windows 7, it is D: I am not sure which one it is. In most cases because the first partition contains Startup Repair. To find the drive letter, type C: (or D:, respectively) and search for the Windows folder.
Type the following command (replace “c:” with the correct drive letter if Windows is not located on C:): copy c:\windows\system32\sethc.exe c:\
This creates a copy of sethc.exe to restore later.
Type this command to replace sethc.exe with cmd.exe: copy /y c:\windows\system32\cmd.exe c:\windows\system32\sethc.exe
Reboot your computer and start the Windows installation where you forgot the administrator password.
After you see the logon screen, press the SHIFT key five times.
You should see a command prompt where you can enter the following command to reset the Windows password:net user your_user_name new_password
If you don’t know your user name, just type net user to list the available user names.
You can now log on with the new password.
I recommend that you replace sethc.exe with the copy you stored in the root folder of your system drive in step 3. For this, you have to boot up again with Windows setup DVD because you can’t replace system files while the Windows installation is online. Then you have to enter this command: