Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #8206 > unrolled thread

User Authentication

Started byAnurag <anurag26@gmail.com>
First post2011-06-22 06:34 -0700
Last post2011-06-24 09:23 +0200
Articles 8 — 4 participants

Back to article view | Back to comp.lang.python


Contents

  User Authentication Anurag <anurag26@gmail.com> - 2011-06-22 06:34 -0700
    Re: User Authentication Tim Golden <mail@timgolden.me.uk> - 2011-06-22 15:00 +0100
    Re: User Authentication Adam Tauno Williams <awilliam@whitemice.org> - 2011-06-22 10:01 -0400
      Re: User Authentication Anurag <anurag26@gmail.com> - 2011-06-22 22:02 -0700
        Re: User Authentication Tim Golden <mail@timgolden.me.uk> - 2011-06-23 08:52 +0100
          Re: User Authentication Anurag <anurag26@gmail.com> - 2011-06-23 08:07 -0700
            Re: User Authentication Tim Golden <mail@timgolden.me.uk> - 2011-06-23 17:07 +0100
            Re: User Authentication Michael Ströder <michael@stroeder.com> - 2011-06-24 09:23 +0200

#8206 — User Authentication

FromAnurag <anurag26@gmail.com>
Date2011-06-22 06:34 -0700
SubjectUser Authentication
Message-ID<a69464bd-66e7-4855-8ca6-088ece799878@gv8g2000vbb.googlegroups.com>
Hi All,

I am working on application which needs to do a authentication against
LDAP, if LDAP not installed then local system account (administrator
user in windows and root user in Linux). This should work on both
Windows and Linux.

Which library I should use for that.

Regards,
Anurag

[toc] | [next] | [standalone]


#8209

FromTim Golden <mail@timgolden.me.uk>
Date2011-06-22 15:00 +0100
Message-ID<mailman.279.1308751235.1164.python-list@python.org>
In reply to#8206
On 22/06/2011 14:34, Anurag wrote:
> Hi All,
>
> I am working on application which needs to do a authentication against
> LDAP, if LDAP not installed then local system account (administrator
> user in windows and root user in Linux). This should work on both
> Windows and Linux.
>
> Which library I should use for that.

python-ldap seems the obvious choice:


   http://www.python-ldap.org/

TJG

[toc] | [prev] | [next] | [standalone]


#8211

FromAdam Tauno Williams <awilliam@whitemice.org>
Date2011-06-22 10:01 -0400
Message-ID<mailman.280.1308751416.1164.python-list@python.org>
In reply to#8206
On Wed, 2011-06-22 at 06:34 -0700, Anurag wrote:
> Hi All,
> 
> I am working on application which needs to do a authentication against
> LDAP, if LDAP not installed then local system account (administrator
> user in windows and root user in Linux). This should work on both
> Windows and Linux.

See python-ldap

[toc] | [prev] | [next] | [standalone]


#8264

FromAnurag <anurag26@gmail.com>
Date2011-06-22 22:02 -0700
Message-ID<409b39e2-be8f-43c1-989a-b0ba862c3ba6@b21g2000yqc.googlegroups.com>
In reply to#8211
On Jun 22, 7:01 pm, Adam Tauno Williams <awill...@whitemice.org>
wrote:
> On Wed, 2011-06-22 at 06:34 -0700, Anurag wrote:
> > Hi All,
>
> > I am working on application which needs to do a authentication against
> > LDAP, if LDAP not installed then local system account (administrator
> > user in windows and root user in Linux). This should work on both
> > Windows and Linux.
>
> See python-ldap

I looked into python-ldap, it supports ldap authentication. But I
didn't find anything that support local system account authentication
when no LDAP both in windows and Linux.

Ond more thing, somebody suggested me to use PAM. Is it a good choice
and whether it supports both Windows and Linux? Please let me know
which is best to use.

Regards,
Anurag

[toc] | [prev] | [next] | [standalone]


#8280

