Is there any command or option to read user hashed password from /etc/shadow file?


No this isn't possible. It's a one way hash that's been salted. All you can do is take a dictionary of words, hash them using the same crypt function and see if their results match what's in /etc/shadow.

Tools such as John the Ripper automated this process, but that's effectively all they're doing to crack a password.

John the Ripper is a fast password cracker, currently available for many flavors of Unix, Windows, DOS, and OpenVMS. Its primary purpose is to detect weak Unix passwords. Besides several crypt(3) password hash types most commonly found on various Unix systems, supported out of the box are Windows LM hashes, plus lots of other hashes and ciphers in the community-enhanced version.

There are countless others - https://en.wikipedia.org/wiki/Password_cracking.


A regular user does not have permissions to read the /etc/shadow file.

Only root is allowed to access it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.