In DirectAdmin control panel you can change the present configured password at anytime. In this article, we will cover the step-by-step guide on How to change the account password in DirectAdmin?
Change Password Using GUI
1. First, to login into DirectAdmin control panel visit,
https://your-domain.com:2087 or https://IP-address:2087or https://server-hostname:2087.

2. Top right-click → Click on Username → Click on Password.

3. Enter the required information,
Current DirectAdmin Password: Enter the current password of DirectAdmin control panel.
Enter new password: Enter the complex and hard to guess password.

4. Finally, click on Save.
Access Your Server via SSH
- Open your terminal or SSH client.

- Connect to your server using the root user. For example:
<code> ssh root@your_server_ip</code>
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:
<code> passwd admin</code>
- 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:
<code> echo "adminpass=new_password" >> /usr/local/directadmin/scripts/setup.txt</code>
Step 5: Restart DirectAdmin
- Finally, restart DirectAdmin to ensure the changes take effect:
<code> service directadmin restart</code>

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