Keep the passwd driver code in sync with gnome-system-tools

Changes taken from bug 613844, thanks to Milan Bouchet-Valat.