How to change DirectAdmin admin password from SSH? Print

  • 545

If you have lost or forgotten your DirectAdmin admin password, you can easily reset it using the command line. This guide will walk you through the steps required to update the password securely.


Prerequisites

  • Root SSH access to your server
  • DirectAdmin installed on the server
  • Basic knowledge of SSH login commands

Step-by-Step Instructions

1. Connect to Your Server via SSH

Use your terminal application (PuTTY, Terminal, etc.) and run:

ssh root@your-server-ip

Replace your-server-ip with your actual server IP address.

2. Reset the DirectAdmin Admin Password

Run the following command to reset the password for the DirectAdmin admin user:

passwd admin

You will be prompted to enter the new password twice:

New password: 
Retype new password:

You will receive a confirmation message once the password has been successfully updated.

3. Restart DirectAdmin (Optional but Recommended)

systemctl restart directadmin

This ensures the service loads the updated credentials properly.

4. Log in to DirectAdmin

Open your browser and access:

https://your-server-ip:2222

Enter:

  • Username: admin
  • Password: (the new password you set)

Additional Notes

  • If your DirectAdmin admin username is different (rare cases), replace admin with your actual username in the command.
  • If you do not have root SSH access, please contact your support team.
  • Your original DirectAdmin installation credentials may also be found in:
    /usr/local/directadmin/scripts/setup.txt
    /var/log/directadmin/install.log
    (Available only if not removed after setup)

Need Help?

If you encounter any issues during the password reset process, please open a support ticket and our technical team will be happy to assist you.


Was this answer helpful?

« Back

Powered by WHMCompleteSolution