This article will help you have a solution to change the username in DirectAdmin when your customer needs to change it.
In the process of operating a hosting system using cPanel or DirectAdmin, you may encounter a case where a customer needs to change the username to a new username.
So in this article, AZDIGI will show you how to change the username with the built-in script right on DirectAdmin.
II. How to change username in DirectAdmin
To change the username in DirectAdmin, we follow these 2 steps.
But before going into specifics of each step, we need to note a few things:
- When we change the username, the MySQL database prefix name information when managing in the MySQL Management feature will also be changed according to the prefix corresponding to the new username.
- It is recommended to back up the database before doing so just to be safe.
- After changing the username, the web application configuration needs to be updated with the new database name information.
- All user data will remain the same, DirectAdmin only changes the configuration information, directory paths related to the user to the new username to ensure that the service information and source code or user data will be undamaged.
Step 1: SSH into your DirectAdmin system
To change the username on DirectAdmin, we first need to SSH or access your VPS/server with root privileges. If you don’t know how to SSH into your VPS/Server, you can refer to the following tutorial:
After successfully SSH, we continue with step 2 to perform the command to change the username in DirectAdmin.
Step 2: Commands to change username in DirectAdmin
To change username in DirectAdmin, we execute the following 2 commands:
./change_username.sh olduser newuser
Explanation of the two commands above:
- Command 1: Move into the
- Command 2: Change the username from
newuser. Depending on the old and new username you want to change, change this command accordingly.
Here is the image of when I changed the username from
- Note 1: The directory/path name of the user is also changed corresponding to the new username.
- Note 2: The system transfers permissions and username-database to the new username-database.
- Note 3: Database is Exported and Imported into the new Databasename.
So the steps change on DirectAdmin has been completed.
Hopefully, with this article, you can shorten many operations when users want to change their username on DirectAdmin and provide quick support for their customers. Wishing you success.
See more useful articles about DirectAdmin at the following link:
If you need assistance, you can contact support in the ways below:
- Hotline 247: 028 730 24768 (Ext 0)
- Ticket/Email: You use the email to register for the service and send it directly to firstname.lastname@example.org.