Passwd command && chroot : difference between Debian and CentOS

I’m looking to reset an unknow password via the following solution:
-booting from a liveCD
-mount the Operating System and Chroot to it.
-use the passwd command to change the password.

It works under the following conditions:
OS CentOS & LiveCD Fedora (Rehl based)
OS Ubuntu & LiveCD Grml debian based
OS Debian & LiveCD Grml debian based

It does not work when the OS is CentOs and the LiveCD is Grml :
everything seems to work properly, like if the password is changed, but at re-boot I can’t loggin; nor with this account nor with another.
Using Lsof and Strace, I tried to look at any difference in the way the command is working but can’t find a reason.
I can’t see why the Chroot introduce a difference in the way the passwd command run.
Any thoughts?

CentOS/RHEL comes with different version of passwd. Hence syntax is different too.


Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki