Modify

Opened 17 years ago

#1907 new defect

bind_passwd special characters

Reported by: candrews@… Owned by: Emmanuel Blot
Priority: normal Component: LdapPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

My LDAP server needs to have an authenticated bind. I know this works, as I have other services on the same machine that use this login information. BTW, the LDAP server is Active Directory.

Here is the login information from the [ldap] section of trac.ini:

bind_user=TRACUSER@domain.com
bind_passwd=4@x3r63ks!

I suspect those special characters, either the @ signs, the !, or something else, is messing with the plugin's ability to authenticate, as when I hit trac with the ldapplugin enabled, I get this error:

Traceback (most recent call last):
  File "/var/lib/python-support/python2.5/trac/web/main.py", line 406, in dispatch_request
    dispatcher.dispatch(req)
  File "/var/lib/python-support/python2.5/trac/web/main.py", line 183, in dispatch
    req.perm = PermissionCache(self.env, req.authname)
  File "/var/lib/python-support/python2.5/trac/perm.py", line 263, in __init__
    self.perms = PermissionSystem(env).get_user_permissions(username)
  File "/var/lib/python-support/python2.5/trac/perm.py", line 227, in get_user_permissions
    for perm in self.store.get_user_permissions(username):
  File "/var/lib/python-support/python2.5/trac/perm.py", line 106, in get_user_permissions
    subjects += list(provider.get_permission_groups(username))
  File "build/bdist.linux-i686/egg/ldapplugin/api.py", line 108, in get_permission_groups
    ldapgroups = self._get_user_groups(username)
  File "build/bdist.linux-i686/egg/ldapplugin/api.py", line 149, in _get_user_groups
    ldap_groups = self._ldap.get_groups()
  File "build/bdist.linux-i686/egg/ldapplugin/api.py", line 541, in get_groups
    groups = self.get_dn(self.basedn, 'objectclass=' + self.groupname)
  File "build/bdist.linux-i686/egg/ldapplugin/api.py", line 564, in get_dn
    sr = self._search(basedn, filterstr, ['dn'], ldap.SCOPE_SUBTREE)
  File "build/bdist.linux-i686/egg/ldapplugin/api.py", line 647, in _search
    self._open()
  File "build/bdist.linux-i686/egg/ldapplugin/api.py", line 640, in _open
    raise TracError("Unable to open LDAP cnx: %s" % e[0]['desc'])
TracError: Unable to open LDAP cnx: Invalid credentials

I suspect that I may need to escape certain characters somehow, but I haven't been able to find (or figure out) what to do.

Attachments (0)

Change History (0)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Emmanuel Blot.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.