[GH-ISSUE #1820] Allow Usernames With Spaces #3076

Closed
opened 2026-03-14 06:29:34 +03:00 by kerem · 5 comments
Owner

Originally created by @LPJon on GitHub (Mar 30, 2024).
Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/1820

Is your feature request related to a problem? Please describe.
The latest update which syncs meshcentral does not support usernames that are not email addresses.

Describe the solution you'd like
Support for both email address usernames and non email address usernames. Such as "John Doe" and "Jon.Doe@corporate.com"

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
We do not always use email addresses as usernames because a compromised email address could be used to attempt access to the UI with guessing known email addresses.

Originally created by @LPJon on GitHub (Mar 30, 2024). Original GitHub issue: https://github.com/amidaware/tacticalrmm/issues/1820 **Is your feature request related to a problem? Please describe.** The latest update which syncs meshcentral does not support usernames that are not email addresses. **Describe the solution you'd like** Support for both email address usernames and non email address usernames. Such as "John Doe" and "Jon.Doe@corporate.com" **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. **Additional context** We do not always use email addresses as usernames because a compromised email address could be used to attempt access to the UI with guessing known email addresses.
kerem closed this issue 2026-03-14 06:29:40 +03:00
Author
Owner

@LPJon commented on GitHub (Mar 30, 2024):

It looks Like it just doesn't support spaces. Could support for just that be added?

<!-- gh-comment-id:2028265261 --> @LPJon commented on GitHub (Mar 30, 2024): It looks Like it just doesn't support spaces. Could support for just that be added?
Author
Owner

@wh1te909 commented on GitHub (Mar 30, 2024):

just pushed a fix for this, please run the following 2 commands to test it out and then toggle the sync off/on from global settings > meshcentral in the web UI, and it should work:

wget -O /rmm/api/tacticalrmm/accounts/models.py https://raw.githubusercontent.com/amidaware/tacticalrmm/develop/api/tacticalrmm/accounts/models.py

sudo systemctl restart rmm celery celerybeat
<!-- gh-comment-id:2028481016 --> @wh1te909 commented on GitHub (Mar 30, 2024): just pushed a fix for this, please run the following 2 commands to test it out and then toggle the sync off/on from global settings > meshcentral in the web UI, and it should work: ```bash wget -O /rmm/api/tacticalrmm/accounts/models.py https://raw.githubusercontent.com/amidaware/tacticalrmm/develop/api/tacticalrmm/accounts/models.py sudo systemctl restart rmm celery celerybeat ```
Author
Owner

@LPJon commented on GitHub (Apr 5, 2024):

@wh1te909 Sorry this took so long to get back to. The issue still exists as pictured below. I also reboot the TacticalRMM server just to be sure all necessary services restarted on top of your instructions above.

Untitled

Just so I know I was clear. The username area I need is under Settings->User Administrator->->Username Field
The picture shows what I want to be able to do and it also shows the error I'm getting in the UI at the top.

<!-- gh-comment-id:2039573794 --> @LPJon commented on GitHub (Apr 5, 2024): @wh1te909 Sorry this took so long to get back to. The issue still exists as pictured below. I also reboot the TacticalRMM server just to be sure all necessary services restarted on top of your instructions above. ![Untitled](https://github.com/amidaware/tacticalrmm/assets/46533576/8167728d-aadf-45f6-bd53-637325c16f25) Just so I know I was clear. The username area I need is under Settings->User Administrator-><Selected User>->Username Field The picture shows what I want to be able to do and it also shows the error I'm getting in the UI at the top.
Author
Owner

@wh1te909 commented on GitHub (Apr 5, 2024):

Ah I see, yea usernames with spaces are not allowed, that the policy of the web framework we use (Django) you can see the code for that here. If Django doesn't allow it there must be a good reason and I trust them on that.

<!-- gh-comment-id:2040319489 --> @wh1te909 commented on GitHub (Apr 5, 2024): Ah I see, yea usernames with spaces are not allowed, that the policy of the web framework we use (Django) you can see the code for that [here](https://github.com/django/django/blob/4d2ef9bb826db76acb5ed7609a9162de9b651921/django/contrib/auth/validators.py#L22). If Django doesn't allow it there must be a good reason and I trust them on that.
Author
Owner

@LPJon commented on GitHub (Apr 6, 2024):

@wh1te909 Here is one that is strange for ya. Your install script uses manage.py to setup the first user on installation with line 568: python manage.py createsuperuser --username ${djangousername} --email ${letsemail}. When setting up the user here, you are allowed to use names with spaces just as requested above. That method works, so is there a command line option which I could change or setup a user name with?

<!-- gh-comment-id:2041106582 --> @LPJon commented on GitHub (Apr 6, 2024): @wh1te909 Here is one that is strange for ya. Your install script uses `manage.py` to setup the first user on installation with line 568: `python manage.py createsuperuser --username ${djangousername} --email ${letsemail}`. When setting up the user here, you are allowed to use names with spaces just as requested above. That method works, so is there a command line option which I could change or setup a user name with?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/tacticalrmm#3076
No description provided.