| Summary: | /usr/sbin/adduser does not allow '.' in login name. [PATCH] | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Jim.Pirzyk <Jim.Pirzyk> | ||||
| Component: | bin | Assignee: | Yar Tikhiy <yar> | ||||
| Status: | Closed FIXED | ||||||
| Severity: | Affects Only Me | ||||||
| Priority: | Normal | ||||||
| Version: | 4.4-RELEASE | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
Jim.Pirzyk
2001-10-04 21:50:01 UTC
Jim Pirzyk <Jim.Pirzyk@disney.com> wrote: > > - if ($name !~ /^[a-z0-9_][a-z0-9_\-]*$/ || $name eq "a-z0-9_-") { > + if ($name !~ /^[a-z0-9_][a-z0-9_\-\.]*$/ || $name eq "a-z0-9_-.") { > warn "Wrong username. " . > "Please use only lowercase characters or digits\a\n"; Pleaase make that warning: warn "Wrong username. " . "Please use lowercase characters, digits or '_' " . "as the starting character, and lowercase letters, " . "digits, '_', '-' or '.' in the rest of the username\a\n"; -giorgos Even better, please make it start with "Bad username" instead of "Wrong username". I don't see how the username can be ``wrong'' if I'm adding the user. Ceri Could you quote POSIX on the characters allowed in usernames? What characters are allowed? This question has to do with the fact that "adduser" and "pw" use inconsistent algorithms of validating a username, so I'd like to fix both. On Thursday 11 October 2001 08:11 am, Yar Tikhiy wrote: > Could you quote POSIX on the characters allowed in usernames? > What characters are allowed? This question has to do with the fact > that "adduser" and "pw" use inconsistent algorithms of validating a > username, > so I'd like to fix both. This is grom Garrett: From XBDd6 section 3.426 says: User Name A string that is used to identify a user; see also Section 3.424 (on page 90). To be portable across systems conforming to IEEE Std 1003.1-200x, the value is composed of characters from the portable filename character set. The hyphen should not be used as the first character of a portable user name. - JimP -- --- @(#) $Id: dot.signature,v 1.10 2001/05/17 23:38:49 Jim.Pirzyk Exp $ __o Jim.Pirzyk@disney.com ------------- pirzyk@freebsd.org _'\<,_ Senior Systems Engineer, Walt Disney Feature Animation (*)/ (*) Responsible Changed From-To: freebsd-bugs->yar I'll try do something about that. State Changed From-To: open->analyzed Allowing '.' in usernames may break compatibility with older systems, NIS or Kerberos. Therefore we'd rather not allow that by default. However, a patch optionally allowing any characters in usernames was committed to -current. On Wed, Jan 02, 2002 at 02:06:20PM -0800, Pirzyk, Jim wrote: > On Wednesday 02 January 2002 11:00 am, yar@FreeBSD.org wrote: > > Allowing '.' in usernames may break compatibility with > > older systems, NIS or Kerberos. Therefore we'd rather > > not allow that by default. > > However, a patch optionally allowing any characters in usernames > > was committed to -current. > > Huh?? Why are we allowing all characters? Seems that we It's *optional* and not enabled by default. > should allow the POSIX set of characters that are allowed, or > at least allow this to be configurable. Your point looks reasonable. What about the ``-posix'' option to adduser? -- Yar On Wednesday 02 January 2002 10:21 pm, Yar Tikhiy wrote: > On Wed, Jan 02, 2002 at 02:06:20PM -0800, Pirzyk, Jim wrote: > > On Wednesday 02 January 2002 11:00 am, yar@FreeBSD.org wrote: > > > Allowing '.' in usernames may break compatibility with > > > older systems, NIS or Kerberos. Therefore we'd rather > > > not allow that by default. > > > However, a patch optionally allowing any characters in usernames > > > was committed to -current. > > > > Huh?? Why are we allowing all characters? Seems that we > > It's *optional* and not enabled by default. > > > should allow the POSIX set of characters that are allowed, or > > at least allow this to be configurable. > > Your point looks reasonable. What about the ``-posix'' option to adduser? Sure sounds like a good idea. Thx - JimP -- --- @(#) $Id: dot.signature,v 1.10 2001/05/17 23:38:49 Jim.Pirzyk Exp $ __o Jim.Pirzyk@disney.com ------------------------------------- _'\<,_ Senior Systems Engineer, Walt Disney Feature Animation (*)/ (*) I've just committed to -current a new solution to this old problem: The regular expression to check usernames against is now configurable. Thus every admin who knows egrep(1) can customize it corresponding to his needs. -- Yar State Changed From-To: analyzed->closed The final solution committed to -current and -stable. Thanks! |