How to Reset the CyberPanel Admin Password From SSH (adminPass)
Forgot the CyberPanel admin password, or the login page keeps saying it's wrong? If you still have root SSH access, you can set a new one in a few seconds. Before you run the usual one-liner, though, look at what it does: it leaves your new password in a plain-text file.
The quick fix
Log in to the server as root (SSH, or your provider's VNC console) and run:
Use single quotes so characters like or aren't interpreted by the shell. Then log in at with user admin and the new password.
What adminPass really does
We looked at what the command actually does on our server:
![[Image: attachment.php?aid=547]](https://adminsforum.com/attachment.php?aid=547)
It's a three-line script:
), but anyone who ever gets root access or a copy of your server backup can read it. In the same folder you'll also find (the MariaDB root password) and (the OpenLiteSpeed WebAdmin password). Keep that folder out of any backups you send off-site unencrypted.
Clean up after resetting
Remove the plain-text copy and the password from your shell history:
Or avoid the history entry in the first place: start the command with a space (works when includes ignorespace, the Ubuntu default), or read the password silently:
Other things the same script can do
Besides , it has / to switch the admin's API access on or off (it prints the API token when enabling). On our server the admin had and :
Locked out by 2FA instead?
adminPass doesn't touch two-factor authentication. If you lost the phone with your authenticator app, switch 2FA off for the admin user from SSH, log in, and turn it on again with a new device:
Turn 2FA back on right away: see first steps after install.
Still can't log in?
More CyberPanel guides
Tested on CyberPanel 3.0 (build 8, OpenLiteSpeed edition) on Ubuntu 24.04, October 2026. Menu names can change slightly between versions.
Forgot the CyberPanel admin password, or the login page keeps saying it's wrong? If you still have root SSH access, you can set a new one in a few seconds. Before you run the usual one-liner, though, look at what it does: it leaves your new password in a plain-text file.
The quick fix
Log in to the server as root (SSH, or your provider's VNC console) and run:
Code:
adminPass 'YourNewStrongPassword'Code:
$Code:
!Code:
https://YOUR-SERVER-IP:8090What adminPass really does
We looked at what the command actually does on our server:
Code:
cat /usr/bin/adminPass- Runs , which sets the new password (hashed) for the admin user in CyberPanel's database.Code:
/usr/local/CyberCP/plogical/adminPass.py --password "..."
- Restarts the panel: .Code:
systemctl restart lscpd
- Writes the password to in plain text.Code:
/etc/cyberpanel/adminPass
Code:
-rw-------Code:
mysqlPasswordCode:
webadmin_passwdClean up after resetting
Remove the plain-text copy and the password from your shell history:
Code:
shred -u /etc/cyberpanel/adminPass
history -c && history -wCode:
HISTCONTROLCode:
read -s -p "New admin password: " P; echo
adminPass "$P"; unset POther things the same script can do
Code:
/usr/local/CyberCP/bin/python /usr/local/CyberCP/plogical/adminPass.py --helpCode:
--passwordCode:
--api 1Code:
--api 0Code:
twoFA = 0Code:
api = 0Code:
mysql cyberpanel -e "select userName,twoFA,api from loginSystem_administrator"Locked out by 2FA instead?
adminPass doesn't touch two-factor authentication. If you lost the phone with your authenticator app, switch 2FA off for the admin user from SSH, log in, and turn it on again with a new device:
Code:
mysql cyberpanel -e "update loginSystem_administrator set twoFA=0 where userName='admin'"
systemctl restart lscpdStill can't log in?
- Server Error (500) instead of the login page: that's not a password problem. See our Server Error (500) fix.
- Page doesn't load at all: port 8090 blocked, or lscpd stopped: . See checking CyberPanel services.Code:
systemctl status lscpd
- Reseller or normal user forgot their password: log in as admin and change it under Users & Plans. adminPass only resets the admin account.
More CyberPanel guides
- Fail2ban brute-force protection
- Change PHP version per website
- Git deployment from GitHub
- SSH key login, passwords off
- Create a website
- Issue SSL and fix failed certificates
- Subdomains, addon domains and aliases
- Rewrite rules, force HTTPS, HSTS
- Install WordPress with LiteSpeed Cache
- Cron jobs and a real WP-Cron
- Redis object cache for WordPress
- Databases and phpMyAdmin
- Email, DKIM, SPF and DMARC
- Email forwarding, catch-all, plus-addressing
- Mail queue, spam senders, blacklists
- CyberPanel DNS vs Cloudflare
- Packages and website limits
- Deploy Laravel on CyberPanel
- WordPress staging (clone) fixes
- Backups: create, restore, schedule
- File Manager and FTP
- Log files and config locations
- Check and restart services
- First steps after install
- ModSecurity + OWASP rules (fix)
- CLI cheat sheet
- Install CyberPanel on Ubuntu 24.04
- Firewall explained
- Install PHP extensions
- Change PHP settings (php.ini)
- Update CyberPanel safely
- Server Error (500) after a fresh install
- Packages, users and ACLs
- Upgrade CyberPanel safely
- Real visitor IPs behind Cloudflare
- Docker apps on your domain with SSL
- Import a large SQL file over SSH
- Remote MySQL access for one IP
- Move WordPress to CyberPanel by hand
- Fix "Error establishing a database connection"
- Fix PHP2Shell (CVE-2026-109618/109619)
- Run your own nameservers (PowerDNS)
- CyberPanel on a small VPS: RAM tuning
Tested on CyberPanel 3.0 (build 8, OpenLiteSpeed edition) on Ubuntu 24.04, October 2026. Menu names can change slightly between versions.

