Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a django application where users should be able to login according to the system's shadow database. I found this login backend which uses python-pam, as far as I can tell. While installing the former makes the login work on my local machine (Arch linux) it doesn't on the server where I want the application to run (Debian Squeeze).

The thing is, I don't know how to dig for the error. The authentication just returns false and I cannot find any log files for the PAM library on the system. Where would you start to dig?

Update: I found that /var/log/auth.log is used by pam. The following appears when trying to login. (oli is my username):

Jan  4 15:09:13 pc13620 python: pam_tally(login:auth): unknown option: pam_faildelay.so
Jan  4 15:09:13 pc13620 python: pam_tally(login:auth): unknown option: delay=3000000
Jan  4 15:09:13 pc13620 python: pam_tally(login:auth): Error opening /var/log/faillog for update
Jan  4 15:09:13 pc13620 unix_chkpwd[8070]: check pass; user unknown
Jan  4 15:09:13 pc13620 unix_chkpwd[8070]: password check failed for user (oli)
Jan  4 15:09:13 pc13620 python: pam_unix(login:auth): authentication failure; logname=  uid=33 euid=33 tty= ruser= rhost=  user=oli
Jan  4 15:09:13 pc13620 unix_chkpwd[8071]: check pass; user unknown
Jan  4 15:09:13 pc13620 unix_chkpwd[8071]: password check failed for user (oli)
share|improve this question
    
Try to post a simplified version of your code here? –  totaam Jan 4 '12 at 14:00
    
I added logs that I found. –  janoliver Jan 4 '12 at 14:07
    
Have you checked the version of your Django installed on those OS as well as Python version, web server version and database server version? Making sure they are the same may be helpful. –  xiaohan2012 Jan 4 '12 at 16:00

1 Answer 1

up vote 1 down vote accepted

I solved it by installing libpam-unix2 from debian backports and inserting the following lines into /etc/pam.d/login:

session required pam_unix2.so
auth required pam_unix2.so nullok
account required pam_unix2.so
share|improve this answer
    
Don't forget to accept your answer :) –  Mat Mar 4 '12 at 17:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.