Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

How to Configure OpenERP 7.0 to connect to LDAP ?

By
Enyx SA
on 2/6/13, 1:02 PM 16,437 views

I can't find any documentation on the Internet explaining how to Setup OpenERP v7.0 to use LDAP as an user database.

It seems like there is an auth_ldap module in the addons directory, but I can't find anything to configure this.

Best Regards

I did the above, but how can i check the Connection between OPENERP and LDAP server is success or not.

Lithin T
on 8/16/13, 5:51 AM
1
Ong Li Wee
On 2/7/13, 12:47 AM

The ldap authentication works great for a user that already exixts in openerp, but if it has to create a new user from ldap or active directory you get an error message. File "/opt/openerp/server/openerp/addons/auth_ldap/users_ldap.py", line 255, in login cr, SUPERUSER_ID, conf, login, entry) File "/opt/openerp/server/openerp/addons/auth_ldap/users_ldap.py", line 195, in get_or_create_user default={'active': True}) TypeError: copy() got an unexpected keyword argument 'default'

Dwight Butler
on 3/13/13, 4:33 PM

Face the same error ...

alancham
on 8/29/13, 4:43 AM
1

Once installed, the ldap module will add a new table inside the "company" records. You'll be able to access through:

Settings > Companies

You select your company and then go on the configuration tab. You'll then enter your connection info.

Step by step screenshot to be given when enough karma :s

is there anywhere else a step by step configuration guide available?

sulzi
on 3/18/13, 8:47 AM
1
alancham
On 8/29/13, 4:54 AM

I downloaded the openLDAP virtualbox version from turnkeylinux.org, import it into virtualbox.

after that add a new group names people, so that i got ou=people, and add an user under ou=people.

then i follow the setting from this link http://www.zbeanztech.com/blog/can-joomla-users-login-openerp-using-ldap

below are some setting i copy from that link:

OpenERP-LDAP

 6.Install python package,otherwise users_ldap module in openerp will not function
            sudo apt-get install python-ldap

 7.Install users_ldap module in the openerp which comes by default with openerp-server addons

 8.Configuration at the openerp side,
       "Administration-->Companies-->Companies",Your company profile and enter following details in ldap parametres
          LDAP Server Address : your machine IP (127.0.0.1 <-if ldap running on the same server)
          LDAP Server Port   : 389
         LDAP Bind Dn   :   cn=admin,dc=example,dc=com (if you had changed dc component then enter the same here and for followings)
         LDAP password  :   Your admin ldap password
         LDAP Base      :   ou=people,dc=example,dc=com        <-- change 'dc' here
         LDAP filter    :  (uid=%s)
         create user    : checked
         Model User     : demo user
         sequence      :  10

then you can login if your ldap user is exist in openERP, but got ERROR if the new user your create in openLDAP but not in openERP, hope some one can solve this problem.

Thank you.

best regards

I found the problem and solved this ... in addons/auth_ldap/users_ldap.py, line 225, the ldap_server default they hardcode it to 127.0.0.1, but my ldap server is in another server, so I change this default to my ldap server's IP, then I can get the new user information from ldap server, this solved the default() error. so some one have to modify this programming method so that it will get the ldap server IP from users setting if the setting is existed. but another thing is if I create a new user in openERP, it will not update to ldap server ???

alancham
on 8/30/13, 1:03 AM

Thank you! I was stuck wondering what should I enter in the filter field.

Manuel Villar Guijarro
on 2/18/14, 3:05 PM

I am getting " LDAP bind failed " error. My values are --> ldapbindin --> cn=admin,dc=mail.kgtest,dc=com, ldap base --> ou=admin,dc=mail.kgtest,dc=com . I don't know the cn,dc,dc values. Kindly help me what value need to give instead of the above value.

sengottuvel
on 4/29/14, 5:29 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 2/6/13, 1:02 PM
Seen: 16437 times
Last updated: 3/16/15, 8:10 AM