It seems that it's a parsing issue. When my /etc/passwd is root::0:0:root:/root:/bin/bash Error is there. When I manually put x in /etc/passwd like this root:x:0:0:root:/root:/bin/bash then it works fine I am able to change the password. When I revert the commit c9fc15359ef8fe5aa98ab0308c1563d9bcf99bb8 it work fine.
My config is: grep PASSWD .config CONFIG_FEATURE_SHADOWPASSWDS=y CONFIG_CHPASSWD=y CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="des" CONFIG_MKPASSWD=y CONFIG_PASSWD=y CONFIG_FEATURE_PASSWD_WEAK_CHECK=y