~3 min read • Updated Mar 1, 2026
1. How to Rename a Domain
To rename a domain (e.g., domain1.com → domain2.com):
- Go to User Level → Domain Setup → Change a Domain Name.
- Select the domain and enter the new name.
Important Notes:
- This change affects website files (public_html) and email accounts.
- Databases are not renamed; you may need to update script configurations manually.
2. How to Change a Username
Run the following script as root via SSH:
cd /usr/local/directadmin/scripts
./change_username.sh olduser newuser
Important Security Tip: Always back up all databases (.sql) before renaming a user.
---3. How to Move a Domain from One User to Another
Use the built-in script:
cd /usr/local/directadmin/scripts/
./move_domain.sh domain.com olduser newuser
If the new user does not exist:
- Create a temporary domain (e.g., fakedomain.com).
- Move the real domain.
- Delete the temporary domain.
To move databases:
Use:
rename_database_with_user.sh
---
4. How to Merge Two User Accounts
Useful for reducing account count (e.g., Personal license) or simplifying management.
Method 1: Promote User to Admin and Remove Old Account
cd /usr/local/directadmin/scripts
./user_to_reseller.sh fred
echo "fred" >> /usr/local/directadmin/data/admin/admin.list
perl -pi -e 's/^fred\n//' /usr/local/directadmin/data/admin/reseller.list
perl -pi -e 's/usertype=reseller/usertype=admin/' /usr/local/directadmin/data/users/fred/user.conf
Then log in as fred, delete the old admin account, and rename fred if needed.
Method 2: Restore Merge Using Backup
If fred was deleted, rename the backup:
user.admin.fred.tar.gz → admin.root.admin.tar.gz
Then restore it.
Method 3: Manual Migration (Advanced)
- Move all domains.
- Move databases using
rename_database_with_user.sh. - Copy cronjobs manually:
crontab -u fred -l > crons.txt
crontab -u admin -e
---
5. Fixing “Domain already exists” Errors
If DirectAdmin reports that a domain already exists, check:
named.conf/etc/virtual/domains/etc/virtual/domainowners/etc/virtual/domain.com- .nzf files in
/var/named
Also check Multi-Server Setup if Domain Check is enabled.
---6. Why Some Users Do Not Appear in “Show All Users”
The cache file may be corrupted. Rebuild it:
da taskq --run="action=cache&value=showallusers"
Or delete it:
rm -f /usr/local/directadmin/data/admin/show_all_users.cache
---
7. How to Send a Message to All System Email Accounts
- Go to Admin Level → Show All Users → Advanced Search.
- Set Items per Page = All.
- Click Search, select all users, then click Send a Message.
- Enable All E-Mail Accounts and E-Mail Only.
8. Suspend/Unsuspend Users or Domains via Command Line (DA v1.595+)
/usr/local/directadmin/directadmin --suspend-user user=fred
/usr/local/directadmin/directadmin --unsuspend-user user=fred
/usr/local/directadmin/directadmin --suspend-domain domain=domain.com
/usr/local/directadmin/directadmin --unsuspend-domain domain=domain.com
---
9. Disable Automatic Reseller Suspension on Overlimit
Edit the reseller’s reseller.conf:
suspend_at_limit=OFF
---
10. Change the Package for All Users
Use this script:
OLD=custom
NEW=fancy
for i in `ls /usr/local/directadmin/data/users`; do
if grep -q "usertype=user" /usr/local/directadmin/data/users/$i/user.conf; then
perl -pi -e "s/package=$OLD/package=$NEW/" /usr/local/directadmin/data/users/$i/user.conf
fi
done
Then open the new package in the panel and click Save.
---11. Change the Package for All Users Under a Specific Reseller
CREATOR="silver"
TOPACKAGE="gold"
for u in `grep "^creator=${CREATOR}$" /usr/local/directadmin/data/users/*/user.conf | cut -d/ -f4`; do
perl -pi -e "s/^package=.*/package=${TOPACKAGE}/" /usr/local/directadmin/data/users/$u/user.conf
done
Then save the gold package.
---12. Disable mail_sni for a Specific Domain
Edit:
/usr/local/directadmin/data/users/username/domains/domain.com.conf
Add:
mail_sni=OFF
Then rewrite:
echo "action=rewrite&value=mail_sni" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d
---
13. Send Heavy Notifications (e.g., brute force alerts) to Another Email
Edit the admin’s user.conf:
[email protected],[email protected]
---
14. How to Block Specific Domains
Copy the template Error! Hyperlink reference not valid.
/usr/local/directadmin/data/templates/forbidden_domains.list
→ /usr/local/directadmin/data/templates/custom/forbidden_domains.list
Add the domains you want to forbid.
Written & researched by Dr. Shahin Siami