LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-20-2011, 09:49 PM   #1
ichrispa
Member
 
Registered: Mar 2005
Location: Dresden, Germany
Distribution: OpenSuse 11.2/3, Debian 5.0 , Debian 1.3.1, OpenBSD
Posts: 277

Rep: Reputation: 32
Authenticating over PAM/NIS with php


Hi everyone,

I am trying to use a webbased groupware solution in an already existing NIS environment. The server the php-scripts are running on is already fully content with the nis setup - users can auth without problems using for example login or su.

However when I run the php script calling pam_auth as an unpriviledged user (here as webserver), the log always states that

Code:
Mar 21 03:27:10 grpwr unix_chkpwd[30335]: check pass; user unknown
Mar 21 03:27:10 grpwr unix_chkpwd[30335]: password check failed for user (<username>)
Mar 21 03:27:10 grpwr php: pam_unix(php:auth): authentication failure; logname=<logname> uid=33 euid=33 tty= ruser= rhost=  user=<username>
When I run the same script as root, it works just fine.

For test purposes I have copied the /etc/pam.d/su to /etc/pam.d/php and added the option

Code:
pam.servicename = "php"
to /etc/php5/<instance>/php.ini.

Interestingly enough, when logged in as user www-data, I can still call su and become someone else. So its apparently just php that is denied access to pam.

I am kind of puzzled here. How can I get an unpriviledged user to authenticate another user using PAM?

Thanks in advance.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fedora 11 gui logon not authenticating (not root) pam authentication to kde masterDL Fedora 2 04-04-2010 10:31 PM
Ubuntu 8.04 / LDAP / NSS / PAM - not sharing shadow password hence not authenticating fuzzyworm Linux - Server 5 01-01-2009 03:29 PM
centralized logins without PAM or NIS eric_f Slackware 0 07-12-2008 12:14 AM
how to stop pam from authenticating su slug420 Linux - Security 2 08-13-2004 07:55 AM
ProFTPd. Authenticating using /etc/passwd instead of PAM wenberg Linux - Software 2 01-04-2004 10:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:30 AM.

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