Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  DirectAdmin  >  How to Change Username for your DirectAdmin Account?
Top Scroll

How to Change Username for your DirectAdmin Account?

 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:

# cat /etc/passwd | grep NEWUSERNAME

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

2. Change the username with these commands:

# cd /usr/local/directadmin/scripts


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:

# cat /etc/passwd | grep NEWUSERNAME

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.

For our Knowledge Base visitors only
Get 10% OFF on Hosting
New Year Savings
Claim the discount before it’s too late. Use the coupon code:
Note: Copy the coupon code and apply it on checkout.