I have developed c# application using monodevelop/xamarin, which basically does ldap authentication with windows active directory. And This works fine in windows environment. but if i use the same code in the ubuntu, instead of authenticating to windows active directory, i think it is trying to authenticate with novell active directory. and fails with novell.ldap.exception invalid credentials. i have removed all the references to novell.directory.ldap, but system.directoryServices internally referring to novell assembly. So is there any way we can make it to refer to windows AD rather than novell AD?
My requirement is to basically authenticate with windows Active directory from ubuntu application. Is there any mono wrapper around System.DirectoryServices to achieve this, please suggest.
this is the piece of code always failing in ubuntu at Findall with invalid credentials. because it is always pointing to novell active directory
string strLdapURL = "LDAP://" + Domain + ":389"; DirectoryEntry entry = new DirectoryEntry(strLdapURL, strUserName, Password); DirectorySearcher mySearcher = new DirectorySearcher(entry); mySearcher.Filter = "(&(ObjectCategory=computer)(!userAccountControl:1.2.840.113518.104.22.1683:=2)(operatingSystem=*server*))"; mySearcher.PropertiesToLoad.Add("PwdLastSet"); mySearcher.SizeLimit = int.MaxValue; mySearcher.PageSize = int.MaxValue; mySearcher.Tombstone = false; mySearcher.SearchScope = System.DirectoryServices.SearchScope.Subtree; System.DirectoryServices.SearchResultCollection entry1 = mySearcher.FindAll();