It may be due to the libpam-passwdqc configuration using ask_oldauthtok and similar=deny.
It was working fine on Bionic but fails with Focal. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to shadow in Ubuntu. https://bugs.launchpad.net/bugs/1904166 Title: chpasswd can't change password with libpam-passwdqc enabled Status in shadow package in Ubuntu: New Bug description: Hello. We are unable to change user password using chpasswd with libpam- passwdqc, it seems to miss detect old password: root@server:~# echo 'root:hearth=mirth-Double' | chpasswd […] Weak password: is the same as the old one. Try again. root@server:~# echo $? 1 I tried the following to make sure the old password was not the same: root@server:~# echo 'root:foo' | chpasswd -c SHA512 root@server:~# echo 'root:hearth=mirth-Double' | chpasswd […] Weak password: is the same as the old one. Try again. root@server:~# echo $? 1 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/shadow/+bug/1904166/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp