What is /etc/shadow file in Linux ?

In Linux, the `/etc/shadow` file stores the encrypted password hashes for user accounts. Each line in the `/etc/shadow` file corresponds to a single user account and contains the password hash, as well as other account information such as the account status, expiration date, and minimum/maximum password age.


The `/etc/shadow` file is readable only by the root user, which helps to ensure the security of the password hashes. User passwords are stored in hashed form, which means that even if an attacker gains access to the `/etc/shadow` file, they will not be able to easily determine the actual passwords.


When a user logs in to the system, the entered password is encrypted and compared to the stored hash in the `/etc/shadow` file. If the hashes match, the user is granted access to the system. 


The `/etc/shadow` file is an important part of the Linux security infrastructure and is used by the system to ensure that only authorized users can access the system. It is important to protect the file from unauthorized access and to regularly update passwords to help maintain system security.