User Authentication

A

Anurag

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
 
T

Tim Golden

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
 
A

Adam Tauno Williams

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
 
A

Anurag

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
 
T

Tim Golden

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
 
A

Anurag

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
 
T

Tim Golden

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
 
M

Michael Ströder

Anurag said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top