<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hi,</p>
    <p>I don't have experience with this, but for me this seems to be
      suspicious:</p>
    <div>                                <property
      name="userDnPatterns"></div>
    <div>                                        <list></div>
    <div>                                               
      <value>sAMAccountName={0},cn=Users</value></div>
    <div>                                        </list></div>
    <div>                                </property></div>
    <br>
    Because if this is used for any filtering, such DNs probably don't
    exist... (AD accounts DNs are cn=Firstname Lastname,...) And
    probably also the container will be different from cn=Users.<br>
    <br>
    I hope someone else can help.<br>
    Ivan<br>
    <br>
    <div class="moz-cite-prefix">On 11/08/2016 03:33 PM, mceylan wrote:<br>
    </div>
    <blockquote
cite="mid:CADu1p_hmKNJjU3Hz3QJgOX_ypvX-BfczVZ8QBPFpHw=c6zQ_+w@mail.gmail.com"
      type="cite">
      <div dir="ltr">hi,
        <div><br>
        </div>
        <div>the problem is I' m unable to connect with Active Directory
          using valid credentials.<br clear="all">
          <div><br>
          </div>
          <div>catalina.sh file add -Dauth.method.type=ldap</div>
          <div><br>
          </div>
          <div>this is my ctx-web-security-ldap.xml  file <br>
          </div>
          <div><br>
          </div>
          <div>
            <div><bean id="contextSource"</div>
            <div>               
class="org.springframework.security.ldap.DefaultSpringSecurityContextSource"></div>
            <div>                <constructor-arg value="<a class="moz-txt-link-freetext" href="ldap://">ldap://</a><a
                moz-do-not-send="true"
                href="http://enad.trm.gov.tr:389/dc=trm,dc=gov,dc=tr">enad.trm.gov.tr:389/dc=trm,dc=gov,dc=tr</a>"
              /></div>
            <div>                <property name="userDn"
              value="cn=administrator,cn=Users,dc=trm,dc=gov,dc=tr"
              /></div>
            <div>                <property name="password"
              value="1234qQQ" /></div>
            <div>                <property name="referral"
              value="follow" /></div>
            <div>        </bean></div>
            <div><br>
            </div>
            <div>        <bean id="midPointAuthenticationProvider"</div>
            <div>               
class="org.springframework.security.ldap.authentication.LdapAuthenticationProvider"></div>
            <div>                <constructor-arg></div>
            <div>                        <bean</div>
            <div>                               
class="org.springframework.security.ldap.authentication.BindAuthenticator"></div>
            <div>                                <constructor-arg
              ref="contextSource" /></div>
            <div>                                <property
              name="userDnPatterns"></div>
            <div>                                        <list></div>
            <div>                                               
              <value>sAMAccountName={0},cn=Users</value></div>
            <div>                                        </list></div>
            <div>                                </property></div>
            <div>                                <!--  OPTIONAL
              --></div>
            <div>                                <property
              name="userSearch" ref="userSearch" /></div>
            <div>                        </bean></div>
            <div>                </constructor-arg></div>
            <div>                <property
              name="userDetailsContextMapper" ref="userDetailsService"
              /></div>
            <div>        </bean></div>
            <div><br>
            </div>
            <div>        <bean id="userSearch"</div>
            <div>               
class="org.springframework.security.ldap.search.FilterBasedLdapUserSearch"></div>
            <div>                <constructor-arg index="0" value=""
              /></div>
            <div>                <constructor-arg index="1"
              value="(sAMAccountName={0})" /></div>
            <div>                <constructor-arg index="2"
              ref="contextSource" /></div>
            <div>                <property name="searchSubtree"
              value="true" /></div>
            <div><br>
            </div>
            <div>        </bean></div>
          </div>
          <div><br>
          </div>
          <div>output:   <b class="gmail-box-title">[Warning: Property
              for 'Bad credentials' not found]</b></div>
          <div><b class="gmail-box-title"><br>
            </b></div>
          <div><b class="gmail-box-title">Thanks.<br>
            </b>-- </div>
          <div class="gmail_signature">
            <div dir="ltr">Merve CEYLAN</div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Ivan Noris
Senior Identity Engineer
evolveum.com
</pre>
  </body>
</html>