public String checkAlreadyExists(String login) {
DistinguishedName webaccounts = new DistinguishedName();
webaccounts.add("ou","webaccounts");
List lst = getLdapTemplate().search(webaccounts, "cn=" + login, new AttributesMapper() {
@Override
public Object mapFromAttributes(Attributes attrs) throws NamingException {
return attrs.get("cn").get();
}
});