What Is /etc/passwd

Content on WhatAnswers is provided "as is" for informational purposes. While we strive for accuracy, we make no guarantees. Content is AI-assisted and should not be used as professional advice.

Last updated: April 11, 2026

Quick Answer: The /etc/passwd file is a plain text database on Unix and Linux systems containing basic user account information, with one user account per line using seven colon-separated fields. Originally introduced in AT&T Unix in the 1970s, it has remained a fundamental component of all Unix-like operating systems for over 50 years. While historically containing password hashes, modern systems store encrypted passwords in the /etc/shadow file, introduced in 1989, to enhance security.

Key Facts

Overview

The /etc/passwd file is a fundamental component of all Unix and Linux operating systems that stores essential user account information. It is a plain text file located in the /etc directory that contains basic data about every user account on the system, including usernames, user IDs (UIDs), group IDs (GIDs), home directories, and default login shells. Despite its name suggesting it contains passwords, modern Linux systems actually store encrypted passwords in a separate file called /etc/shadow for improved security.

Originally introduced in AT&T Unix during the early 1970s, /etc/passwd has remained a critical component of Unix-like systems for over five decades. Every user account on a Linux or Unix system must have an entry in /etc/passwd for the system to recognize and authenticate that user. The file is readable by all system users, allowing programs to look up user information, but it is writable only by the root user to maintain system integrity and prevent unauthorized modifications to user accounts.

How It Works

The /etc/passwd file uses a simple and efficient format where each line represents a single user account and contains seven colon-separated fields. Understanding this structure is essential for system administrators and users who need to manage user accounts or troubleshoot access issues.

Key Comparisons

Understanding how /etc/passwd relates to other system files and authentication methods is crucial for comprehensive system administration knowledge.

Aspect/etc/passwd/etc/shadowLDAP Directory
ContentBasic user account info without passwordsEncrypted password hashes and aging infoCentralized user database in network directory
ReadabilityReadable by all usersReadable only by rootControlled by directory access policies
Introduced1970s (AT&T Unix)1989 (Shadow Suite)1990s (standardized as X.500)
Use CaseLocal system user recordsSecure password storageEnterprise-wide directory services

Why It Matters

The /etc/passwd file remains essential for modern Unix and Linux systems despite being primarily a legacy component in many enterprise environments. Understanding its structure and purpose is fundamental for anyone working in system administration, security, or software development on Unix-like platforms.

System administrators and developers should understand /etc/passwd not only for managing user accounts but also for troubleshooting authentication issues, implementing security policies, and understanding how Unix-like systems fundamentally organize user identity and access control. This knowledge remains relevant even in modern systems using centralized authentication like LDAP or Active Directory.

Sources

  1. Wikipedia - passwdCC-BY-SA-4.0
  2. Linux man-pages: passwdLinux-man-pages-2.0

Missing an answer?

Suggest a question and we'll generate an answer for it.