09-09-2014 12:43 PM
09-09-2014 02:12 PM
09-10-2014 11:23 AM
using System.Text;
using System.Threading.Tasks;
using System.DirectoryServices;
namespace AlfrescoADQueryTest
{
class Program
{
static void Main(string[] args)
{
Console.Write(testLDAP());
}
private static string testLDAP()
{
//Set the correct format for the AD query and filter
string rootQuery = "LDAP://mydomain.com/DC=mydomain,DC=com";
string searchFilter = "(&(samAccountName=myname)(objectCategory=person)(objectClass=user))";
SearchResult result = null;
using (DirectoryEntry root = new DirectoryEntry(rootQuery))
{
using (DirectorySearcher searcher = new DirectorySearcher(root))
{
searcher.Filter = searchFilter;
SearchResultCollection results = searcher.FindAll();
result = (results.Count != 0) ? results[0] : null;
}
}
//Get the email property from AD
return (result == null ? "null" : result.Properties["mail"][0] as string);
}
}
}
09-09-2014 02:31 PM
09-10-2014 11:37 AM
09-10-2014 02:23 PM
### Active Directory Integration ###
authentication.chain=passthru1:passthru,ldap1:ldap
passthru.authentication.sso.enabled=false
passthru.authentication.allowGuestLogin=false
passthru.authentication.authenticateCIFS=false
passthru.authentication.authenticateFTP=false
#passthru.authentication.servers=192.168.100.1
passthru.authentication.servers=mydomain.com
passthru.authentication.domain=MYDOMAIN
passthru.authentication.useLocalServer=false
passthru.authentication.defaultAdministratorUserNames=bob
passthru.authentication.connectTimeout=5000
passthru.authentication.offlineCheckInterval=300
passthru.authentication.protocolOrder=TCPIP,NETBIOS
ldap.authentication.active=false
ldap.authentication.java.naming.security.authentication=simple
ldap.authentication.userNameFormat=%s
ldap.authentication.allowGuestLogin=false
ldap.authentication.java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory
ldap.authentication.java.naming.provider.url=ldap://:389
ldap.authentication.escapeCommasInBind=false
ldap.authentication.escapeCommasInUid=false
ldap.synchronization.active=true
ldap.synchronization.java.naming.security.principal= SSCORP\\Principal
ldap.synchronization.java.naming.security.credentials=password
ldap.synchronization.queryBatchSize=1000
ldap.synchronization.groupDifferentialQuery=(&(objectclass=nogroup)(!(modifyTimestamp<\={0})))
ldap.synchronization.personQuery=(&(objectclass=user)(userAccountControl\:1.2.840.113556.1.4.803\:\=512))
ldap.synchronization.personDifferentialQuery=(& (objectclass=user)(!(modifyTimestamp<\={0})))
ldap.synchronization.groupQuery=(objectclass\=group)
ldap.synchronization.groupSearchBase=cn\=users,dc=mydomain,dc=com
ldap.synchronization.userSearchBase=cn\=users,dc=mydomain,dc=com
ldap.synchronization.modifyTimestampAttributeName=modifyTimestamp
ldap.synchronization.timestampFormat=yyyyMMddHHmmss’.0Z’
ldap.synchronization.userIdAttributeName=sAMAccountName
ldap.synchronization.userFirstNameAttributeName=givenName
ldap.synchronization.userLastNameAttributeName=sn
ldap.synchronization.userEmailAttributeName=mail
ldap.synchronization.userOrganizationalIdAttributeName=msExchALObjectVersion
ldap.synchronization.defaultHomeFolderProvider=userHomesHomeFolderProvider
ldap.synchronization.groupIdAttributeName=cn
ldap.synchronization.groupType=Nogroup
ldap.synchronization.personType=user
ldap.synchronization.groupMemberAttributeName=member
synchronization.synchronizeChangesOnly=false
cifs.enabled=false
09-11-2014 04:10 AM
09-16-2014 03:38 PM
org.alfresco.repo.security.authentication.AuthenticationException: 08150001 Failed to communicate with ldap://:389. Reason javax.naming.CommunicationException, localhost:389, java.net.ConnectException, Connection refused: connect
09-17-2014 06:02 AM
09-17-2014 04:11 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.