FromTim Golden <mail@timgolden.me.uk>
Date2011-06-23 08:52 +0100
Message-ID<mailman.318.1308815652.1164.python-list@python.org>
In reply to#8264
On 23/06/2011 06:02, Anurag wrote:
> On Jun 22, 7:01 pm, Adam Tauno Williams<awill...@whitemice.org>
> wrote:
>> On Wed, 2011-06-22 at 06:34 -0700, Anurag wrote:
>>> Hi All,
>>
>>> I am working on application which needs to do a authentication against
>>> LDAP, if LDAP not installed then local system account (administrator
>>> user in windows and root user in Linux). This should work on both
>>> Windows and Linux.
>>
>> See python-ldap
>
> I looked into python-ldap, it supports ldap authentication. But I
> didn't find anything that support local system account authentication
> when no LDAP both in windows and Linux.

If you want local system authentication on Windows, you're going
to need something like this:

 
http://timgolden.me.uk/python/win32_how_do_i/check-a-users-credentials.html

> Ond more thing, somebody suggested me to use PAM. Is it a good choice
> and whether it supports both Windows and Linux? Please let me know
> which is best to use.

I can't speak for Linux, but I can guarantee that PAM won't
take you anywhere on Windows :)

TJG

[toc] | [prev] | [next] | [standalone]


#8306

FromAnurag <anurag26@gmail.com>
Date2011-06-23 08:07 -0700
Message-ID<7d4157cb-618a-4d1c-9b91-32691cc02248@y19g2000prd.googlegroups.com>
In reply to#8280
My application is a web based application for both windows and Linux.
The web part is developed using Django. So if Python does not support
it then any support for local sytem account authentication in Django?

I am looking for a common library for both Linux and Windows. Any help
will be Gr8

Regards,
Anurag

On Jun 23, 12:52 pm, Tim Golden <m...@timgolden.me.uk> wrote:
> On 23/06/2011 06:02, Anurag wrote:
>
> > On Jun 22, 7:01 pm, Adam Tauno Williams<awill...@whitemice.org>
> > wrote:
> >> On Wed, 2011-06-22 at 06:34 -0700, Anurag wrote:
> >>> Hi All,
>
> >>> I am working on application which needs to do a authentication against
> >>> LDAP, if LDAP not installed then local system account (administrator
> >>> user in windows and root user in Linux). This should work on both
> >>> Windows and Linux.
>
> >> See python-ldap
>
> > I looked into python-ldap, it supports ldap authentication. But I
> > didn't find anything that support local system account authentication
> > when no LDAP both in windows and Linux.
>
> If you want local system authentication on Windows, you're going
> to need something like this:
>
> http://timgolden.me.uk/python/win32_how_do_i/check-a-users-credential...
>
> > Ond more thing, somebody suggested me to use PAM. Is it a good choice
> > and whether it supports both Windows and Linux? Please let me know
> > which is best to use.
>
> I can't speak for Linux, but I can guarantee that PAM won't
> take you anywhere on Windows :)
>
> TJG

[toc] | [prev] | [next] | [standalone]


#8310

FromTim Golden <mail@timgolden.me.uk>
Date2011-06-23 17:07 +0100
Message-ID<mailman.327.1308845279.1164.python-list@python.org>
In reply to#8306
On 23/06/2011 16:07, Anurag wrote:
> My application is a web based application for both windows and Linux.
> The web part is developed using Django. So if Python does not support
> it then any support for local sytem account authentication in Django?
>
> I am looking for a common library for both Linux and Windows. Any help
> will be Gr8

The two systems are sufficiently different in this kind of area
that any "common library" will basically consist of code like
this (hand-wavey):

<code>

import sys

if sys.platform.startswith ("win"):
   import win32security
   def is_valid_user (username, password):
     if win32security.LogonUser ( ... )

elif sys.platform.startswith ("linux"):
   import pam
   def is_valid_user (username, password):
     if pam.validate_user (...)

</code>

It's possible someone's put something together already,
but I'm not aware of anything.

TJG

[toc] | [prev] | [next] | [standalone]


#8353

FromMichael Ströder <michael@stroeder.com>
Date2011-06-24 09:23 +0200
Message-ID<iu1e1v$6a0$2@dont-email.me>
In reply to#8306
Anurag wrote:
> My application is a web based application for both windows and Linux.
> The web part is developed using Django. So if Python does not support
> it then any support for local sytem account authentication in Django?
> 
> I am looking for a common library for both Linux and Windows. Any help
> will be Gr8

Doesn't Django provide an abstraction layer for accessing differnt
authentication backends? I guess you have to write/use two different
authentication modules for the two different mechanisms.

A quick search looks promising:

http://www.google.com/search?q=django+ldap+authentication

Ciao, Michael.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web