<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Sorry to jump in, but yes, its possible. But you'd have to write your own module and I don't think you'll get much help here because well, there's no 'white hat' reason to capture the password.<br><br>Note: Password could be a character string, or a converted biometric pattern, or anything.<br><br>Why don't you explain why you want to capture the password? Perhaps there's a better way to achieve what you want?<br><br><br>> Date: Tue, 21 Jul 2009 08:56:21 +0200<br>> From: kukuk@suse.de<br>> To: pam-list@redhat.com<br>> Subject: Re: How to save a copy of user's input password?<br>> <br>> On Tue, Jul 21, Andy wrote:<br>> <br>> > On Tue, Jul 21, 2009 at 1:53 PM, Thorsten Kukuk<kukuk@suse.de> wrote:<br>> > > On Tue, Jul 21, Andy wrote:<br>> > ><br>> > >> Hi all,<br>> > >> My pam version is 1.1.0, I use it to authenticate users.<br>> > >> My case is, when pam finished it's auth, that is after<br>> > >> pam_authenticate(pamh, o) & pam_acct_mgmt(pamh, 0),<br>> > >> I want to save a copy of user's password if it's valid, but I can not<br>> > >> find any API to fulfill my needs.<br>> > >> I tried pam_get_item(pamh, PAM_AUTHTOK, (const void<br>> > >> **)&copy_of_passwd), but it returns a "bad item passed to<br>> > >> pam_*_item()", now I have no idea. :(<br>> > ><br>> > > As written in the documentation, this is not possible. And<br>> > > as your application does not know in which form the authentication<br>> > > was done, it doesn't make sense, too. Who says that a password<br>> > > was used for authentication? The admin could have decided to<br>> > > use finger prints instead or whatever else.<br>> > ><br>> > <br>> > But now, in PAM, "pam_authenticate(...)" function gives a promt<br>> > "Password:" to let the user type in a password,<br>> <br>> One of the configured PAM modules is asking that, but you can<br>> always replace that module with something different.<br>> <br>> > we really have no way to get a copy of user's input ?<br>> <br>> No, there is not. Read the documentation.<br>> <br>> > I saw some code in google, something like below:<br>> <br>> That's code for a PAM module, not a PAM aware application.<br>> <br>> > I guess this may try to retrieve a copy of  authtok(password ??), but<br>> > now ( version1.1.0 ), PAM_AUTHTOK seems not be supported anymore.<br>> <br>> Not anymore, it was never.<br>> <br>> You should really start reading the PAM documenation, especially<br>> the application writer guide.<br>> <br>>   Thorsten<br>> <br>> -- <br>> Thorsten Kukuk, Project Manager/Release Manager SLES<br>> SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg<br>> GF: Markus Rex, HRB 16746 (AG Nuernberg)<br>> <br>> _______________________________________________<br>> Pam-list mailing list<br>> Pam-list@redhat.com<br>> https://www.redhat.com/mailman/listinfo/pam-list<br><br /><hr />Windows Live™ SkyDrive™: Store, access, and share your photos. <a href='http://windowslive.com/Online/SkyDrive?ocid=TXT_TAGLM_WL_CS_SD_photos_072009' target='_new'>See how.</a></body>
</html>