django-pam icon indicating copy to clipboard operation
django-pam copied to clipboard

Unable to login using Ubuntu Users

Open amitb2050 opened this issue 10 years ago • 4 comments

Hi,

I installed package 'django-pam' using 'python setup.py install', the installation was successful. I added the entry in setting.py (fresh django 1.8.x installation) as below. After that I restarted django server and tried to login into http://admin url page. It was taking some time to reload but the LOGIN FAILED. Moreover, the Django superuser was unable to login into admin. I removed below entry from setting.py and the superuser was able to login. Please help me integrating this package.

setting.py:

AUTHENTICATION_BACKENDS = ( 'dpam.backends.PAMBackend', ) PAM_IS_STAFF = True PAM_IS_SUPERUSER = True

amitb2050 avatar Oct 25 '15 21:10 amitb2050

Hi There,

Can you please respond me on this issue ? I want to implement this feature by next week.

Thanks, Amit

amitb2050 avatar Nov 02 '15 10:11 amitb2050

Hello,

Anyone there available to look into this issue? Any updates ?

Regards, Amit

amitb2050 avatar Nov 16 '15 06:11 amitb2050

Hello, could you provide us with a little more information? Are you able to do use the PAM service from the user that's running the Django app from the command line? pamtester may help you trouble shooting PAM issues.

tehmaze avatar Nov 18 '15 09:11 tehmaze

Hi,

Thanks for your response.

1] I tested the Ubuntu users with 'pamtester' and they are able to login successfully as shown below:

   (pam-dj-test)root@amit-vb-desktop:/media/sf_shared/pam-dj-test/pamtest# pamtester login amit open_session
   Last login: Wed Nov 18 15:21:08 IST 2015 from 192.168.1.25 on pts/16
   Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-24-generic x86_64)

    * Documentation:  https://help.ubuntu.com/

   pamtester: successfully opened a session
   (pam-dj-test)root@amit-vb-desktop:/media/sf_shared/pam-dj-test/pamtest# pamtester login root open_session
   Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-24-generic x86_64)

    * Documentation:  https://help.ubuntu.com/


   The programs included with the Ubuntu system are free software;
   the exact distribution terms for each program are described in the
   individual files in /usr/share/doc/*/copyright.

   Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
   applicable law.

   pamtester: successfully opened a session

2] In setting.py, I add following changes to allow Linux user to login in /admin, but I end up with an error. Moreover, the Django user login also fails. If I comment these line and try login with Django user, it successfully login into dashboard

   AUTHENTICATION_BACKENDS = (
       'dpam.backends.PAMBackend',
   )
   PAM_IS_STAFF = True
   PAM_IS_SUPERUSER = False

Regards, Amit

amitb2050 avatar Nov 18 '15 10:11 amitb2050