LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Closed Thread
 
LinkBack Search this Thread
Old 06-13-2005, 05:39 PM   #1
jrsugar
LQ Newbie
 
Registered: Jun 2005
Posts: 6

Rep: Reputation: 0
Question Why is pam_authenticate() returning "Authentication Failure" for valid user/passwd?


I am new to managing my own Redhat Linux ES box.

I have added a login capability to a program I have written, asking the user to log in using a LINUX username and to supply the correct LINUX password. I have gotten a lot of help from pwauth source code.

The problem is, I can't get password authentication to work on my standalone LINUX ES box. I first wrote my user password authentication routine to use the routines getpwnam() and crypt() but that didn't work since /etc/passwd seems to only contain "x" for passwords. I see that /etc/shadow has the real password in it and am guessing my box is configured to use PAM for user password authentication.

I have modified my program to instead use PAM for password authentication the same way pwauth does: pam_start() followed by pam_authenticate(). The problem is that pam_authenticate always returns 'Authentication failure' even though I am using a valid username and password.

Is it possible my system is using shadow passwords without PAM?

I can supply my source code if it would help.

Thank you!
Julie
 
Old 06-14-2005, 08:18 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 39,856

Rep: Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121Reputation: 1121
Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"passwd: Authentication token manipulation error" Neowulf Linux - Newbie 7 06-21-2009 06:23 PM
Why is pam_authenticate() returning "Authentication Failure" for valid user/passwd? jrsugar Linux - Enterprise 3 08-03-2007 09:27 AM
Why is pam_authenticate() returning "Authentication Failure" for valid user/passwd? jrsugar Linux - Newbie 1 06-14-2005 07:51 PM
Why is pam_authenticate() returning "Authentication Failure" for valid user/passwd? jrsugar Linux - Newbie 2 06-14-2005 02:49 PM
Dial up Authentication failure for ISP that has "@" in the user name. raypuddy Linux - General 2 06-06-2005 03:27 AM


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

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration