reset directadmin password from SSH
To reset DirectAdmin password from SSH, you will need to access your server as a root user.
Table of Contents
Step 1: Access Your Server via SSH
- Open your terminal or SSH client.

- Connect to your server using the root user. For example:
ssh root@your_server_ip
Step 2: Retrieve the Current Admin Password
- Once you are logged in, you can retrieve the current DirectAdmin admin password by running the following command:
cat /usr/local/directadmin/scripts/setup.txt | grep adminpass

- This command will display a line similar to:
adminpass=your_current_password
Step 3: Reset directadmin password from SSH
- To reset the admin password, use the following command:
passwd admin
- You will be prompted to enter the new password and confirm it.

Step 4: Update DirectAdmin Configuration
- After resetting the admin password, you need to update the DirectAdmin configuration with the new password. Run the following command:
echo "adminpass=new_password" >> /usr/local/directadmin/scripts/setup.txt
Step 5: Restart DirectAdmin
- Finally, restart DirectAdmin to ensure the changes take effect:
service directadmin restart

Alternative Method: Using DirectAdmin Commands
- You can also use DirectAdmin’s internal command to reset the admin password. Run the following:
/usr/local/directadmin/directadmin set admin_pass new_password
- Restart DirectAdmin:
service directadmin restart
Make sure to replace new_password
with the actual password you want to set.