Even though POSIX recommendation of username characters are very limited, Debian allows most of the characters (except few) in username with a patch in shadow package.
What is the reasoning for allowing non-POSIX characters in username? Asking this to understand the impact, if we remove the Debian patch in shadow package.
Thanks,
-Sanal
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
[Discussion] Username characters restrictions in Debian
-
- Global Moderator
- Posts: 2955
- Joined: 2014-07-20 18:12
- Location: Europe
- Has thanked: 73 times
- Been thanked: 403 times
Re: [Discussion] Username characters restrictions in Debian
Hello,
There's no package names shadow in Debian repository ? What is the package your are referring to ?
There's no package names shadow in Debian repository ? What is the package your are referring to ?
-
- Posts: 444
- Joined: 2023-02-07 13:35
- Been thanked: 105 times
Re: [Discussion] Username characters restrictions in Debian
https://systemd.io/USER_NAMES/ explain the various limitations for the current release. Note that Debian is actually more restrictive than POSIX, not less.
Jeder nach seinen Fähigkeiten, jedem nach seinen Bedürfnissen.
- fabien
- Forum Helper
- Posts: 672
- Joined: 2019-12-03 12:51
- Location: Anarres (Toulouse, France actually)
- Has thanked: 61 times
- Been thanked: 157 times
Re: [Discussion] Username characters restrictions in Debian
See /usr/share/doc/passwd/changelog.Debian.gz
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=79682shadow (1:4.0.3-9) unstable; urgency=low
[...]
* I can't come up with a good justification as to why characters other
than ':'s and '\0's should be disallowed in group and usernames (other
than '-' as the leading character). Thus, the maintenance tools don't
anymore. closes: #79682, #166798, #171179
[...]
-- Karl Ramm <kcr@debian.org> Wed, 20 Aug 2003 02:06:50 -0400
- kent_dorfman766
- Posts: 540
- Joined: 2022-12-16 06:34
- Location: socialist states of america
- Has thanked: 59 times
- Been thanked: 70 times
Re: [Discussion] Username characters restrictions in Debian
I liken the question to "how far can I push the envelope" with things that mature professionals intuitively know that you should not do.
Cannot tell you how often I get into arguments at companies where they push back when I request they use a file naming convention that fits in 7bit ascii, no spaces, dashes, or special characters, and the inference of a space should be an undersore, or the case where folks won't use ISO most-to-least specific date/time formats such as yyyymmdd-hhmmss so items can be sorted properly.
keep your user names as lower latin char letters and numbers using the following RE: [a-z][a-z0-9]{0,15}
Always use the most portable least common denominator!
Cannot tell you how often I get into arguments at companies where they push back when I request they use a file naming convention that fits in 7bit ascii, no spaces, dashes, or special characters, and the inference of a space should be an undersore, or the case where folks won't use ISO most-to-least specific date/time formats such as yyyymmdd-hhmmss so items can be sorted properly.
keep your user names as lower latin char letters and numbers using the following RE: [a-z][a-z0-9]{0,15}
Always use the most portable least common denominator!
-
- Global Moderator
- Posts: 2955
- Joined: 2014-07-20 18:12
- Location: Europe
- Has thanked: 73 times
- Been thanked: 403 times
Re: [Discussion] Username characters restrictions in Debian
@sanal
Yes, of course. I was searching for a binary package :wink:
Re: [Discussion] Username characters restrictions in Debian
As shell interprets few special characters (/, `, ;, etc) of username different way, think we need to relook at this patch to add the restrictions at least for few special characters in username.fabien wrote: ↑2023-05-24 16:00See /usr/share/doc/passwd/changelog.Debian.gzhttps://bugs.debian.org/cgi-bin/bugreport.cgi?bug=79682shadow (1:4.0.3-9) unstable; urgency=low
[...]
* I can't come up with a good justification as to why characters other
than ':'s and '\0's should be disallowed in group and usernames (other
than '-' as the leading character). Thus, the maintenance tools don't
anymore. closes: #79682, #166798, #171179
[...]
-- Karl Ramm <kcr@debian.org> Wed, 20 Aug 2003 02:06:50 -0400