Skip to content

Allow '@' signs in user names #1065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 29, 2025
Merged

Allow '@' signs in user names #1065

merged 9 commits into from
Apr 29, 2025

Conversation

squell
Copy link
Member

@squell squell commented Apr 3, 2025

Closing #1064

@3v1n0
Copy link
Contributor

3v1n0 commented Apr 3, 2025

I think we should be a bit more conform to what adduser (see man adduser.conf) allows here:

VALID NAMES
       Historically, adduser(8) and addgroup(8) enforced conformity to IEEE Std 1003.1-2001, which allows only the following characters to ap‐
       pear in group- and usernames: letters, digits, underscores, periods, at signs (@) and dashes.  The name may not start with a dash or @.
       The "$" sign is allowed at the end of usernames to allow typical Samba machine accounts.

       The  default settings for NAME_REGEX and SYS_NAME_REGEX allow usernames to contain lowercase letters and numbers, plus dash (-) and un‐
       derscore (_); the name must begin with a letter (or an underscore for system users).

       The least restrictive policy, available by using the --allow-all-names option, simply makes the same checks as useradd(8): cannot start
       with a dash, plus sign, or tilde; and cannot contain a colon, comma, slash, or whitespace.

       This option can be used to create confusing or misleading names; use it with caution.

       Please note that regardless of the regular expressions used to evaluate the username, it may be a maximum of 32 bytes; this may be less
       than 32 visual characters when using Unicode glyphs in the username.

@squell squell force-pushed the fix-active-directory branch 2 times, most recently from 2b525d4 to ecf5d95 Compare April 3, 2025 22:12
@squell
Copy link
Member Author

squell commented Apr 8, 2025

Todo: add unit tests, add comment about $ being last.

@squell squell force-pushed the fix-active-directory branch from 9c139d7 to 17e2674 Compare April 28, 2025 22:29
@squell squell marked this pull request as ready for review April 28, 2025 22:29
@squell squell added the C-parser Parser/AST label Apr 28, 2025
@squell squell enabled auto-merge April 29, 2025 15:16
@squell squell force-pushed the fix-active-directory branch from 82c741f to 918fb46 Compare April 29, 2025 15:18
@squell squell force-pushed the fix-active-directory branch from 918fb46 to d90ed00 Compare April 29, 2025 15:57
@squell squell disabled auto-merge April 29, 2025 16:11
@squell squell merged commit 1a675f2 into main Apr 29, 2025
15 checks passed
@squell squell deleted the fix-active-directory branch April 29, 2025 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-parser Parser/AST
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants