Comment 8 for bug 484238

Revision history for this message
Tony Shadwick (numbski+bugs-launchpad-net) wrote :

Sorry for spamming this bug, but I'm really confused now:

http://bugs.debian.org/154269

That's the debian guys saying it's a feature not a bug. It allows "other features of the GECOS field". What "other features"?

Meanwhile, in the perl docs we have this:

http://perldoc.perl.org/User/pwent.html

"Interpretation of the gecos field varies between systems, but traditionally holds 4 comma-separated fields containing the user's full name, office location, work phone number, and home phone number. An & in the gecos field should be replaced by the user's properly capitalized login name ."

So I think what I'm seeing here is a failure to realize when a comma is part of the name formatting convention vs. name, office locations, work phone number, and home phone number. D'oh!

I don't know about you guys, but in the decade or so I've been doing Unix Administration, I've seen the Last Name, First Name convention far more than fname lname,somwhere out there,555-555-1212,555-555-1212. The problem of course is that there's no way of knowing. You've got years of "standard" convention behind the latter way, but the former way is more common currently. So what to do?

I mean if I were in this situation, I could be ugly about it, grab the gecos as a single field, count the commas, and if there's only one, presume then that the whole thing is the "real name". It seems that debian's stock adduser however puts all the extra commas there. This would not impact users from likewise-open5 though, because it never uses that convention. Problem solved.

That's kinda fugly though, and very presumptuous. I don't have a good answer here.