thanks. now i installed it.
On 25 Aug., 11:52, mdipierro <mdipie...@cs.depaul.edu> wrote:
> Do you have python ldap API installed? It does not come with web2py.
>
> On Aug 25, 4:41 am, max <dulip.withan...@gmail.com> wrote:
>
> > I tried to add the following code in the db.py
>
> > from gluon.contrib.login_methods.ldap_auth import ldap_auth
> > auth.settings.login_methods = [ldap_auth(mode='ad',
> > server='my.domain.controller', base_dn='ou=Users,dc=domain,dc=com')]
>
> > but it gives the failure.
> > gluon.contrib.login_methods.ldap_auth import ldap_auth File "/srv/www/
> > web2py/gluon/contrib/login_methods/ldap_auth.py", line 1, in
> > <module> import ldapImportError: No module named ldap
>
> > But if i insert the code in the controller the import shows no
> > failures.
> > does anybody have any idea?
>
> > On 7 Aug., 15:32, max <dulip.withan...@gmail.com> wrote:
>
> > > thanks, fran
>
> > > On 7 Aug., 14:10, Fran <francisb...@googlemail.com> wrote:
>
> > > > On Aug 7, 8:19 am, max <dulip.withan...@gmail.com> wrote:
>
> > > > > How can i configure the Active directory authentification using CAS?
> > > > > should i have to uncomment and edit the
> > > > > ""
> > > > > auth.settings.login_methods.append(ldap_auth
> > > > > (mode='ad',server='my.domain.controller',base_dn="ou=Users,dc=domain,dc=com",bind_dn="cn=Administrator,ou=Users,d
> > > > > c=domain,dc=com",bind_pass="password"))
> > > > > ""
> > > > > or is there anyway to configure it application based?
>
> > > > You can use AD without CAS...just for a single application...this is
> > > > the usual usage.
> > > > I don't have experience of using it with CAS...I just downloaded the
> > > > CAS appliance & it doesn't seem to use Auth, so would need converting
> > > > to use Auth before it could be made to work with ldap_auth.
>
> > > > The best docs for LDAP authentication are currently within the source
> > > > (the new book also has some, but the source is fine):
> > > > gluon/contrib/login_methods/ldap_auth.py
>
> > > > So to use AD, you need to have 2 lines in your model (on top of the
> > > > usual Auth lines):
> > > > from gluon.contrib.login_methods.ldap_auth import ldap_auth
> > > > auth.settings.login_methods.append(ldap_auth(mode='ad',
> > > > server='my.domain.controller', base_dn='ou=Users,dc=domain,dc=com'))
>
> > > > This mode means that password is cached in DB & so you can access
> > > > using last password known to the app in case AD is down.
> > > > To not have this method, make the 2nd line instead:
> > > > auth.settings.login_methods = [ldap_auth(mode='ad',
> > > > server='my.domain.controller', base_dn='ou=Users,dc=domain,dc=com')]
>
> > > > F
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to
web2py+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---