{"id":946,"date":"2012-08-14T14:02:27","date_gmt":"2012-08-14T13:02:27","guid":{"rendered":"https:\/\/myworldofit.net\/?p=946"},"modified":"2012-08-14T14:02:27","modified_gmt":"2012-08-14T13:02:27","slug":"moodle-and-ldap-authentication-login-doesnt-work","status":"publish","type":"post","link":"https:\/\/myworldofit.net\/?p=946","title":{"rendered":"Moodle and LDAP authentication &#8211; login doesn\u2019t work!"},"content":{"rendered":"<p style=\"text-align: center;\"><a href=\"https:\/\/myworldofit.net\/wp-content\/uploads\/2012\/08\/adusernamemoodle.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-947\" src=\"https:\/\/myworldofit.net\/wp-content\/uploads\/2012\/08\/adusernamemoodle.png\" alt=\"\" width=\"596\" height=\"113\" srcset=\"https:\/\/myworldofit.net\/wp-content\/uploads\/2012\/08\/adusernamemoodle.png 745w, https:\/\/myworldofit.net\/wp-content\/uploads\/2012\/08\/adusernamemoodle-300x56.png 300w\" sizes=\"auto, (max-width: 596px) 100vw, 596px\" \/><\/a><\/p>\n<p style=\"text-align: center;\">When setting up a new Moodle install with LDAP authentication I was finding that my test users wen&#8217;t able to login with the normal Active Directory user name\/password (sAMAccountName). After a little playing I found that they could login fine if they used what is known as the container name (cn).<\/p>\n<p style=\"text-align: center;\">After a little digging it turns out this is one of the big &#8216;gotchas&#8217; about Moodle and LDAP in that the default Moodle LDAP setup goes for the <strong>cn user attribute<\/strong> as the username instead of the <strong>sAMAccountName user attribute<\/strong> as you would expect.<\/p>\n<p style=\"text-align: center;\">Simple solution is to go into the LDAP authentication on your Moodle install and\u00a0put in <strong>samaccountname<\/strong> as you see above in the box <strong>&#8216;User attribute&#8217;<\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When setting up a new Moodle install with LDAP authentication I was finding that my test users wen&#8217;t able to login with the normal Active Directory user name\/password (sAMAccountName). After a little playing I found that they could login fine if they used what is known as the container name (cn). After a little digging it turns out this is&#8230; <a class=\"read-more\" href=\"https:\/\/myworldofit.net\/?p=946\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[20],"tags":[126,125,124],"series":[],"class_list":["post-946","post","type-post","status-publish","format-standard","hentry","category-software","tag-active-directory","tag-ldap","tag-moodle"],"_links":{"self":[{"href":"https:\/\/myworldofit.net\/index.php?rest_route=\/wp\/v2\/posts\/946","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myworldofit.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myworldofit.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myworldofit.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myworldofit.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=946"}],"version-history":[{"count":1,"href":"https:\/\/myworldofit.net\/index.php?rest_route=\/wp\/v2\/posts\/946\/revisions"}],"predecessor-version":[{"id":948,"href":"https:\/\/myworldofit.net\/index.php?rest_route=\/wp\/v2\/posts\/946\/revisions\/948"}],"wp:attachment":[{"href":"https:\/\/myworldofit.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=946"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myworldofit.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=946"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myworldofit.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=946"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/myworldofit.net\/index.php?rest_route=%2Fwp%2Fv2%2Fseries&post=946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}