Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

There are weird commas after the real-name parameter of some lines in my /etc/passwd file.

kye:x:1000:100:Kye,,,:/home/kye:/bin/bash

What gives? Why are they there? Can I remove them?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Some tool you used to create the account (adduser?) added them. The tool in question sees the comment / real name field in the passwd file as a GECOS field:

http://en.wikipedia.org/wiki/Gecos_field

The field values are

  1. User's full name (or application name, if the account is for a program)
  2. Building and room number or contact person
  3. Office telephone number
  4. Any other contact information (pager number, fax, etc.)

However, I cannot think of an applicaton which uses them. I believe these fields are close to useless. Use a different tool for adding users (useradd?) or explicitely give a value for the GECOS field if possible.

share|improve this answer
    
Real name is very widely used. The other fields used to be displayed by the finger tool (example). –  grawity Sep 7 '11 at 12:28
2  
Actually, subfield #4 is "Home telephone number". "Other" is subfields #5 and onwards. And to expand upon grawity's point: Taking the commas out doesn't change the tools that use the field (finger, many MTSes, and so on). Those programs will still stop reading the full name at the first comma, semi-colon, or percent sign that they encounter. Explicit commas, even if the subfields that they delimit are all empty, are a useful reminder of this. –  JdeBP Sep 7 '11 at 15:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.