Why is `pw_gecos` named as such?

Viewed 1304

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?

1 Answers

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.

Related