Search Our Database

How to change DirectAdmin username

Last updated on |
by

Introduction

This guide provides a step-by-step walkthrough for users looking to change the username in DirectAdmin. It is intended for users who have access to DirectAdmin and want to modify user accounts. Changing the username might be required when managing user privileges or ensuring secure account handling. This guide covers the necessary steps, ensuring minimal impact on your system.

 

Prerequisites

  • SSH access with root privileges
  • Know the current username and have a new username ready.

 

Step 1: Log in to your server via SSH

ssh [username]@[your_server_ip]

 

Step 2: Check if the the new username is available. Run the following command to check:

cat /etc/passwd | grep newuser
  • Replace newuser with the user you wish to create
  • If it is available and ready to use, you will get an empty response.

  • If the new username exists, you will see a response.

If the username already exists, you must choose a different username, as DirectAdmin does not support duplicate usernames. In this case:

  • Pick a new, unique username that is not already in use on the server.
  • Re-run the check with the new chosen username to ensure it is available

 

Step 3: Navigate to the DirectAdmin Scripts Directory

cd /usr/local/directadmin/scripts/

 

Step 4: Run the Username Change Script

./change_username.sh olduser newuser
  • Replace olduser with the current username and newuser with the desired new username.

 

Conclusions

By following these steps, you can successfully change a DirectAdmin username via SSH. Make sure to verify that all services associated with the user are functioning properly after the change. For additional assistance or if you encounter any issues, please contact our support team at support@ipserverone.com.