git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [patch] fixup GECOS handling

From
KHKyle Hayes <kyle@marchex.com>
Date
Apr 22, 2005, 17:43 UTC
Message-ID
<1114191830.31076.426.camel@axer.marchex.com>
In-Reply-To
<1114189105.29271.36.camel@nosferatu.lan>
On Fri, 2005-04-22 at 18:58 +0200, Martin Schlemmer wrote:
Show 14 quoted lines
> On Fri, 2005-04-22 at 09:16 -0700, Kyle Hayes wrote:
> > Suppose that the GECOS field is:
> > 
> > Hayes, Kyle; Room 42; 424-424-4242; foo bar baz...
> > 
> > You'll search for the first comma, find it, truncate my name to "Hayes",
> > and continue.
> > 
> > I have seen this kind of GECOS in larger environments where the
> > individual users are not the ones that administrate their machines.
> > Using the LastName, FirstName style of name is not rare. 
> > 
> 
> What OS?  With Linux at least, this is what chfn's manpage say:

Can't remember, it's been a while (years). We had AIX, Solaris, Linux and BSD machines at the time. Might have been AIX, I think. The memory of which OS is vague, but not the annoyance of finding the problem :-(

Show 10 quoted lines
> ----
>        The only restriction placed on the contents of the fields is that no control characters may  be  present,
>        nor  any  of  comma, colon, or equal sign. The other field does not have this restriction, and is used to
>        store accounting information used by other applications.
> ----
> 
> Meaning, if they use a ',' in one of the fields (and it is a linux
> system with the chfn most probably from the shadow package), then they
> are looking for trouble.  The only reason I added the ';' was because
> somebody said whatever OS used it instead of a ','.
>From the AIX version of chfn:

---- You can use any printable characters in the gecos information string except a : (colon), which is an attribute delimiter. ----

The AIX examples show use of semicolon as a separator.

So, at least on AIX, it is appears valid to use the style I showed above. I don't have access to Solaris machines right now. The BSD (FreeBSD 4.11) version of man 5 passwd:

---- The gecos field normally contains comma (`,') separated subfields as follows:... ----

Best, Kyle

-- 
Kyle Hayes <kyle@marchex.com>
Marchex Inc.
Previous: Martin SchlemmerNext: Andy Isaacson
Message 14 of 16 in “fixup GECOS handling”
  1. fixup GECOS handlingMartin Schlemmer, Apr 18, 2005
  2. David WoodhouseApr 18, 2005
  3. Martin SchlemmerApr 18, 2005
  4. fixup GECOS handlingMartin Schlemmer, Apr 22, 2005
  5. Kyle HayesApr 22, 2005
  6. Martin SchlemmerApr 22, 2005
  7. Petr BaudisApr 22, 2005
  8. Martin SchlemmerApr 22, 2005
  9. Kyle HayesApr 22, 2005
  10. Martin SchlemmerApr 22, 2005
  11. Kyle HayesApr 22, 2005
  12. Petr BaudisApr 23, 2005
  13. Martin SchlemmerApr 23, 2005
  14. Kyle HayesApr 22, 2005
  15. Andy IsaacsonApr 22, 2005
  16. Kyle HayesApr 25, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.