I have used several host control panel, but it seems direct admin is more friendly and use to use.
Please how can i change the default username of my DirectAdmin?
For system reasons, it's better you don't. If you're not on a personal license, and you don't want to use the main admin account, it's better to create a new one with the name you want and set a very long an difficult password on the original one.
If you still want it removed, check this thread, a bit old but can still apply.
I want consolidate few servers to one. Unforthunatly, they have a lot of sites to admins accounts. I want rename admin account to admin1, admin2, etc. Please help me correct rename admin account.
forum.directadmin.com
There was a discussion recently about this, but I can't find it that quickly anymore.
I don't have a personal license but for a lifetime license (or can be applied with license that supports more than 1 user), I always use this script to change the default admin account (I have been doing this for a long time and have not found any issues):
Most of the DA scripts just rely on any 'admin' role in the Directadmin system to work properly. This means you can have whatever username of the admin role you want but you must have at least 1 admin role type that must appear when you do this command:
Code:
/usr/local/directadmin/directadmin a
The above command will just take any top admin account that must exist in the system (probably inside /usr/local/directadmin/data/admin/admin.list). So, the username can be anything for the DA to work properly:
Note: DA also allows you to delete the default admin account (created by root) using the new admin account. So, this proves that the admin account is very portable in directadmin system. You can see for the test purpose in the screenshot below I can delete the default admin and I have no admin account with 'root' creator where I used to believe that this account must exist for the system to work properly.
To change the password for admin, you need to use API or change through GUI. If you change via terminal you might have an issue with backup like this:
EDIT: Found the reason, go to 2nd post. Title changed =============== This is hard to understand what I did wrong, I tried to restore the admin backup (replacing the existing backup), and after I restored the backup I could not log in using the old admin password. The backup was restored...
That's indeed a good script to use.
But I thought I remember a script of not too long ago where @scriptkitty mentioned some other thing(s) wise to change if default admin is removed.
Maybe she can repeat that again. I could be mistaken.
and she mentioned some plugins (probably old ones) may use the /home/admin/ path and cause bugs. I haven't found any da official admin scripts inside the folder /usr/local/directadmin/scripts/ that use this path. So, this should be fine.
Also, the old scripts (probably 3rd party) or plugins that use /home/admin should be rewritten to use the admin path based on the newest command "/usr/local/directadmin/directadmin a" for portability. I think this is the reason why this feature is invented starting version 1.61.4+ to "unify" this admin location.