LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-05-2012, 04:24 PM   #1
jrote1
LQ Newbie
 
Registered: Oct 2012
Posts: 1

Rep: Reputation: Disabled
PAM authentication using PHP script


I am trying to find a way to perform PAM authentication through a PHP script. So basicly PAM calls PHP script to see if the user is correct and returns a result. How would I go about this ?
 
Old 10-10-2012, 05:02 AM   #2
jayakrishnan
Member
 
Registered: Feb 2002
Location: India
Distribution: Slacky 12.1, XP
Posts: 992

Rep: Reputation: 30
http://in1.php.net/posix_getpwnam
 
Old 10-10-2012, 01:12 PM   #3
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,670
Blog Entries: 4

Rep: Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945Reputation: 3945
You probably want to build your script in such a way that this authentication piece of it is a cleanly-separate module, because it may well be that in other (e.g. "corporate") scenarios, you might need to use LDAP (nee OpenDirectory). Corporations, for fairly obvious reasons, like to be able to centrally manage the authentication/authorization processes, and LDAP is a worthy standard.

Furthermore, LDAP integration is available at the web server level, such that you can restrict access to an entire web-site based on the LDAP-known status of the visiting (internal, corporate ...) user. This can greatly simplify the design of an internal web-site because the site no longer has to determine whether the visitor is authorized to be here ... "if he's not authorized to be here, he isn't" ... and the site can also rely upon the fact that LDAP information will be available for anyone who is here. (Just in case, your script should redirect, and thus evict, anyone whose LDAP credentials cannot be retrieved ...)

Your web site can query various attributes of the user to determine, as necessary, exactly what he should or should not be allowed to do ... and it can rely upon the information that is returned as being authoritative.

Last edited by sundialsvcs; 10-10-2012 at 01:13 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PAM authentication. pinga123 Linux - General 1 11-25-2010 07:24 AM
pam radius authentication danieldinu Linux - Security 2 07-17-2009 01:56 PM
PAM authentication onik Linux - Software 0 06-27-2008 02:59 AM
Using PAM Authentication mechanism for execution of script Narayandutt Linux - Software 1 11-21-2007 07:24 PM
PHP & Radius/PAM authentication etron Programming 1 10-16-2003 03:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration