Introduction
In this article, we will discuss the password hash parameters used by Fedora Workstation for storing passwords in the /etc/shadow file. We will explore the reasons behind using specific hash algorithms and the related parameters.
Background
Fedora Workstation, like other modern Linux distributions, uses a secure method to store user passwords. Instead of storing plain text passwords, it uses a hashed representation of the password. This approach ensures that even if an attacker gains unauthorized access to the system, they cannot easily obtain the passwords.
The password hash in Fedora Workstation is stored in the /etc/shadow file. This file contains a list of user accounts and their corresponding encrypted passwords, user IDs, group IDs, and other account information.
yescrypthash
Fedora Workstation 41 uses the yescrypthash algorithm to store password hashes. This algorithm is a variant of the bcrypt algorithm, which is known for its strong password protection. It is designed to be computationally expensive, making it difficult for attackers to crack passwords using brute force methods.
Parameters
The yescrypthash algorithm has several parameters that can be configured to customize the hashing process. The most common parameters are:
$6$: This indicates that the algorithm being used is a variant of bcrypt. In this case, it's yescrypthash.$: This character represents the number of rounds the algorithm will perform. The more rounds, the longer it takes to hash a password, making it more secure.
Example
Let's examine an example of a password hash in the /etc/shadow file:
user:$6$salt$rounds:15013:0:99999:7:::
In this example:
$6$: Indicates the use of the yescrypthash algorithm.salt: A random value added to the password before hashing to make each hash unique.rounds: The number of rounds the algorithm will perform. In this example, it's set to 10000.
In this article, we discussed the password hash parameters used by Fedora Workstation for storing passwords in the /etc/shadow file. We explored the reasons behind using the yescrypthash algorithm and the related parameters, such as the number of rounds. Understanding these parameters can help you appreciate the security measures in place to protect user passwords on your Fedora Workstation system.