User Accounts

/etc/passwd

The password file

username:x:UID:GID:user-info:home-dir:login-shell

username

User account login name (generally limited to 8 characters).

x

Traditional password field, set to a fixed character (usually x) when a shadow password file is in use. AIX uses an exclamation point (!), and FreeBSD uses an asterisk (*).

UID

The user identification number.

GID

The user’s primary group membership.

user-info

Conventionally, contains the user’s full name and, possibly, other job-related information (e.g., office location or phone number). Up to five comma-separated subfields may be defined.

home-dir

The user’s home directory.

login-shell

The program used as the command interpreter for this user. On most systems, the /etc/shells file lists the full pathnames of valid shell programs; on AIX systems, valid shells are listed in the shells field in the usw stanza of /etc/security/login.cfg:         shells = /bin/sh, /bin/csh, ...

Shadow password files

/etc/shadow (Linux and Solaris)

user:pwd:changed:minlife:maxlife:warn:inactive:expires:

user

Username (as in /etc/passwd).

pwd

Encoded password.

changed

Last password change (Unix date format*).

minlife

Minimum number of days a user must keep a new password.

maxlife

Maximum password lifetime, in days.

warn

Days to warn in advance of an upcoming password expiration.

inactive

Days after password expiration that the account will be disabled.

expires

Date the account expires (Unix date format). ...

Get Essential System Administration Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.