user name in /etc/passwd GCOS field

Paul S. R. Chisholm psc at lznv.ATT.COM
Thu Apr 14 04:54:32 AEST 1988


< If you lined all the news readers up end-to-end, they'd be easier to shoot. >

The fifth colon separated field in /etc/passwd is officially known as
the GCOS field, because it was "used only when communicating with that
system, and in other installations can contain any desired
information." [passwd(4)]  Given the relative growth of the GCOS and
UNIX(R) operating systems, the GCOS field has become a haven for all
sorts of things, including printer bin numbers, login name of direct
supervisor, department numbers/codes, and (somewhere among the rest of
this trash) a legible name for the user.  It's this last I'm interested
in.

My group is looking for a standard way that mail(1) can get a user's
name from a password file entry.  The proposed solution is to take
everything up to (but not including) the first left or right
parenthesis (or, of course, up the the terminating colon).  Some
members of another group in the area have suggested ending before the
first parenthesis, but stripping off everything before (and including)
a hyphen.  Either way, a system-wide parameter would control whether
mail would use this legible name.

How would either of these algorithms work for *your* password file?
Would they lose part of your name?  Would they still include junk?  If
one or the other was implemented, would you face a major effort to
bring your password file into line?

Since these (optional) changes are intended for the UNIX System V
Release 4 implementation of /bin/mail, I'd greatly appreciate your
comments.

-Paul S. R. Chisholm, {ihnp4,cbosgd,allegra,rutgers}!mtune!lznv!psc
AT&T Mail !psrchisholm, Internet psc at lznv.att.com
I'm not speaking for my employer, I'm just speaking my mind.



More information about the Comp.unix.questions mailing list