Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ldapcherryd command execution error #57

Open
yule-sun opened this issue Nov 5, 2019 · 4 comments
Open

ldapcherryd command execution error #57

yule-sun opened this issue Nov 5, 2019 · 4 comments

Comments

@yule-sun
Copy link

yule-sun commented Nov 5, 2019

[root@ZZ-LDAP01 ~]# /usr/local/bin/ldapcherryd
Traceback (most recent call last):
File "/usr/local/bin/ldapcherryd", line 11, in
load_entry_point('ldapcherry==1.1.1', 'console_scripts', 'ldapcherryd')()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 489, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2852, in load_entry_point
return ep.load()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2443, in load
return self.resolve()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/init.py", line 2449, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/local/lib/python2.7/site-packages/ldapcherry-1.1.1-py2.7.egg/ldapcherry/init.py", line 20, in
from ldapcherry.exceptions import *
File "/usr/local/lib/python2.7/site-packages/ldapcherry-1.1.1-py2.7.egg/ldapcherry/exceptions.py", line 9, in
import cherrypy
File "/usr/local/lib/python2.7/site-packages/CherryPy-17.4.2-py2.7.egg/cherrypy/init.py", line 66, in
from ._cperror import (
File "/usr/local/lib/python2.7/site-packages/CherryPy-17.4.2-py2.7.egg/cherrypy/_cperror.py", line 129, in
from more_itertools import always_iterable
File "build/bdist.linux-x86_64/egg/more_itertools/init.py", line 1, in
File "/usr/local/lib/python2.7/site-packages/more_itertools-7.2.0-py2.7.egg/more_itertools/more.py", line 340
def _collate(*iterables, key=lambda a: a, reverse=False):

How to fix it ,please

@yule-sun
Copy link
Author

yule-sun commented Nov 8, 2019

Configuration error, wrong credentials, unable to connect to ldap with 'cn=Manager,dc=ldap,dc=idpbg,dc=com'
uncaught exception: [{'desc': u'Invalid credentials'}]
Python Exception:
Traceback (most recent call last):

File "/usr/local/lib/python2.7/site-packages/ldapcherry-1.1.1-py2.7.egg/ldapcherry/exceptions.py", line 229, in ret
return func(self, *args, **kwargs)

File "/usr/local/lib/python2.7/site-packages/ldapcherry-1.1.1-py2.7.egg/ldapcherry/init.py", line 895, in login
auth = self._auth(login, password)

File "/usr/local/lib/python2.7/site-packages/ldapcherry-1.1.1-py2.7.egg/ldapcherry/init.py", line 356, in _auth
ret1 = self.backends[b].auth(user, password) or ret1

File "/usr/local/lib/python2.7/site-packages/ldapcherry-1.1.1-py2.7.egg/ldapcherry/backend/backendLdap.py", line 402, in auth
binddn = self._get_user(self._byte_p2(username), NO_ATTR)

File "/usr/local/lib/python2.7/site-packages/ldapcherry-1.1.1-py2.7.egg/ldapcherry/backend/backendLdap.py", line 315, in _get_user
r = self._search(self._byte_p2(user_filter), attrs, self.userdn)

File "/usr/local/lib/python2.7/site-packages/ldapcherry-1.1.1-py2.7.egg/ldapcherry/backend/backendLdap.py", line 275, in _search
ldap_client = self._bind()

File "/usr/local/lib/python2.7/site-packages/ldapcherry-1.1.1-py2.7.egg/ldapcherry/backend/backendLdap.py", line 247, in _bind
self._exception_handler(e)

File "/usr/local/lib/python2.7/site-packages/ldapcherry-1.1.1-py2.7.egg/ldapcherry/backend/backendLdap.py", line 244, in _bind
ldap_client.simple_bind_s(self.binddn, self.bindpassword)

File "/usr/local/lib/python2.7/site-packages/python_ldap-3.2.0-py2.7-linux-x86_64.egg/ldap/ldapobject.py", line 446, in simple_bind_s
resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)

File "/usr/local/lib/python2.7/site-packages/python_ldap-3.2.0-py2.7-linux-x86_64.egg/ldap/ldapobject.py", line 751, in result3
resp_ctrl_classes=resp_ctrl_classes

File "/usr/local/lib/python2.7/site-packages/python_ldap-3.2.0-py2.7-linux-x86_64.egg/ldap/ldapobject.py", line 758, in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)

File "/usr/local/lib/python2.7/site-packages/python_ldap-3.2.0-py2.7-linux-x86_64.egg/ldap/ldapobject.py", line 331, in _ldap_call
reraise(exc_type, exc_value, exc_traceback)

File "/usr/local/lib/python2.7/site-packages/python_ldap-3.2.0-py2.7-linux-x86_64.egg/ldap/ldapobject.py", line 315, in _ldap_call
result = func(*args,**kwargs)

INVALID_CREDENTIALS: {'desc': u'Invalid credentials'}

@kakwa
Copy link
Owner

kakwa commented Nov 16, 2019

Not sure about the first comment issue.

But for the second comment, it looks like the credentials to your ldap server are wrong. I would advice you check if these are correct using something like ldapsearch (https://serverfault.com/questions/514870/how-do-i-authenticate-with-ldap-via-the-command-line), to make sure these credentials are okay.

If you are not able to bind using ldapsearch and the same credentials, it might be an issue with ldapcherry and we will look into it deeper then. But for now, please check if the credentials are okay.

@petersont4
Copy link

petersont4 commented Nov 18, 2019

The first comment issue is caused if you installed LdapCherry using python2. Use python3 when installing and it resolves the issue.

@woodcockjosh
Copy link

Using python3 solved it for me. But I would suggest an update to the docs then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants