RE: AUTHTOK Retrieval
Liam Kelly <[email protected]> Fri, 9 Feb 2018 10:37:01 -0500
| Newsgroups | gmane.linux.pam |
|---|---|
| Message-ID | <[email protected]> |
--===============3123537919871385223== Content-Type: multipart/alternative; boundary="_19E8D91E-9B90-45B3-921D-5DDEDDE19C56_" --_19E8D91E-9B90-45B3-921D-5DDEDDE19C56_ Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Additional information: `pam_get_authtok` is returning PAM_SUCCES with a string the same length as = the password I entered, but filled with: =E2=80=9C\x08\x0a\x0d\x7fINCORRECT\x08\x0a\x0d\x7fINCORRECT\x08\x0a\x0d\x7f= INCORRECT=E2=80=9D Any help would be greatly appreciated.=20 -Liam=20 From: Liam Kelly Sent: Friday, February 9, 2018 1:25 AM To: [email protected] Subject: AUTHTOK Retrieval Hi, I am currently unable to retrieve the password string given to my custom PA= M module from OpenSSH Server. I am writing a PAM module in order to allow OpenSSH Server to reference a u= ser database on peripheral hardware. I modeled my code very similarly to `p= am_userdb` and tested it initially with the tool in the `simple_pam` reposi= tory on GitHub. The `simple_pam` tool worked but OpenSSH Server was not abl= e to retreave the password for comparison. The main difference between the = two applications is that =E2=80=98simple_pam=E2=80=99 brings up the pam_pro= mpt and sets the AUTHTOK first while OpenSSH only allows for retrieval. I h= ave tried both `pam_get_auth` and =C2=A0=C2=A0`pam_get_item`, but both retu= rn an empty string for the SSH case. Also I get the username just fine from= OpenSSH. `pam_unix` works, so I am really confused as to why I cannot get the AUTHTO= K. Do you think it has something to do with the module locks placed on AUTH= OKs? Could I be missing a compiler option? -Liam=20 --_19E8D91E-9B90-45B3-921D-5DDEDDE19C56_ Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8" <html xmlns:o=3D"urn:schemas-microsoft-com:office:office" xmlns:w=3D"urn:sc= hemas-microsoft-com:office:word" xmlns:m=3D"http://schemas.microsoft.com/of= fice/2004/12/omml" xmlns=3D"http://www.w3.org/TR/REC-html40"><head><meta ht= tp-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8"><meta name= =3DGenerator content=3D"Microsoft Word 15 (filtered medium)"><style><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri",sans-serif;} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:#954F72; text-decoration:underline;} .MsoChpDefault {mso-style-type:export-only;} @page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;} div.WordSection1 {page:WordSection1;} --></style></head><body lang=3DEN-US link=3Dblue vlink=3D"#954F72"><div cla= ss=3DWordSection1><p class=3DMsoNormal>Additional information:</p><p class= =3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>`pam_get_authtok` is= returning PAM_SUCCES with a string the same length as the password I enter= ed, but filled with:</p><p class=3DMsoNormal>=E2=80=9C\x08\x0a\x0d\x7fINCOR= RECT\x08\x0a\x0d\x7fINCORRECT\x08\x0a\x0d\x7fINCORRECT=E2=80=9D</p><p class= =3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>Any help would be gr= eatly appreciated. </p><p class=3DMsoNormal><o:p> </o:p></p><p class= =3DMsoNormal>-Liam </p><p class=3DMsoNormal><o:p> </o:p></p><div style= =3D'mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;= padding:3.0pt 0in 0in 0in'><p class=3DMsoNormal style=3D'border:none;paddin= g:0in'><b>From: </b><a href=3D"mailto:[email protected]">Liam Kelly</a>= <br><b>Sent: </b>Friday, February 9, 2018 1:25 AM<br><b>To: </b><a href=3D"= mailto:[email protected]">[email protected]</a><br><b>Subject: </b>AUTH= TOK Retrieval</p></div><p class=3DMsoNormal><o:p> </o:p></p><p class= =3DMsoNormal>Hi,<o:p></o:p></p><p class=3DMsoNormal><o:p> </o:p></p><p= class=3DMsoNormal>I am currently unable to retrieve the password string gi= ven to my custom PAM module from OpenSSH Server.<o:p></o:p></p><p class=3DM= soNormal><o:p> </o:p></p><p class=3DMsoNormal>I am writing a PAM modul= e in order to allow OpenSSH Server to reference a user database on peripher= al hardware. I modeled my code very similarly to `pam_userdb` and tested it= initially with the tool in the `simple_pam` repository on GitHub. The `sim= ple_pam` tool worked but OpenSSH Server was not able to retreave the passwo= rd for comparison. The main difference between the two applications is that= =E2=80=98simple_pam=E2=80=99 brings up the pam_prompt and sets the AUTHTOK= first while OpenSSH only allows for retrieval. I have tried both `pam_get_= auth` and `pam_get_item`, but both return an empty string for t= he SSH case. Also I get the username just fine from OpenSSH.<o:p></o:p></p>= <p class=3DMsoNormal><o:p> </o:p></p><p class=3DMsoNormal>`pam_unix` w= orks, so I am really confused as to why I cannot get the AUTHTOK. Do you th= ink it has something to do with the module locks placed on AUTHOKs? Could I= be missing a compiler option?<o:p></o:p></p><p class=3DMsoNormal><o:p>&nbs= p;</o:p></p><p class=3DMsoNormal>-Liam <o:p></o:p></p><p class=3DMsoNormal>= <o:p> </o:p></p></div></body></html>= --_19E8D91E-9B90-45B3-921D-5DDEDDE19C56_-- --===============3123537919871385223== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Pam-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/pam-list --===============3123537919871385223==--