On Thu, Dec 30, 2010 at 4:41 PM, Marc Aymerich <glicer...@gmail.com> wrote:
> > > On Thu, Dec 30, 2010 at 4:24 PM, Marc Aymerich <glicer...@gmail.com>wrote: > >> >> >> On Thu, Dec 30, 2010 at 6:35 AM, Bill <billchen...@gmail.com> wrote: >> >>> Hi there, >>> >>> I want to know is there any authentication module base on Linux passwd/ >>> shadow file for django? >>> >> >> http://atlee.ca/software/pam/module-index.html >> >> import pam >> from django.contrib.auth.models import User >> >> class PamBackend: >> >> def authenticate(self, username=None, password=None): >> # Check the username/password and return a User. >> if pam.authenticate(username, password, service='login'): >> try: >> return User.objects.get(username=username) >> except User.DoesNotExist: >> pass >> return None >> >> >> > ouch, I misunderstood your question. if you're using mysql as a db backend > for you django project, you can use pam-mysql > http://pam-mysql.sourceforge.net/ for the authentication on your servers. > also you can look for libpam-mysql* package on your distro. repositories . * -- Marc -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.