title: TDS - receive userPassword
body: <p>is it possible to get the User-Password from TDS in ClearText via java?
  With <code>ldapsearch -v -D cn=root -w xxxxxx -s sub uid=testuser userPassword
  </code> 
  i'm getting the following result: </p>
  
  <p><a href="https://i.stack.imgur.com/ud3y8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ud3y8.png" alt="enter image description here"></a></p>
  
  <p>The password is in that case: Joko2014!</p>
  
  <p>In Java i have tried it with:</p>
  
  <pre><code>String[] attrIDs = {".....",....,"userPassword"}
  SearchControls ctls = new SearchControls();
  ctls.setReturningAttributes(attrIDs);
  ctls.setSearchScope(SearchControls.SUBTREE_SCOPE);
  
  NamingEnumeration&lt;SearchResult&gt; results = ctx.search(name,
                          filter, ctls);
  
  while (results.hasMore()) {
      SearchResult entry = results.next();
      System.out.println(entry);
  }
  </code></pre>
  
  <p>But the output in the console is just:</p>
  
  <pre><code>uid=testuser: null:null:{givenname=givenName: xxxx, sn=sn: xxx, pwdchangedtime=pwdChangedTime: 20160926173016.000000Z, mail=mail: xxxxxx@xx.xxx.com, uid=uid: testuser, userpassword;binary=userPassword;binary: [B@1a626f, pwdreset=pwdReset: true, cn=cn: xxxx, description=description: xxxxxx;xxxxxx;I;xxxxxx}
  </code></pre>
  
  <p>What does "binary=userPassword;binary:[B@1a626f..." mean and how can i get the password here? Do i have to encode it? If yes, how can i solve it?
  Getting the other operational attributes are no problem.</p>
  
  <p>Best Regards!</p>