/etc/passwd

The /etc/passwd file is a text file that contains important information about each user in Linux Operating Systems.

Some of this info, is username, UID, GID, shell, home directory, and some other.

From Wikipedia:

The file is named as originally it also contained the data used to verify passwords. However, on modern Unix systems the security-sensitive password information is instead often stored in a different file using shadow passwords.

.

Every user can read it, but only root can write it, unless using sudo permissions.

Format

proftpd:x:106:65534:user's info:/var/run/proftpd:/bin/false

The fields are separated by “:” semi colons.

And a description for those fields is:

  1. username / logname The first field is the user name, i.e. the string a user would type in when logging into the operating system: the logname. Each record in the file must have a unique user name field.
  2. Password The second field stores information used to validate a user's password; however in most modern uses this field is usually set to "x" (or some other indicator) with the actual password information being stored in a separate shadow password file. Setting this field to an asterisk "*" is the typical way to deactivate an account to prevent it being used.
  3. UID The third field is the user identifier, the number that the operating system uses for internal purposes. It does not have to be unique.
  4. GID The fourth field is the group identifier. This number identifies the primary group of the user; all files that are created by this user will initially belong to this group.
  5. User info The fifth field, called the Gecos field, is commentary that describes the person or account. Typically, this is a set of comma-separated values including the user's full name and contact details.
  6. Home Directory The sixth field is the path to the user's home directory.
  7. Shell path The seventh field is the shell program that is started every time the user logs into the system, here you use /bin/false to avoid that user to log into the system.