Create a UniFi Super Admin from SSH
You can use our script to create new UniFi Super Admin accounts from SSH. This should only be used if you are locked out of your account. If you’re not locked out, you should create Super Admins in UniFi under Settings > Admins.
First, you’ll need to get SSH access to your server: https://tran-technology.com/how-to-ssh-or-sftp-into-your-unifi-server/
Log in via SSH, then use wget to download the script from GitHub:
wget https://raw.githubusercontent.com/HostiFi/mongo-create-unifi-super-admin/master/mongo-create-unifi-super-admin.py
Customize -u, -p, and -e inputs to provide the username, password, and email address for the new Super Admin account. Run the script:
python mongo-create-unifi-super-admin.py -u username -p [email protected]!22 -e [email protected]
You can now log in to your UniFi server with the new Super Admin!