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
[Discussion] Username characters restrictions in Debian
-
- Global Moderator
- Posts: 985
- Joined: 2014-07-20 18:12
- Location: Europe
- Has thanked: 15 times
- Been thanked: 130 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: 84
- Joined: 2023-02-07 13:35
- Been thanked: 22 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.
- fabien
- Posts: 241
- Joined: 2019-12-03 12:51
- Location: Toulouse, France
- Has thanked: 18 times
- Been thanked: 50 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: 434
- Joined: 2022-12-16 06:34
- Location: socialist states of america
- Has thanked: 34 times
- Been thanked: 53 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: 985
- Joined: 2014-07-20 18:12
- Location: Europe
- Has thanked: 15 times
- Been thanked: 130 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