From nobody@FreeBSD.org  Wed Apr 22 19:03:35 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7885A106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Apr 2009 19:03:35 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 669498FC15
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Apr 2009 19:03:35 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n3MJ3Y7D080582
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 22 Apr 2009 19:03:34 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n3MJ3Y1P080581;
	Wed, 22 Apr 2009 19:03:34 GMT
	(envelope-from nobody)
Message-Id: <200904221903.n3MJ3Y1P080581@www.freebsd.org>
Date: Wed, 22 Apr 2009 19:03:34 GMT
From: Chris Dillon <cdillon@wolves.k12.mo.us>
To: freebsd-gnats-submit@FreeBSD.org
Subject: MAXLOGNAME, the username length limit, is too small
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         133926
>Category:       kern
>Synopsis:       [request] MAXLOGNAME, the username length limit, is too small
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bapt
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 22 19:10:00 UTC 2009
>Closed-Date:    Wed Nov 14 14:09:54 UTC 2012
>Last-Modified:  Wed Nov 14 14:09:54 UTC 2012
>Originator:     Chris Dillon
>Release:        6.4-STABLE, 7.1-STABLE
>Organization:
>Environment:
>Description:
The current 16-character username limit is too short in some situations.  "firstname.lastname" style usernames can easily exceed 16 characters.  In virtual-domain systems you may want local users with names such as "user_domain.com" which can also easily exceed 16 characters.  When using Samba with Winbind and nsswitch to integrate Active Directory users into FreeBSD, the AD domain prepended to the AD username in the format of "DOMAIN.username" will often exceed 16 characters.

>How-To-Repeat:
Try to create or use a 16-character username.

>Fix:
I have been locally patching my own systems to increase MAXLOGNAME in param.h to 33 and UT_NAMESIZE in utmp.h to 32 for over 5 years and have not run into any issues regarding very long usernames.

I propose that the limit be increased to 32 or 64 characters for FreeBSD 8.0 to allow FreeBSD to be used out-of-the-box in the situations I listed in the Description.  If changing the default is not possible, we could consider a make.conf variable or something similar to make it easy for a user to re-compile the system with a larger username length limit.

As for compatibility with username length limits on other unix systems, my Google searches have hinted that there are systems which still have 8-character limits, some with 16 character limits, and others with 32 character limits, which is the highest I could find without digging too deeply.  Since we have been at 16 characters since FreeBSD 3, we broke the archaic 8 character compatibility limit a long time ago, so I doubt that defaulting our limit to 32 or 64 is going to break anything any more than it already is.


>Release-Note:
>Audit-Trail:
Date: Wed, 12 Aug 2009 16:39:20 +0300
From: "Oleksii Gnatkevych" <Oleksii.Gnatkevych@globallogic.com>
To: <bug-followup@FreeBSD.org>,
	<cdillon@wolves.k12.mo.us>
Subject: Re: kern/133926: [request] MAXLOGNAME, the username length limit, is too small
 
 This is a multi-part message in MIME format.
 
 ------_=_NextPart_001_01CA1B52.4C337DD9
 Content-Type: text/plain; charset="us-ascii"
 Content-Transfer-Encoding: quoted-printable
 
 I consider this request critical and high priority. Forget about NIS
 with it's 8-bytes usernames, see the future.
 
 PS. This should have been fixed very long time ago.
 
 =20
 
 =20
 
 ------_=_NextPart_001_01CA1B52.4C337DD9--

From: Ed Schouten <ed@80386.nl>
To: bug-followup@FreeBSD.org, cdillon@wolves.k12.mo.us
Cc:  
Subject: Re: kern/133926: [request] MAXLOGNAME, the username length limit,
 is too small
Date: Sat, 10 Oct 2009 22:09:03 +0200

 --E50aLcSU4JxQSj/B
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 So basically this means _all_ utmp structure fields are too small.
 
 - UT_HOSTSIZE is too small to even fit an IPv6 address.
 - UT_LINESIZE is too small to store pts/1000.
 
 --=20
  Ed Schouten <ed@80386.nl>
  WWW: http://80386.nl/
 
 --E50aLcSU4JxQSj/B
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.10 (FreeBSD)
 
 iEYEARECAAYFAkrQ6d8ACgkQ52SDGA2eCwVkAQCcC7jKDBXgQlzjgEPnTfEyMszH
 ZYIAniWpiDUF3ZasgPC7aE3ft+csEZbf
 =BFCG
 -----END PGP SIGNATURE-----
 
 --E50aLcSU4JxQSj/B--

