Gecos field: Difference between revisions

From Wikipedia, the free encyclopedia

Content deleted Content added


 

Line 1: Line 1:

{{Short description|Information field in UNIX password files}}

{{Short description|Information field in UNIX password files}}

The ”’gecos field”’, or ”’[[General Comprehensive Operating System|GECOS]] field,”’ is a field in each record in the [[Passwd#Password_file|/etc/passwd]] file on [[Unix]] and similar [[operating system]]s. On UNIX, it is the 5th of 7 fields in a record.

The ”’gecos field”’, or ”’GECOS field”’ is a field in each record in the [[Passwd#|/etc/passwd]] file on [[Unix]] and similar [[operating system]]s. On UNIX, it is the of fields in a record.

It is typically used to record general information about the account or its user(s) such as their real name and phone number.

It is typically used to record general information about the account or its user(s) such as their real name and phone number.

==Format==

==Format==

The typical format for the GECOS field is a comma-delimited list<ref>{{Cite web |title=passwd(5) |url=https://man.freebsd.org/cgi/man.cgi?query=passwd&sektion=5 |access-date=2025-08-06 |website=man.freebsd.org}}</ref><ref>{{Cite web |last=Cormany |first=Adam |date=14 September 2009 |title=IBM Developer {{!}} AIX user and group administration |url=https://developer.ibm.com/articles/au-aixuseradmin/ |access-date=2025-08-06 |website=developer.ibm.com}}</ref> with this order:

The typical format for the GECOS field is a comma-delimited list<ref>{{Cite web |title=passwd(5) |url=https://man.freebsd.org/cgi/man.cgi?query=passwd&sektion=5 |access-date=2025-08-06 |website=man.freebsd.org}}</ref><ref>{{Cite web |last=Cormany |first=Adam |date=14 September 2009 |title=IBM Developer {{!}} AIX user and group administration |url=https://developer.ibm.com/articles/au-aixuseradmin/ |access-date=2025-08-06 |website=developer.ibm.com}}</ref> with this order:

#User’s [[Personal name|full name]] (or application name, if the account is for a program)

#User’s [[Personal name|full name]] (or application name, if the account is for a program)

#Building and room number or contact person

#Building and room number or contact person

#Office [[telephone number]]

#Office [[telephone number]]

#Home telephone number

#Home telephone number

#Any other contact information ([[pager]] number, [[fax]], external e-mail address, etc.)

#Any other contact information ([[pager]] number, [[fax]], external e-mail address, etc.)

In most UNIX systems non-root users can change their own information using the ”chfn” or ”chsh” command.

In most UNIX systems non-root users can change their own information using the ”chfn” or ”chsh” command.

Line 24: Line 24:

==See also==

==See also==

*[[General Comprehensive Operating System]]

*[[General Comprehensive Operating System]]

==References==

==References==


Latest revision as of 08:10, 15 December 2025

Information field in UNIX password files

The gecos field, or GECOS field, is a field in each record in the /etc/passwd file on Unix and similar operating systems. On UNIX, it is the fifth of the seven fields in a record.

It is typically used to record general information about the account or its user(s) such as their real name and phone number.

The typical format for the GECOS field is a comma-delimited list[1][2] with this order:

  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. Home telephone number
  5. Any other contact information (pager number, fax, external e-mail address, etc.)

In most UNIX systems non-root users can change their own information using the chfn or chsh command.

Here is an example of GECOS field within an /etc/passwd file in Linux:

janedoe:x:1000:1000:Jane Doe,Room 1015,(234)555-1410,(234)555-1411:/home/janedoe:/usr/bin/zsh

Some early Unix systems at Bell Labs used GECOS machines for print spooling and various other services,[3] so this field was added to carry information on a user’s GECOS identity.

On Internet Relay Chat (IRC), the real name field is sometimes referred to as the gecos field. IRC clients are able to supply this field when connecting. HexChat, an X-Chat fork, defaults to ‘realname’, TalkSoup.app on GNUstep defaults to ‘David Okeamah’, and irssi reads the operating system user’s full name, replacing it with ‘unknown’ if not defined. Some IRC clients use this field for advertising; for example, ZNC defaulted to “Got ZNC?” but changed it to “RealName = ” to match its configuration syntax in 2015.[4]

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top