[NBLUG/talk] Hostname, username lengths

ME dugan at passwall.com
Wed May 14 19:44:01 PDT 2003


Even when you can have a username with more t han 8 characters, you will
probably want to stick with 8 characters for a username or less. This
makes interactions with other *NIX systems "work" without username
translations between hosts with things like NFS.

"Old" *nix systems had a limit of 8 characters (max) per username while
"newer" *nix systems allow for longer lengths (32 chars?). I am not sure
if more than 32 chars are possible, and some applications may not like
usernames that are longer than 8 chars, but still less than 33.

As for lengths of hostnames...
It depends.

Generally speaking, you want shorter hostname. They are easier to type in,
and less to type. With that having been said, you can have very long
hostnames when you just use local lookups with /etc/hosts for each entry.

However, if you want to serve a hostname on the Internet, then you must
take into consideration the "rules" on hostname length (including domain
name with the "FQDN" (Fully Qualified Domain Name.)

When working in the IPV4 realm of TCP/IP, I think you are limited to 63
bytes for the length of a FQDN. So, if your host is at mit.edu, you need
to include "mit.ed" in your computation for the length of your hostname
and deduct the characters in your domain name from the max of 63 for your
total FQDN. (rfc882 but has been "obseleted")

Later RFC permit longer ones, but for backwards compatability, keeping an
internet name to less than 64 chars is probably a good idea. (rfc1035
permits 253 characters and obseleted 882)

A newer DNS RFC for IPV6 may permit longer host names, but backwards
compatability is a nice thing.

For sanity, and backwards compatability, 63 chars or less is good for
FQDN. However, if you want to know the max allowed (without respect to
backwards capatability) then 253 chars for a FQDN. If instead, you want to
do local test, I dont know what limits exist when using your local
/etc/hosts file. .

> Anybody know what the maximum length is for a Linux hostname? I
> know that some Un*xen barf (or at least some of their tools barf)
> if it's over 8 characters, but I've heard tell that Linux can
> handle longer names. True?
>
> What about usernames?
>
> A.
> _______________________________________________
> talk mailing list
> talk at nblug.org
> http://nblug.org/mailman/listinfo/talk
>
>




More information about the talk mailing list