Max length for User-Name
Joe Friedeggs
friedeggs44 at hotmail.com
Fri Jan 27 16:26:14 CET 2017
Pertaining to User-Name, RFC2865 states in section 5.1:
0 1 2
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
| Type | Length | String ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Type
1 for User-Name.
Length
>= 3
String
The String field is one or more octets. The NAS may limit the
maximum length of the User-Name but the ability to handle at least
63 octets is recommended.
which recommends 'at least' 63 octets, but I see the sql (ver 2.2.6 with postgresql) set the limits the UserName to 'at most' 64 characters:
CREATE TABLE radcheck (
id SERIAL PRIMARY KEY,
UserName VARCHAR(64) NOT NULL DEFAULT '',
...
It seems to me the limiting factor of the User-Name here should only the 'length' field, which is one octet, therefore limiting the User-Name string to 255 charaters (minus overhead?). Why is the UserName in the table limited to 64 characters? What is the reasoning behind this? Is there some other limiting factor? I have a case where we need to use longer user names.
Thanks,
Joe
More information about the Freeradius-Users
mailing list