Home WebServer PanelDirectAdmin How to change username in DirectAdmin

How to change username in DirectAdmin

by Thạch Phạm
Published: Last Updated on

This article will help you have a solution to change the username in DirectAdmin when your customer needs to change it.

I. Overview

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:

AZDIGI Tutorial

cd /usr/local/directadmin/scripts
./change_username.sh olduser newuser

Explanation of the two commands above:

  • Command 1: Move into the scripts directory.
  • Command 2: Change the username from olduser to 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 fromdabao to dabaonew

How to change the username in DirectAdmin


  • 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.

III. Summary

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:

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign