5

In the passwd struct:

struct passwd {
    char   *pw_name;       /* username */
    char   *pw_passwd;     /* user password */
    uid_t   pw_uid;        /* user ID */
    gid_t   pw_gid;        /* group ID */
    char   *pw_gecos;      /* user information */
    char   *pw_dir;        /* home directory */
    char   *pw_shell;      /* shell program */
};

Referenced: http://man7.org/linux/man-pages/man3/getpwnam.3.html

The user information (usually full name of the user) is found in an attribute pw_gecos. What does gecos mean, why is this named as such, and what is the history behind the name?

WilliamMartin
  • 553
  • 5
  • 15
  • 1
    maybe [wikipedia](https://en.wikipedia.org/wiki/Gecos_field) helps for this - seems to come from [General Comprehensive Operating System](https://en.wikipedia.org/wiki/General_Comprehensive_Operating_System). – Anya Shenanigans Jul 11 '17 at 11:15
  • @Petesh If you turn this into a fleshed out answer I would accept it, otherwise I will reference this and answer the question myself. Thanks. – WilliamMartin Jul 11 '17 at 13:20

1 Answers1

3

From wikipedia:

The gecos field, or GECOS field is an entry in the /etc/passwd file on Unix, and similar operating systems.It is typically used to record general information about the account or its user(s) such as their real name and phone number.

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

scopchanov
  • 7,966
  • 10
  • 40
  • 68
Movie Tom
  • 31
  • 3