Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Aug 1997 09:37:32 -0500
From:      john@dexter.starfire.mn.org (John Lind)
To:        questions@freebsd.org
Subject:   login name limits
Message-ID:  <Mutt.19970819093732.john@dexter.starfire.mn.org>

next in thread | raw e-mail | index | archive | help
OK, I'm a little confused here.  The kernel sys param for maximum
login name length (MAXLOGNAME) is 12, even though the utmp/wtmp
structure element for that (UT_NAMESIZE) is limited to 12.  I don't
have a problem with that...  If you need to use long names, you have
to realize that they will be truncated 8 characters.  Perhaps not
what one would want in an ideal world, but hey, we live with compromises
every day.  vipw, and the getpw functions, and su all get along fine
with longer login names.  My problem is this:  login (from FreeBSD
2.1.0 through 2.2.2 -- the widest range I had conveniently available
to me) explicitly truncates the the login name to UT_NAMESIZE before
authenticating (*EVEN THOUGH* the size is taken into account where
the utmp/wtmp structures are filled), making it impossible to directly
log in as a user with a login longer than 8 characters (e.g. "hostmaster").

I changed our 2.2.2 system login program to truncate at MAXLOGNAME
instead, and so far, all is well.  If no-one knows of a reason not
to do this, I'll try to submit a diff to someone...

		 John Lind, Starfire Consulting Services
E-mail: john@starfire.MN.ORG	    USnail: PO Box 17247, Mpls MN  55417



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Mutt.19970819093732.john>