PAM conversation nightmares!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Please help me.

I need to get a conversation function
for a command line program that only
does the following:

if (!root)
	authenticate user with pam_authenticate()

change user's password pam_chauthtok();


All the conv() needs to do is:

- Prompt for the password with a string I specify
  instead of the msg in struct message.
- Read the password (prolly with getpass() too).
- Save the password in a program global
- return to PAM.

I cannot get my scrumblings of code to work,
so if someone could please send me a skeleton
that is working, I will do the necessary.

**PS: When I call pam_start() with my conv(),
does my conv() only get called when I call
pam_chauthtok()? Or can I also call it for
pam_authenticate() - where the program also 
interacts with the user?

Thanks,
Allen.



_______________________________________________

Pam-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/pam-list

[Index of Archives]     [Fedora Users]     [Kernel]     [Red Hat Install]     [Linux for the blind]     [Gimp]

  Powered by Linux