Knowledge Base
MilesWeb / DirectAdmin, How-Tos

How to Change Username for your DirectAdmin Account?

Approx. read time : 2 min

Only admins have the authority to change the username of a DirectAdmin account. However, the tool to alter a username has been removed from the DirectAdmin interface since April 2021.

In this tutorial, we will show you how to do it via SSH access.

Warning: Changing the username will make all data for that account inaccessible. That is why we recommend you take a full data backup before proceeding.

To Change Username

1. Confirm if the new username is available. Run the following command to check:

If it is available and ready to use, you will get an empty response.

2. Change the username with these commands:


DirectAdmin will change the username in this way:

[root@test /]# cat /etc/passwd | grep newusername
[root@test /]# cd /usr/local/directadmin/scripts
[root@test scripts]# ./ oldusername newusername
Killing User processes:
[root@test scripts]#

3. To confirm, rerun the cat command:

This time, the result will look something like this:

[root@test scripts]# cat /etc/passwd | grep newusername
[root@test scripts]#

4. Reconfigure the settings for your website.

  • Change the path of the hosting account according to the new username. (/home/NEWUSERNAME/)
  • Change the database names and update them accordingly.

That’s all you need to do to change the username of your DirectAdmin account.

Prasad Khartadkar
Prasad is a business grad specialized in Marketing. He has garnered experience as a technical content writer and a digital marketer that he brings out in his work. He likes reading classics and travel in his free time.