Artificial intelligent assistant

How to get hashed password in /etc/shadow using getpwnam()? Apparently there is a function (getpwnam) that given a username, will return the appropriate entry in `/etc/passwd` with the other details for that user (shell, uid, gid, etc.). However, I have no idea how to get that function working with the shadow password file (`/etc/shadow`). Is this possible? The application will be running as `root`.

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.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy f0c60f237012d9245962e49e32e5ace4