From owner-freebsd-questions Tue Apr 6 14:50:25 1999 Delivered-To: freebsd-questions@freebsd.org Received: from sucuri.amazon.com.br (sucuri.amazon.com.br [200.241.240.1]) by hub.freebsd.org (Postfix) with ESMTP id 5130515361 for ; Tue, 6 Apr 1999 14:50:01 -0700 (PDT) (envelope-from aldrin@americasnet.com) Received: from athome.logicStudios.org (root@pm3-s24.amazon.com.br [200.242.245.57]) by sucuri.amazon.com.br (8.9.3/8.9.3) with ESMTP id SAA16127; Tue, 6 Apr 1999 18:47:59 -0300 Received: from athome.logicStudios.org (aldrin@athome.logicStudios.org [10.0.0.1]) by athome.logicStudios.org (8.8.8/8.8.8) with ESMTP id SAA01147; Tue, 6 Apr 1999 18:56:39 -0300 (EST) (envelope-from aldrin@americasnet.com) Date: Tue, 6 Apr 1999 18:56:39 -0300 (EST) From: Aldrin L X-Sender: aldrin@athome.logicStudios.org To: "Paul D. Schmidt" Cc: freebsd-questions@FreeBSD.ORG Subject: Re: /etc/passwd limits In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 6 Apr 1999, Paul D. Schmidt wrote: > How do I find out the max length of the password, full name, etc fields on > a FreeBSD system? I think there are none for gecos (full name) and userid. A reading on /usr/include/pwd.h reveals nothing about it. Hm... lemme grab a posix book. Yeah, none. I think it happens because getpwnam(3) is mostly libc dependent. Passwords should have a limit of 32 chars, as far as i know. I can't remember where i read about it. Uh, i remember: MD5 hashes are 128 bits (16 bytes) long. An armored one would take 256 bits (32 bytes) of string length. Here's your magic number. The shell and $HOME field should be dependent on the size of FILENAME_MAX, defined under stdio.h. This means, 1024 bytes. i hope that helps. done, Aldrin Leal To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message