configuration
/etc/passwd — Local account records
Local account database with seven colon-delimited fields. On shadow-password systems x is a placeholder, not a password. UID identifies the account; primary GID refers to a group. GECOS is descriptive text; HOME and SHELL identify intended paths. NSS can obtain users from additional sources, so this file alone does not enumerate all identities. Do not manually edit production account databases; use account-management tools and validate in a VM. Existing processes do not automatically adopt changed credentials.
Formal Syntax & Structure
linux syntaxlinux
NAME:PASSWORD:UID:GID:GECOS:HOME:SHELLParameters & Attributes
| Name | Type | Description |
|---|---|---|
| NAME | field | Login name |
| PASSWORD | field | Password field or placeholder |
| UID | field | Numeric user ID |
| GID | field | Primary group ID |
| GECOS | field | Descriptive account information |
| HOME | field | Home directory |
| SHELL | field | Login shell |
Return Value
configuration or inspection
A record describes account attributes, not active sessions or authorization. getent passwd NAME performs NSS lookup.
Working Example
Example Snippetlinux
printf '%s\n' 'bmstudent:x:2001:2001:Demo account:/home/bmstudent:/bin/bash' | awk -F: 'NF==7 {print $1, $3, $4, $6}'