Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am working on redhat 7.3 linux server box and trying to configure PAM to use my service module (libradpam.so) for authencation during ssh connection.
I did configuration in /etc/pam.d/password-auth file as follows:
But when I see the logs in libradpam.so, it appears like pam service APIs are not getting called when I try to do ssh with external user id and password.
I have kept the libradpam.so in /usr/lib64/security path of linux file system.
Is there anything wrong with my PAM configuration?
From the /var/log/secure i see the following logs from sshd
======
Sep 17 18:29:07 masaml101 sshd[39642]: Invalid user yarrusa from xxx.xxx.xxx.xxx
Sep 17 18:29:07 masaml101 sshd[39642]: input_userauth_request: invalid user yarrusa [preauth]
Sep 17 18:29:07 masaml101 sshd[39642]: Postponed keyboard-interactive for invalid user yarrusa from xxx.xxx.xxx.xxx port 64579 ssh2 [preauth]
Sep 17 18:29:25 masaml101 sshd[39649]: pam_unix(sshd:auth): check pass; user unknown
Sep 17 18:29:25 masaml101 sshd[39649]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=xxx.xxx.xxx.xxx
Sep 17 18:29:27 masaml101 sshd[39642]: error: PAM: User not known to the underlying authentication module for illegal user yarrusa from xxx.xxx.xxx.xxx
Sep 17 18:29:27 masaml101 sshd[39642]: Failed keyboard-interactive/pam for invalid user yarrusa from 139.49.219.93 port 64579 ssh2
Sep 17 18:29:27 masaml101 sshd[39642]: Postponed keyboard-interactive for invalid user yarrusa from xxx.xxx.xxx.xxx port 64579 ssh2 [preauth]
Sep 17 18:29:47 masaml101 sshd[39642]: error: Received disconnect from xxx.xxx.xxx.xxx: 13: Unable to authenticate [preauth]
==========
My thinking: pam_succeed_if fails because there is no uid, issuing the message User not known to the underlying authentication module. The requisite keyword then fails the whole stack and stops processing.
Last edited by berndbausch; 09-18-2018 at 05:22 PM.
Reason: addition
My thinking: pam_succeed_if fails because there is no uid, issuing the message User not known to the underlying authentication module. The requisite keyword then fails the whole stack and stops processing.
Even without the pam_succeed_if, you get user not found?
Well, I have never written a PAM module and won’t be able to help, but there may well be bugs in your code that prevent it from correctly executing the authentication function.
Last edited by berndbausch; 09-18-2018 at 11:21 PM.
Even without the pam_succeed_if, you get user not found?
Well, I have never written a PAM module and won’t be able to help, but there may well be bugs in your code that prevent it from correctly executing the authentication function.
Yes I get the same error. The same PAM module works in RHEL 6.x servers. It is failing only for 7.x machines. I suspect something wrong with PAM configurations only.
Is there any difference in PAM configurations when compared to redhat 6 and 7?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.