[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Username length limit?



Daved Daly wrote:

On Thu, 03 Jun 2004 12:13:08 +0200, Roel Schroeven
<rschroev_nospam_ml@fastmail.fm> wrote:

Hi,

I'm trying to find out the maximum length of usernames on Linux systems
(Debian Woody specifically, but I guess it's the same between different
distros). Strangely enough, I can't find any clear answer to my question.

So I have two questions really:
- what is the maximum length of usernames (if any)?


8chars

It doesn't seem to be: I can create a user named abcdefghijkl without any problem.

adduser abcdefghijklmnopqrstuvwxyz doesn't work though: groupadd says it's not a valid group name (granted, group names are not user names). The groupadd man page however doesn't say anything about length limits. Neither does group(5), and passwd(5) doesn't say anything about limits for user names.

So, instead of finding out by trial-and-error, I'd like to know which piece(s) of the system define those limits (again, if any; apparently there is a limit for group names, I'm not sure about user names). I presume this must be documented somewhere.

- where can I find authoritative documentation of such things?


uh... uh... google? :P

I should have said I already tried that. Usually I can find anything I need, but not this time. I'm probably too stupid. All I can find are vague references, or mailing list/usenet postings with no clear answer.

I also didn't find anything in the Debian Reference.

So, is it true that the only documentation is the source code? But what source code should I look at? passwd, pam, glibc, ... ?

--
"Codito ergo sum"
Roel Schroeven



Reply to: