What are allowed characters for password in DirectAdmin?

smhnaji

Verified User
Joined
Mar 28, 2013
Messages
24
Please let me know the allowed characters that can be used in passwords of DirectAdmin control panel.

I couldn't use Uc7+?Ty$ as password and I got the following error:

Invalid Password

Thank you
 
Thank you @zEitEr, but I'm not using any interfaces.

I'm using DirectAdmin API to create accounts.

Currently I generate passwords using a mixture of the following sets:

PHP:
$sets = array();
$sets[] = 'abcdefghjkmnpqrstuvwxyz';
$sets[] = 'ABCDEFGHJKMNPQRSTUVWXYZ';
$sets[] = '23456789';
$sets[] = '!@#$%^&*()_+-=?';

Please tell me what characters should be excluded from the last $sets array?

Thnak you
 
I'm not sure how it works internally and whether or not Directadmin allows special chars without setting special_characters_in_random_passwords to 1 in directadmin.conf. So even if you use API DirectAdmin might or not require that option enabled in its configs. That's up to you to check it.

Basically, all ascii characters from 33 till 126 inclusive, but not 47 or 92 (forward and backwards slashes) are allowed with special_characters_in_random_passwords=1

Your sets look fine (unless I overlooked anything), but you may double-check your chars with this table http://www.asciitable.com/

http://www.directadmin.com/features.php?id=1625
 
Thank you again for your clear answer.

I will check that.

Great appreciates for your help :)
 
What if special characters are not enabled? In that case we can only use a-zA-Z0-9 ?

That's not currently activated in my server.
 
I've just tested on my server with

special_characters_in_random_passwords=0

I've changed a password for a user account to Az0!@#$%^&*()_+-=?

So whether or not the option is enabled directadmin is accepting specialchars in passwords. So the issue is most likely is related to how you use API and send password to DirectAdmin.

For debugging purposes you can run directamin in debug mode in see what might be wrong there.

And check your password to meet the requirements mentioned in http://www.directadmin.com/features.php?id=910
 
Last edited:
I don't know why, but when I removed + from the password, it created the account without any problem.

For the sake of peace, I also removed ? that I doubted to.

So my last set of special characters are now:

PHP:
$sets[] = '!@#$%^*()_-=';

If I saw any other problem with my current set of special chars, I'll let you know :)

I should again mention that I'm using those chars in password in API mode.

Thnak you
 
Back
Top