The whole point of the shadow password file is that `getpwnam` _doesn't_ return passwords from it. You need to look at `man 3 shadow` and `getspnam` in particular.
The whole point of the shadow password file is that `getpwnam` _doesn't_ return passwords from it. You need to look at `man 3 shadow` and `getspnam` in particular.