
If you get “XYZ is not a valid username” error when you restore an account in Directadmin Panel, the solution is very simple. You need the increase of max_username_length parameter’s value in the directadmin.conf file.
This problem can show up when migrating accounts from one server to another one.
To solve this problem, just follow the steps;
- Connect to SSH with your root credentials.
- Run this command to edit the related file.
nano /usr/local/directadmin/conf/directadmin.conf
- Then increase username length up to 20, 30 or so on.
max_username_length=20
- You should then restart the DirectAdmin service.
service directadmin restart
You can continue to restore accounts after applying this solution.