3

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)
  • 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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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