On Aug 3, 3:06 pm, Johann Spies <johann.sp...@gmail.com> wrote: > I want to do have a website on which I can register a few usernames. > Only they may authentiicate and they must authenticate against a > central ldap server.
> auth.settings.login_methods=[ldap_auth(server='stbldap01.sun.ac.za',base_dn='ou=users,O=SU', > mode='cn', secure=True)] This is the right type of line then. > When I register a user I don't want the user to enter a password > because when the user logs in in future the password must be checked > against the hash in the LDAP tree. > db.Field("password",'password',readable=False, label="Password"), Add writable=False to make it not show in the register form. > t = auth.settings.table_user > t.password.requires = CRYPT() # password will be stored hashed Why bother since you're not storing password locally? > So when I register myself (with or > without a password on registration) I cannot log in afterwords. All > my logins ends with "Invalid login". How can I find out what went > wrong? Is ther some sort of log somewhere? My guess is that this is an LDAP failure. Try the LDAP login from the CLI on the same machine as the server (to check for Firewall issues). The relevant string to test from what you have above is: ldapwhoami -x -D cn=username,ou=users,O=SU -W -H ldaps://stbldap01.sun.ac.za:389 (replace 'username' with your username) If you get a working LDAP connection string, then we can let you know how to do this within ldap-auth (which may require amending the ldap- auth to cater for the option(s) you need) Best Wishes, Fran. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---