Bug#391717: [Adduser-devel] Bug#391717: gender in /etc/passwd

Robert Millan rmh at aybabtu.com
Sun Oct 8 14:52:00 UTC 2006

On Sun, Oct 08, 2006 at 01:24:33PM +0200, Marc Haber wrote:
> On Sun, Oct 08, 2006 at 12:13:31PM +0200, Robert Millan wrote:
> > Would it be possible to extend the 5th field of /etc/passwd to include gender
> > information?  This is very useful for localised programs in languages that
> > make gender distinction.  For example in Catalan, many sentences are constructed
> > differently when addressing a male than when addressing a female.
> > 
> > If you like the idea, I can send a patch for adduser.
> What do you intend to change in adduser? adduser does not use the
> gecos field itself, it only interfaces to the low-level tools, most
> often the tools from the shadow package.
> Also, be aware that there is a de facto standard for the contents of
> the GECOS field which - IIRC - does not have provisions for a gender
> field.

I'm not sure what's the best way to proceed (if I was, I'd already send a
patch).  I was hoping we could find a way to extend and/or abuse the GECOS
in a back-wards compatible manner.

Such "gender" field may have three values (male, female or undefined).  The
latter could mean we don't know, or we don't care.  Perhaps one of the fields
can be abused/extended to add this information (in which case this is an
adduser issue), or chfn could be modified to provide an additional field (in
which case this issue belongs to the shadow suite).

I think the latter is cleaner, but if the de-facto standard prevents this
change in a backward compatible manner, perhaps we should consider the former.
What do you think?

Robert Millan

My spam trap is honeypot at aybabtu.com.  Note: this address is only intended for
spam harvesters.  Writing to it will get you added to my black list.

More information about the Adduser-devel mailing list