Odoo Help

2

0
5 Answers
0
boospy Austria
8/20/19, 10:57 AM

Thanks a lot for the filter, this helps me a lot :)

0
Vianney Adou Côte d'Ivoire
7/28/15, 1:47 PM

It is possible you retrieve your users emails as well as their username.

Do it :

Modify the source code of auth_ldap module.

open users_ldap.py go to map_ldap_attributes methode.

replace this code :

values = { 'name': ldap_entry[1]['cn'][0],

'login': login,

'company_id': conf['company'],

}


by this:

if(ldap_entry[1].has_key('mail')):

values = { 'name': ldap_entry[1]['cn'][0],

'login': login,

'company_id': conf['company'],

'email': ldap_entry[1]['mail'][0],

}

else:

values = { 'name': ldap_entry[1]['cn'][0],

'login': login,

'company_id': conf['company'],

}


best regards.

0
Voathnak Lim Cambodia
4/24/15, 2:20 AM

Hello sulliwan, I just got the same issue here. have you got success can you share your experience. thanks

0
wjn Poland
4/3/13, 7:28 AM

Your filter depends on the LDAP server and what you want as username. With an LDAP browser (search on internet) you can see and check what your LDAP filter and LDAP base should be set to. For example I have "sAMAccountName=%s" as filter and "OU=SBSUsers,OU=Users,OU=MyBusiness,DC=DOMAIN,DC=local" as base. LDAP is on a SBS2011 server. Users can log on to OpenERP with their own username & password.

1 Comment
sulliwane France
4/3/13, 7:36 AM

I use the exact same filter on owncloud ldap-module, and it works great against my ldap server : (&(uid=%s)(memberOf=cn=share,ou=Groups,dc=ip-198-27-46,dc=net)). If changing the ldap base to cn=share,ou=Groups,dc=ip-198-27-46,dc=net, the authentication stop working...thx for your anwser

Ask a Question
Writer
Keep Informed
1 follower(s)
About This Community

This platform 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.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now