OpenLiteSpeed is a powerful and lightweight web server used in CyberPanel. If you have forgotten your OpenLiteSpeed WebAdmin password or need to change it, you can do so via the command line. This guide will walk you through the steps to reset or change your OpenLiteSpeed password.
Prerequisites
- You must have root or sudo access to your server.
- CyberPanel and OpenLiteSpeed should be installed on your server.
- SSH access to your server.
Steps to Change the OpenLiteSpeed Password
Step 1: Access Your Server via SSH
First, log in to your server using SSH:
ssh root@your-server-ip
Replace your-server-ip
with your actual server's IP address.
Step 2: Run the Password Reset Command
To reset the OpenLiteSpeed WebAdmin password, run the following command:
/usr/local/lsws/admin/misc/admpass.sh
Step 3: Enter the New Credentials
The script will prompt you to enter a new username and password:
Please specify the user name of administrator.
This is the user name required to login the administration Web interface.
User name [admin]:
Press Enter
to keep the default username (admin
) or type a new one.
Then, enter your new password when prompted:
Please specify the administrator's password.
Password:
Retype password:
Type your new password and confirm it.
Step 4: Restart OpenLiteSpeed
After setting the new credentials, restart OpenLiteSpeed to apply the changes:
systemctl restart lsws
Step 5: Log in to OpenLiteSpeed WebAdmin
Now, open your web browser and go to:
https://your-server-ip:7080
Log in using the new credentials you just set.
Conclusion
By following these steps, you can easily reset or change your OpenLiteSpeed WebAdmin password via the command line. This method ensures secure access to your web server control panel.
If you encounter any issues, make sure OpenLiteSpeed is running correctly using:
systemctl status lsws
If you have any further questions, feel free to ask!