I know that on Linux (at least debian) every password are hashed and stored in /etc/shadow
.
However thanks to the libpam-cracklib
you can add some rules on passwords. For instance in /etc/pam.d/common-password
you can set Difok
which is a parameter that indicate the number of letter that can be the same between an old and a new password.
But how linux can know when I type in an new password the similarity with my old pasword as it doesn't know my real password (it just have a hash)?
Thanks !