Checking a password with PAM/Winbind?
(This is on Gentoo Linux, though I don't think it's relevant.)
I've written a program that is a web-based tool to help my users manage some of their settings. This is internal to the company only and isn't visible to the public. It's +s and works by checking the entered username/password, then doing a setuid to the desired user and running the various setup apps. This works perfectly fine with local users in the shadow database, using the following code: Code:
int check_pass_uid(uid_t pw_uid, const char *plainpw) { Code:
if(check_pass(uid, plain_text_pw)) { do some stuff } The problem is with users on my WinNT-PDC-based samba network without a local system account. Everything is setup "correctly" for users to log in with their Windows credentials in most cases (pop3 and ssh, for example), but I don't know how to get my program to use PAM-Winbind to verify the password. I believe "getspnam" is the call that's failing, because there's not actually a shadow entry. Is there another function I should be using to auth the username/password using PAM properly? |
I know bumping your own post is bad form, but come on.
It's a simple question really: - What the proper way to programatically check password validity through PAM? |
All times are GMT -5. The time now is 03:00 PM. |