LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   PAM Module Question (https://www.linuxquestions.org/questions/linux-security-4/pam-module-question-806137/)

graeber 05-05-2010 01:18 PM

PAM Module Question
 
Hi guys,

Looking for a bit of guidance trying to implement something.

My goal is this: Allow a user to connect to a server via SSH with any login name or password without checking to see if that account exists on that server. Their account would be captured by a universal account say, 'generic_user', and then they would be directed to one of my python scripts with the username and password they supplied for initial login. At this point my script would capture their SSHD process ID and allow/deny their existence based upon a MySQL/Subscription check.

The part I'm having trouble with is with PAM and allowing the user to login with any credentials and be successfully authenticated under the generic account. Beyond that, everything is great.

Any help would be appreciated!

anomie 05-05-2010 03:44 PM

I don't think this is (conceptually) the correct approach. What would be best is a PAM auth module to do the MySQL/subscription check at the outset, right? IOW, do you really want invalid users to get generic credentials and make it all the way to your python script for the purpose of authentication?

graeber 05-05-2010 06:19 PM

Quote:

Originally Posted by anomie (Post 3958466)
I don't think this is (conceptually) the correct approach. What would be best is a PAM auth module to do the MySQL/subscription check at the outset, right? IOW, do you really want invalid users to get generic credentials and make it all the way to your python script for the purpose of authentication?

Got it going using libnss-mysql finally. Yeah, I'm not really concerned about security as the account is locked down pretty hardcore. More of just managing users on a subscription level for SSH tunneling.


All times are GMT -5. The time now is 05:22 PM.