UniFi - User SSH Management

Learn how to make, delete and manage users in UniFi using SSH

Alex Lowe

Last updated: October 9, 2026

Learn how to make, delete and manage users in UniFi using SSH.

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.

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://support.hostifi.net/en/articles/3437198-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/support-tools/main/lib/unifi/py/create-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:

python3 create-super-admin.py -u username -p p@ssw0rd!22 -e your@email.com

You can now log in to your UniFi server with the new Super Admin!

Delete a UniFi Super Admin from SSH

You can use our script to delete UniFi Super Admin accounts from SSH.

The normal process for deleting Super Admin accounts is to go to Settings > Admins > Edit and change the role from Super Administrator to Administrator, then delete the Admin from each site on the controller.

On a controller with many sites, this can be time consuming, so we wrote a script to automate the removal process:

First, you'll need to get SSH access to your server: https://support.hostifi.net/en/articles/3437198-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/support-tools/main/lib/unifi/py/delete-super-admin.py
python3 delete-super-admin.py -u username_or_email_here

Customize the -u input to provide the username of the Super Admin account to be removed. Run the script:

python mongo-delete-unifi-super-admin.py -u username

You can verify that the account has been removed under Settings > Admins inside UniFi.

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