Unable to login using Ubuntu Users
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:/
setting.py:
AUTHENTICATION_BACKENDS = ( 'dpam.backends.PAMBackend', ) PAM_IS_STAFF = True PAM_IS_SUPERUSER = True
Hi There,
Can you please respond me on this issue ? I want to implement this feature by next week.
Thanks, Amit
Hello,
Anyone there available to look into this issue? Any updates ?
Regards, Amit
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.
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