Forrest logo
back to the unshadow tool

unshadow:tldr:638e1

unshadow: Combine the `/etc/shadow` and `/etc/passwd` of the current system.
$ sudo unshadow /etc/passwd /etc/shadow
try on your machine

The command "sudo unshadow /etc/passwd /etc/shadow" is used to combine the password hashes from the /etc/passwd file and the /etc/shadow file, making it easier to crack passwords.

In Linux systems, the /etc/passwd file contains user account information, including usernames and user identification numbers (UIDs), while the /etc/shadow file stores the password hashes corresponding to each user's account.

However, to enhance security, the /etc/shadow file permissions are set so that only privileged users, such as root or users in the sudoers group, can access it. This prevents regular users from being able to view the password hashes.

The "sudo unshadow" command allows a privileged user to combine both files, creating a new file that contains the username, password hash, and other relevant information in a single location. By doing so, it simplifies the process of analyzing and cracking passwords since all the necessary data is easily accessible.

It's important to note that using this command requires administrative privileges, hence why "sudo" is used at the beginning. The "sudo" command provides temporary superuser (root) privileges to the following command, allowing the user to execute it as if they were root.

Please exercise caution when using this command, as accessing and manipulating password information can be sensitive and potentially unethical if done without proper authorization.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the unshadow tool