new account setup needs to parse GCOS/GECOS field



MailNews: Account Configuration
18 years ago
14 years ago


(Reporter: Jeremy M. Dolan, Assigned: Alec Flett)


({polish, pp})

polish, pp

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [rtm-])


(2 attachments)



18 years ago
On unix systems, account entries often use a simple comma-delimited format
called 'GECOS' or 'GCOS' in the comment field, to store more data then just real
name. (phone, extention, etc).  Currently, when you set up a new account, it
takes the whole comment field as the default realname. What we really want is
everything before the first comma. May also be an desirable for Mac OSX port.

Comment 1

18 years ago
add sspitzer to CC, this is the auto-fillin of the user's full name.

One situation I'm concerned about is non-GCOS systems that have entered people's 
full names as "Lastname, First" - is there a way to work around that or somehow 
know that this is or isn't a "GCOS" system?
Where can I read about GCOS? Is this stored in the passwd file?

Comment 2

18 years ago
"Lastname, First" entries in that field are very wrong. many other applications
attempt to check for comma delimited text there. For the very few systems that
have 'last, first', for some reason, having just their last name is better then
having all of the other information.
(ie, 'Smith' is better then 'Smith, John,107,555-5555,416-9826')

If an application were to want "last, first", it would need to switch them

Note that on a Slackware Linux 7.0, new accounts are created by default with
the GECOS field set to "real name,,,". This is also what 'chfn' will set the
field to, if the user doesn't specify entries for the room number/phone prompts.

someone should investigate on solaris, as well...i would assume GECOS is pretty
standard there, too.


18 years ago
Target Milestone: --- → M18

Comment 3

18 years ago
moving to future milestone.
Target Milestone: M18 → Future

Comment 4

18 years ago
Some systems allow an ampersand in the GCOS field, which represents the
username, capitalized.

For example:
andrew::500:500:& Taylor:/home/andrew:/bin/bash
Here the GCOS should be expanded to Andrew Taylor.

This is documented in passwd(4) on Solaris.

Comment 5

18 years ago
Created attachment 12621 [details] [diff] [review]
Patch to truncate gcos field at first comma and replace ampersand with capitalized username

Comment 6

18 years ago
patch looks good, except you can use nsCAutoString to avoid all the conversions 
back and forth between unicode and ASCII

Comment 7

18 years ago
Created attachment 12629 [details] [diff] [review]
Same as first patch, but without the needless unicode conversion

Comment 8

18 years ago
*** Bug 55123 has been marked as a duplicate of this bug. ***

Comment 9

18 years ago
oh, cool. i couldn't remember "gecos" as the magic name for unix user info. good
to see there's a fix in hand, too... adding keywords, cc. i'll review the patch
tomorrow if possible.
Keywords: polish, pp, rtm

Comment 10

18 years ago
marking rtm-. Not common enough to get into rtm and the user always has the
ability to edit what we autofill if they are in this situation.
Whiteboard: [rtm-]

Comment 11

18 years ago
we should check this into the tip when someone gets a chance.

Comment 12

18 years ago
just a responce to 'not common enough'...

just checked all the passwd files i have access to, a good 75% of user accounts
on linux and solaris machines have gcos fields in them. thats fairly common, by
my definition.

Comment 13

18 years ago
well, I just checked all the unix systems I have access to, and none of them
used this system, so according to my sample space, this system doesn't exist :)

I'll check the patch into the tip so it makes it for mozilla 1.0, but netscape
is not taking this on their branch.

Comment 14

18 years ago
add seth for review, I'll be super-reviewer, then this will go into the trunk

Comment 15

18 years ago
massive reassign of account manager bugs -> sspitzer
please feel free to put me back on the CC if you have any questions/comments
Assignee: alecf → sspitzer

Comment 16

18 years ago
adding myself back to this bug so I can checkin when I get a review from seth.
the patch looks good, but can you correct / add comments to explain what these
additional code does?

once we do that, r=sspitzer
I forgot to add:

"sorry for the delay on this.  I've been focusing on RTM bugs."

Comment 19

18 years ago
ok, back to me, marking fixed. thanks seth.
Assignee: sspitzer → alecf

Comment 20

18 years ago
fix now in, marking fixed.
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 21

18 years ago
no way this could get into rtm? seems like low-risk/very-high-profile to me...
am i deluding myself?
deluded big time.  especially since the work around is to go and edit the text
field when it comes up.
*** Bug 61141 has been marked as a duplicate of this bug. ***

Comment 24

16 years ago
changing qa 
QA Contact: lchiang → esther
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.