From: Chris Rees <utisoft@gmail.com>
To: bug-followup@freebsd.org, Ed Schouten <ed@80386.nl>, cdillon@wolves.k12.mo.us
Cc:  
Subject: Re: kern/133926: [request] MAXLOGNAME, the username length limit, is
 too small
Date: Tue, 26 Jul 2011 15:56:02 +0100

 Hm... utmp.
 
 Ed, does utmpx perhaps solve this problem?
 
 Chris
 
 --=20
 Chris Rees =A0 =A0 =A0 =A0 =A0| FreeBSD Developer
 crees@FreeBSD.org =A0 | http://people.freebsd.org/~crees

From: Ed Schouten <ed@80386.nl>
To: Chris Rees <utisoft@gmail.com>
Cc: bug-followup@freebsd.org, cdillon@wolves.k12.mo.us
Subject: Re: kern/133926: [request] MAXLOGNAME, the username length limit, is
 too small
Date: Tue, 26 Jul 2011 21:16:51 +0200

 --qa1NXTiqN6KSzHv0
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Hi Chris,
 
 * Chris Rees <utisoft@gmail.com>, 20110726 16:56:
 > Ed, does utmpx perhaps solve this problem?
 
 For the user accounting database part it does, since ut_user has size
 32, but there may be other parts of the system which may depend on
 MAXLOGNAME.
 
 --=20
  Ed Schouten <ed@80386.nl>
  WWW: http://80386.nl/
 
 --qa1NXTiqN6KSzHv0
 Content-Type: application/pgp-signature
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.17 (FreeBSD)
 
 iQIcBAEBAgAGBQJOLxKjAAoJEG5e2P40kaK7pH4QAJ1lnaxGbVA+zIk+2GvLk088
 eZnPTmdfCqZynSpDccm0W34QR35+UYUdxzXZ3FRiD1RQzP2MRCTTQJOlzl2EgOSs
 dVuAg7KgAeD8YxJ591lodaxX0FiZ5ojJOeHJctTDAdoyIbBVAMXoIrLgjj0yOs1V
 6pOoszt1Oilx35ooM4TzYtYMnbmxt5hKuy4jqS4AdfDWr7sDI3/4gckGYVqlVKu6
 hVPNFlg2JD4B1dr21gegO4erVGU+d4AZlv8cFd8d3oIICFk64ZVdWTgsFvYs1VK1
 1Law3IZYrkuoQV2CBB7I0ZF0EQCHqWkwHEGEbtlLtE9VnwWY+p95htDucWSv9C5Q
 0tvGqn29gdbsxlamQ6y6sCWKavNa9L1DwKyphfb4s3OhIVz3tpodmmAq4+KyG/x6
 70hPPMM0tQsTztDKL+jsYkwGDIe2CwP3/pulJHd/gnLHYqZg0d4QeTZfNuxcbBsq
 M47GWsQmkii3BTcBuNuakVeMdmpSooGaty0ErP2fK+aG2COQYTlywWLWofDV7/ub
 XIetiW1YvshaqpjJnlNrQeLp49esJh5DwwTVkaJApWblaNudNXUk6ubNBaZ91QVB
 lLPdQyXgGUdJIXMSerVZ0j6dOcOm/MaKi10/DbtQHo6E6PlwpMfFxd9X7c61OWBZ
 zhikvEdbXZopxW3KayFK
 =SHpH
 -----END PGP SIGNATURE-----
 
 --qa1NXTiqN6KSzHv0--
State-Changed-From-To: open->suspended 
State-Changed-By: eadler 
State-Changed-When: Tue Nov 15 01:50:20 UTC 2011 
State-Changed-Why:  
kern/161091 has a patch 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133926 
State-Changed-From-To: suspended->closed 
State-Changed-By: bapt 
State-Changed-When: Wed Nov 14 10:59:11 UTC 2012 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133926 
State-Changed-From-To: closed->patched 
State-Changed-By: eadler 
State-Changed-When: Wed Nov 14 13:58:49 UTC 2012 
State-Changed-Why:  
committed in r243023 but not MFCed 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133926 
Responsible-Changed-From-To: freebsd-bugs->bapt 
Responsible-Changed-By: eadler 
Responsible-Changed-When: Wed Nov 14 13:59:05 UTC 2012 
Responsible-Changed-Why:  
over to committer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133926 
State-Changed-From-To: patched->closed 
State-Changed-By: bapt 
State-Changed-When: Wed Nov 14 14:09:54 UTC 2012 
State-Changed-Why:  
This change won't be mfced, so this PR can stay close 

http://www.freebsd.org/cgi/query-pr.cgi?pr=133926 
>Unformatted:
