Content deleted Content added
and a sxhl template |
m →Passwords: lang="unixconfig" |
||
Line 37:
nickname:password_hash:UserID:GroupID:Complete_Name:home_dir:shell_bin
An example would be:
Since all users must have read access to the <code>/etc/passwd</code> file to do many common tasks (<code>ls -l /home</code> will use <code>/etc/passwd</code> to map UIDs to login names for example), anyone could also read the password hashes of other users. To solve this problem, the file <code>[[password shadowing|/etc/shadow]]</code> was created to store the password hashes, with only [[root]] having read access. Under password shadowing, the 2nd field ([[key derivation function|password hash]]) is replaced by an 'x' which tells the system to retrieve the corresponding user's password via the <code>/etc/shadow</code> file.
The <code>/etc/shadow</code> file often only contains values for the first two fields:
The remaining fields in the <code>/etc/shadow</code> file include:
|