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

User discussion about Debian Development, Debian Project News and Announcements. Not for support questions.
Post Reply
Message
Author
sanal
Posts: 5
Joined: 2023-05-11 02:09
Has thanked: 1 time

[Discussion] Username characters restrictions in Debian

#1 Post by sanal »

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

Aki
Global Moderator
Global Moderator
Posts: 2823
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 69 times
Been thanked: 385 times

Re: [Discussion] Username characters restrictions in Debian

#2 Post by Aki »

Hello,
There's no package names shadow in Debian repository ? What is the package your are referring to ?
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Random_Troll
Posts: 444
Joined: 2023-02-07 13:35
Been thanked: 105 times

Re: [Discussion] Username characters restrictions in Debian

#3 Post by Random_Troll »

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.


User avatar
fabien
Forum Helper
Forum Helper
Posts: 621
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 60 times
Been thanked: 146 times

Re: [Discussion] Username characters restrictions in Debian

#5 Post by fabien »

sanal wrote: 2023-05-24 10:43What is the reasoning for allowing non-POSIX characters in username?
See /usr/share/doc/passwd/changelog.Debian.gz
shadow (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
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=79682

User avatar
kent_dorfman766
Posts: 535
Joined: 2022-12-16 06:34
Location: socialist states of america
Has thanked: 57 times
Been thanked: 70 times

Re: [Discussion] Username characters restrictions in Debian

#6 Post by kent_dorfman766 »

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!

Aki
Global Moderator
Global Moderator
Posts: 2823
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 69 times
Been thanked: 385 times

Re: [Discussion] Username characters restrictions in Debian

#7 Post by Aki »

@sanal
Yes, of course. I was searching for a binary package :wink:
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

sanal
Posts: 5
Joined: 2023-05-11 02:09
Has thanked: 1 time

Re: [Discussion] Username characters restrictions in Debian

#8 Post by sanal »

fabien wrote: 2023-05-24 16:00
sanal wrote: 2023-05-24 10:43What is the reasoning for allowing non-POSIX characters in username?
See /usr/share/doc/passwd/changelog.Debian.gz
shadow (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
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=79682
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.

Post Reply