Frappe V 7.1-Beta: LDAP Dependancies

Hello,

In Frappe V7.1-beta we introduced LDAP-based login. If update broke in between due to LDAP dependency, please install system dependencies

  • Ubuntu:
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev
  • CentOS/RHEL 6,
sudo yum install python-devel
sudo yum install openldap-devel
  • On OSX,
xcode-select --install

or

from frappe-bench

./env/bin/pip install python-ldap --global-option=build_ext --global-option="-I$(xcrun --show-sdk-path)/usr/include/sasl"

Then,

frappe-bench > ./env/bin/pip install python-ldap

Ref: http://stackoverflow.com/questions/4768446/i-cant-install-python-ldap

1 Like

@saurabh6790 can you make a bench patch for this?

1 Like

@saurabh6790 Hi there, for some reason after successfully update, can’t see the Integration Module, see following pic

Can u please have a look?

Thx

Hi,

I followed the instruction, even upgraded to latest python-ldap and setuptools, but i still get the request to install python-ldap when trying to add the config.

frappe@pink:~/frappe-bench$ sudo pip install python-ldap --upgrade
The directory '/home/frappe/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/frappe/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting python-ldap
Collecting setuptools (from python-ldap)
  Downloading setuptools-28.6.0-py2.py3-none-any.whl (471kB)
    100% |████████████████████████████████| 481kB 1.3MB/s 
Installing collected packages: setuptools, python-ldap
  Found existing installation: setuptools 25.1.6
    Uninstalling setuptools-25.1.6:
      Successfully uninstalled setuptools-25.1.6
  Found existing installation: python-ldap 2.4.22
    DEPRECATION: Uninstalling a distutils installed project (python-ldap) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling python-ldap-2.4.22:
      Successfully uninstalled python-ldap-2.4.22
Successfully installed python-ldap-2.4.27 setuptools-28.6.0
1 Like

miss the installation,
run ./env/bin/pip install python-ldap from frappe bench

1 Like

i already did, but it still doesn’t work.

Do an update and try again

thanks @vjFaLk
After pulling new update, the error is now gone.

By now, i’d like to know how to login as ldap users, cause i don’t see the field for login as ldap at login page? other saying, how could i import existing LDAP users into ERPNext?

In addition, i have another question, is that possible to add a specific LDAP setting for website users as customer users?
ex: i have two LDAP OU
ou=users,dc=company,dc=com
ou=customers,dc=company,dc=com

For employee login, LDAP will only allow from “ou=users”, and for customer login or website login, only “ou=customers” is allowed.

Thanks in advanced.

i found the answer for my first question here

Basically, i missed to integration Ldap service after configuration LDAP setting.

still waiting idea about last question.
Thanks a lot.

This worked!

Hi,

Please share your learning, just a few sentences…

What did not work and what you did to resolve it?

And what version - just run ‘bench version’ if you are self hosted.

Thanks!

1 Like

I’m using bench 4.1.0 and I wanted to connect ERPNext through the Yunohost.

I followed the instruction given here for LDAP setup - How to configure yunohost.org LDAP server for Frappe / ERPNext

When it gave me the error, I logged in as a default frappe user (I gave another name while installing) and update the bench with bench update and ensured that I’m on master chain by adding “bench switch-to-master”.

It was still giving errors so I followed Saurabh’s suggestion as ran - ./env/bin/pip install python-ldap from the frappe-bench.

And that it started to work.

1 Like

Excellent contribution thanks!

1 Like

Hi all,

I`m having the same LDAP not installed prompt in ERPNext when trying to configure LDAP: LDAP not installed error when configuring LDAP integration, although it`s actually installed

I tried all of the suggestions here but without any help. Any ideas on what to do next? Or is there a log where I could look to get more clues about what is wrong?

Try switching bench to master by “bench switch-to-master” and see whether it gets fixed.

OK, but why would I not be on the master branch? Does the Easy install method install something else?

Also, can this command mess anything up with the ERPNext installation?

OK, I switched to master but that changed nothing and LDAP still throws the same error. I am now running:
ERPNext: v10.1.64 (master)
Frappe Framework: v10.1.56 (master)

Any other ideas?

Is anyone else successfully synchronizing ERPNext with LDAP in the last version?