1. **Username**: The user’s login name. 2. **Encrypted Password**: The hashed and encrypted password. If the password is locked, this field may contain an exclamation mark (`!`) or an asterisk (`*`). 3. **Last Password Change**: The number of days since January 1, 1970, when the password was last changed. 4. **Minimum Password Age**: The minimum number of days required between password changes. 5. **Maximum Password Age**: The maximum number of days a password is valid before it must be changed. 6. **Password Warning Period**: The number of days before password expiration that the user is warned. 7. **Password Inactivity Period**: The number of days after password expiration that the account is disabled. 8. **Account Expiration Date**: The number of days since January 1, 1970, when the account will be disabled. 9. **Reserved Field**: Currently unused, reserved for future use.
* Securely stores encrypted passwords, reducing the risk of password exposure. * Contains additional account management information for enforcing password policies. * Accessible only by the root user for enhanced security.
```plaintext john:$6$saltsalt$E4.CFJbEhKNdTPaOvzlZnX8nYkI4RCsKJz7wFzx7F9ZK4.DtJ3u4/u/4fQpOH/:18000:0:99999:7::: ```
* **john**: Username * **$6$saltsalt$E4.CFJbEhKNdTPaOvzlZnX8nYkI4RCsKJz7wFzx7F9ZK4.DtJ3u4/u/4fQpOH/**: Encrypted password * **18000**: Last password change (days since Jan 1, 1970) * **0**: Minimum password age (days) * **99999**: Maximum password age (days) * **7**: Password warning period (days) * **:::**: Unused fields
```bash sudo cat /etc/shadow ```
```bash sudo passwd john ```