Allowing Dots in Usernames for Domain-Based Accounts

Hi team,

I noticed that in recent versions of HestiaCP, it is no longer possible to create usernames that include dots (.).

For example, when I try to use a domain name like lanjing.test.com as the username, I receive the following error:

Error: invalid user format :: lanjing.test.com

Previously, I used domain-style usernames (e.g. example.com) as a habit to help manage and identify accounts. I understand this may be related to system-level constraints or validation changes.

My questions are:
1. Is there any configuration or workaround to allow dots in usernames?
2. Will future versions of HestiaCP consider supporting dots in usernames again?

Thanks in advance for any help or clarification!

Best regards,
liu

Hi @imydou

Technically, it is possible to create those users, but it could cause issues with other tools, such as chown, which could lead to a security issue.

You can modify the is_user_format_valid function that Hestia uses to validate usernames in /usr/local/hestia/func/main.sh, but this introduces a security risk and you’ll have to reapply the change every time Hestia is updated.

My guess is that it won’t happen.

Instead of whatever.example.net, why don’t you use whatever-example-net or whatever_example_net?

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.