Search Our Database

How to change DirectAdmin’s admin password via SSH

Last updated on |

Introduction

This guide explains how to change the admin password in DirectAdmin. It is designed for system administrators or users who already have access to their DirectAdmin control panel and wish to update their admin password. This can be useful for security purposes or to meet updated password policies.

 

Prerequisites

Before proceeding, ensure you have:

  • Access to the DirectAdmin control panel as the admin user.
  • The current admin password.
  • A new password that meets your security requirements.

 

Steps to change the admin password in DirectAdmin

Step 1: Connect to the Server via SSH

Use your preferred SSH client to connect to your server as the root user.

ssh root@<server_ip>

Replace <server_ip> with your actual server IP address.

 

Step 2: (Optional) Check the Original Installation Credentials

If you’re unsure of the initial admin credentials, you can review the setup logs from the DirectAdmin installation:

cat /var/log/directadmin/install.log

or

cat /usr/local/directadmin/scripts/setup.txt

 

Step 3: Change the Admin Password

To reset the password for the admin user, use the following command:

passwd admin

You will be prompted to enter the new password twice:

Changing password for user admin. 
New UNIX password: 
Retype new UNIX password: 
passwd: all authentication tokens updated successfully.

Once successful, the new password will apply to both the system and the DirectAdmin control panel.

 

 

Conclusion

By following these steps, you can efficiently update the DirectAdmin admin password via SSH. This process ensures that your administrative credentials remain secure and up-to-date. Always ensure that your new password is strong and unique to maintain the security of your server environment. If you encounter any issues or need further assistance, feel free to reach out for support at support@ipserverone.com

 

Article posted on 23 February 2020 by IPSERVERONE