- i have to create user authentication using python-ldap. after googling around and trying out stuffs, this is the final code for you to use. please remember to adjust the user_dn, and base_dn accordingly to the format used in your ldap server.0 reads0 comments-0 reads0 comments-You must read the article before you can comment on it.Be the first to post a comment on this article.