SHADOW(5) | File Formats and Configurations | SHADOW(5) |
shadow - shadow password file
/etc/shadow is an access-restricted ASCII system file that stores users' encrypted passwords and related information. The shadow file can be used in conjunction with other shadow sources, including the NIS maps passwd.byname and passwd.byuid. Programs use the getspnam(3C) routines to access this information.
The fields for each user entry are separated by colons. Each user is separated from the next by a newline. Unlike the /etc/passwd file, /etc/shadow does not have general read permission.
Each entry in the shadow file has the form:
username:password:lastchg:min:max:warn:inactive:expire:flag
The fields are defined as follows:
username
password
The lock string is defined as *LK* in the first four characters of the password field.
lastchg
min
max
warn
inactive
expire
flag
A value of -1 for min, max, or warn disables password aging.
The encrypted password consists of at most CRYPT_MAXCIPHERTEXTLEN characters chosen from a 64-character alphabet (., /, 0−9, A−Z, a−z). Two additional special characters, "$" and ",", can also be used and are defined in crypt(3C). To update this file, use the passwd(1), useradd(8), usermod(8), or userdel(8) commands.
In order to make system administration manageable, /etc/shadow entries should appear in exactly the same order as /etc/passwd entries; this includes ``+'' and ``-'' entries if the compat source is being used (see nsswitch.conf(5)).
Values for the various time-related fields are interpreted as Greenwich Mean Time.
/etc/shadow
/etc/passwd
/etc/nsswitch.conf
/var/adm/lastlog.v2
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Interface Stability | Stable |
login(1), passwd(1), crypt(3C), crypt_gensalt(3C), getspnam(3C), putspent(3C), strtol(3C), nsswitch.conf(5), passwd(5), attributes(7), pam_unix_account(7), pam_unix_auth(7), useradd(8), userdel(8), usermod(8)
If password aging is turned on in any name service the passwd: line in the /etc/nsswitch.conf file must have a format specified in the nsswitch.conf(5) man page.
If the /etc/nsswitch.conf passwd policy is not in one of the supported formats, logins will not be allowed upon password expiration, because the software does not know how to handle password updates under these conditions. See nsswitch.conf(5) for additional information.
February 25, 2017 | OmniOS |