-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pam_radius version 2 not woking with multi factor authentication/2FA #78
Comments
Any update on this please ? |
I would suggest giving a little more information than "it doesn't work". Also, it's open source. No one is getting paid to fix issues. We have no obligation to jump when you file a bug. The source code is online. You can either submit a patch, or look through the commit history to track down which commit broke this functionality. That effort should take only a small amount of time, and will help us prioritize a fix. |
@muzammel111 if you don't share any input, logs error/warning messages, and entire config files. it's totally impossible to figure out what is happening. |
Dear @jpereira and @alandekok Thank you, for your prompt response, i have now enabled debug logs of pam_radius and after upgraded to version 2.0, the radius auth breaks and password prompt repeating to send requests to radius server, see below logs, as the raidus auth already successful but repeated password prompt sending OS password to radius also. Oct 31 02:37:28 Oracle-Linux-9 sshd[3789900]: pam_radius_auth: Got user name infra.nabil And once i downgrade to pam 1.4 its works, Oct 31 02:30:33 Oracle-Linux-9 sshd[3756610]: pam_radius_auth: Got user name infra.nabil I found below changes between 1.4 and 2.0 https://src.fedoraproject.org/rpms/pam_radius/c/c2a3314689968d9a1ebb798224f8d585810a78a9?branch=epel8 I am a systemadmin not programmer, kindly please guide me further if you need require more info. Thanks again for your great support. Regards, |
|
Dear @jpereira thanks for you prompt response, here below the answers.
cat /etc/pam_radius.conf 10.50.1.1:1812 radiussecret 5
Please let me know freely for further information. Thanks. |
Further, below is the pattern for ssh using 2FA (radius + OS local auth) In pam_radius version 2.0.0-3 ssh [email protected] Worked fine in pam_radius 1.4.15 ssh [email protected] |
@muzammel111 By default, the pam_radius 2.x expects to use the
It has already been tested and validated against CentOS. As we don't have any Redhat server to reproduce it. please, take a look carefully at each line and see what is missing in your setup. |
Hi, the pam_radius pacakge use below files rpm -ql pam_radius (list files in pam_radius package) As pam_radius_auth.so file call in pam.d/sshd file as below on first top mentioned in bold auth required pam_radius_auth.so @jpereira same config files working fine on version 1.4, but when we upgrade to version 2 and restart sshd service, it failed on 2FA, as the config files are working fine as we got successful auth hit on radius server log, but password prompt appearing again and again as mentioned above. |
@muzammel111 As I said: the e.g:
|
@jpereira sir, the /etc/pam_radius_auth.conf file is not present, i think its come in ubuntu pacakge, as i am using RHEL distro, the pam_radius has total below files in their rpm [root@Linux-9 ~]# rpm -ql pam_radius Any way i will try your method like below and let you know. |
@muzammel111 If not work, please do the below steps:
|
Thanks @jpereira i will test and update you. |
@muzammel111 We've fixed the CI tasks and now the module has been built and tested successfully against CentOS8, Rocky8, and Rocky9 (same as Redhat) as can be seen here #81 Please let us know any news. |
Dear @jpereira thanks for the update and prompt response, now you have fixed some thing ? as now i am currently testing on Oracle Linux 8 and 9 which is based on Redhat Enterprise, so upstream will need to build rpm for new changes ? then i will test. Please confirm. |
@jpereira , today i compiled the pam_radius master branch from git, as you mentioned and compiled it and update pam.d/sshd file first line as below But result its same as mentioned above in detail, first attempt of radius auth is successful, and password prompts continue appears. Below are the log messages. please guide. ov 6 06:34:58 Oracle-Linux-9 sshd[874179]: pam_radius_auth: 2.0.1, built on Nov 6 2023 at 05:11:19 |
@muzammel111 we can see below that the pam_radius_auth is handling and accepting as well.
Therefore, Probably you're missing something in your
Please, do the test using |
@muzammel111 please, share the output of the command: |
[infra.nabil@Oracle-Linux-9 ~]$ id infra.nabil |
Yes but only one time, its successful but, password prompt repeating again and again and as auth request goes again to radius server instead to perform local auth.
Ok, but surprising thing is that, same settings including (pam.d/sshd) file works on version 1.4, but when we upgraded it stop working, can you please guide how to set force_prompt=yes ? |
@jpereira i have tried to set force_prompt=yes but its gives (unrecognized option 'force_prompt=yes'). auth required pam_radius_auth.so conf=/etc/pam_radius_auth.conf debug retry=123 client_id=666 force_prompt=yes Nov 8 02:57:25 Oracle-Linux-9 sshd[1139817]: pam_radius_auth: 2.0.1, built on Nov 6 2023 at 05:11:19 |
Hi @muzammel111 Well, I was a bit intrigued by that report. then, as we don't have any Redhat9 license to perform the tests. I've decided to perform the tests against the Rocky9 (clone of Redhat9) I added all my tests and steps in such Dockerfile then below you can see the steps to reproduce the exact tests:
... the user already exists.
... the FreeRADIUS instance is authenticating the user properly.
... Also the
Therefore, my conclusion is you have something broken in your setup. |
@jpereira you are good to go with rocklinux 9, actually the issue comes in 2FA (Multi Factor Authentication) (radius auth + pam_unix) like you ssh using 2FA first auth with radius then with OS password. As i already told that if we bypass 2FA only radius auth successful but the issue came when you setup SSH with 2FA. Therefore i am requesting you to please test SSH with 2FA using radius + OS auth as i mentioned in detail above. |
@jpereira are you doing testing or any update please ? |
@jpereira kindly please update and suggest how to resolve it? |
@jpereira as we conclude that the expected issue in pam.d/sshd file, as same file working fine in 1.4 version for MFA/2FA (radius + os password) but after upgrade to version 2, its stopped working and prompt password again and request send to radius server again for second password prompt. cat /etc/pam.d/sshd | grep auth Example of SSHD+PAM for CentOS#%PAM-1.0 If we disabled 2nd line and only force radius auth its works, but not working in 2FA mode. so kindly please suggest. |
This is the change in rebase version from version 1.4 (working) to 2.0 (not working) |
@jpereira please help to solve this, as its works fine with out 2FA but in 2FA password prompt repeating |
1 similar comment
@jpereira please help to solve this, as its works fine with out 2FA but in 2FA password prompt repeating |
Respected @jpereira kindly please guide on this. # |
@muzammel111 please share the output logs from syslog. |
Respected @jpereira please find below required syslog. ssh infra.nabil.x.x Below are the syslog. Nov 2 23:48:52 SHCME-staging-ol9 sshd[3552571]: pam_radius_auth: Got user name infra.nabil Nov 2 23:50:09 SHCME-staging-ol9 sshd[3556223]: pam_radius_auth: Sending RADIUS request code 1 |
Respected @jpereira any update on this ? as same pam.d/sshd configuration working fine for an old version of pam_radius on both Ubuntu and RHEL but not working via latest version of pam_radius. |
We have setup (MFA/2FA) on linux based servers using first pam_radius to authenticate with radius server then authenticate with OS password. our pam.d/sshd contains below for auth.
#%PAM-1.0
auth required pam_sepermit.so
auth required pam_radius_auth.so
auth include password-auth
etc etc
Same things working fine on pam_radius-1.4.0-15, and when we update pam_radius to version 2.0 , the MFA has been broken, however if we use only for radius auth it works only as a single auth. but if we want to MFA as mentioned then its not work. So kindly please advise on it, i think new version has some changes which not supporting MFA. Kindly please advise. Thanks.
Regards,
The text was updated successfully, but these errors were encountered: