Hello, > -----Original Message----- > From: [email protected] On Behalf Of Aaron Laws > Sent: 20 March 2012 14:59 > To: [email protected] > Subject: [Trac] Authentication > > I'm trying to use the tracldapauth 1.0 plugin ( > http://trac-hacks.org/wiki/LDAPAuthPlugin ), but I'm having trouble. > > I followed the directions at > http://trac-hacks.org/wiki/LDAPAuthPlugin and took a look at > http://trac-hacks.org/wiki/TracLdapAuthPlugin . > > I'm also using LoginModule. After I press enter to log in > (having entered my credentials), I get the following output > in plain text: > {{{ > Traceback (most recent call last): > File "build\bdist.win32\egg\trac\web\api.py", line 441, in > send_error > data, 'text/html') > File "build\bdist.win32\egg\trac\web\chrome.py", line 825, > in render_template > message = req.session.pop('chrome.%s.%d' % (type_, i)) > File "build\bdist.win32\egg\trac\web\api.py", line 216, in > __getattr__ > value = self.callbacks[name](self) > File "build\bdist.win32\egg\trac\web\main.py", line 306, in > _get_session > return Session(self.env, req) > File "build\bdist.win32\egg\trac\web\session.py", line 201, > in __init__ > if req.authname == 'anonymous': > File "build\bdist.win32\egg\trac\web\api.py", line 216, in > __getattr__ > value = self.callbacks[name](self) > File "build\bdist.win32\egg\trac\web\main.py", line 165, in > authenticate > authname = authenticator.authenticate(req) > File "build\bdist.win32\egg\acct_mgr\web_ui.py", line 489, in wrap > return func(self, *args, **kwds) > File "build\bdist.win32\egg\acct_mgr\web_ui.py", line 510, > in authenticate > user = self._remote_user(req) > File "build\bdist.win32\egg\acct_mgr\web_ui.py", line 790, > in _remote_user > if acctmgr.check_password(user, password) == True: > File "build\bdist.win32\egg\acct_mgr\api.py", line 306, in > check_password > valid = store.check_password(user, password) > File "build\bdist.win32\egg\ldapauth\store.py", line 21, in > check_password > bind_name = (self.bind_dn%user).encode('utf8') > TypeError: not all arguments converted during string formatting > }}} > It looks like my "bind_dn" is incorrect? The bind_dn I'm using is > DC=<host>,DC=com > I know little about ldap (like what a bind_dn is...is this a > connection string of some kind?) and I'm unsure where to > proceed. Do I need to learn more about our ldap installation here? > > Thanks in advance for your help.
You do not say how you have Trac setup but looking at the above you are on windows. Are you using apache? In which case, why not use apache for the LDAP (Active Directory?) authentication? Anyway, LDAP is not trivial and I only have knowledge of getting apache to authenticate against Active Directory. If this is the same for you, I recommend getting hold of the free version of PowerGui (powergui.org) and the Active Directory "scriptlets", then do a search against your own username to see what you get back: Power Gui > Active Directory > Search > Find a user... Once it has found your data, right-click and select Export > to csv... Then you can use e.g. excel to view the data. This will help you to work out how your local LDAP is configured. Good luck, ~ mark c -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
