What is /etc/passwd used for?

The /etc/passwd file in Linux is used to store user account information. Each line in this file represents a single user account and contains several fields separated by colons (:). The typical fields include:

  1. Username: The user's login name.
  2. Password: Historically, this field contained the user's password, but it usually contains an "x" or "*" indicating that the password is stored in a more secure location (like /etc/shadow).
  3. User ID (UID): A unique numerical identifier for the user.
  4. Group ID (GID): The primary group identifier for the user.
  5. User Info: Optional field for additional information about the user (e.g., full name).
  6. Home Directory: The path to the user's home directory.
  7. Shell: The path to the user's default shell.

The /etc/passwd file is essential for user authentication and management in a Linux system.

0 Comments

no data
Be the first to share your comment!