You said, you have changed the hash. Perhaps the hash started with $1$? Because the GNU libraries have two ways of encrypting passwords: traditional DES using a 2 character seed, or an MD5 based encryption that uses a key of the form '$1$...$', where '...' is up to 8 characters.