Reset Linux user password (bypass PAM pwquality) When passwd or chpasswd rejects a weak password due to PAM policy, hash it directly with SHA-512: echo "USERNAME:NEWPASSWORD" | sudo chpasswd -c SHA512 This skips the PAM password stack and writes the hash straight to /etc/shadow.