I have a relatively old Linux system, where password are not shadowed, therefore stored in /etc/passwd/.

My question is, since I know the cleartext password, and its hash (looking at the passwd file), Can I quickly figure out the hashing system/crack it? So I would be able to get the cleartext password from another user just from its hash, or at least make bruteforcing faster?


EDIT: The hash is 13 characters long


3 Answers 3


Hashes are one-way algorithms which will help you confirm if a hash of plaintext matches the hash in your possession (the rainbow tables approach that @TTT suggests). It will, however, not help you reverse-crack it.

If the hash function itself turns out to be weak (like MD5/SHA1), you can possibly find strings which collide with the hashes in your possession, creating an alternative password.


The hashing algorithm used is not part of the secret. The hashing algorithm should always be assumed to be known. You can read up to this here.

In fact, the string you find in /etc/passwd or /etc/shadow tells you which hash has been used right in the first number:

$1 → md5
$2 → blowfish
$2 → eksblowfish
$5 → sha256
$6 → sha512

It may help you determine which hashing algorithm is used, but it will not help you brute force other passwords faster. When you brute force you will be calculating many hashes. Starting with knowing 0 versus 1 hash doesn't make a difference. Even starting with a rainbow table of trillions of known hashes won't help if the salts are all different.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .