Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- logon to specific OU using Directoryservices
- Path: LDAP://my.domain User: DOMAINuser Pass: mypass
- DOMAINuser = Autenticated
- Path: LDAP://my.domain, ou=myou, dc=my, dc=domain User: user Pass: mypass
- Path: LDAP://my.domain/ou=myou User: user Pass: mypass
- Path: LDAP://my.domain/ou=myou User: DOMAINuser Pass: mypass
- LDAP://servername/ou=MyOU,dc=my,dc=domain
- LDAP://ou=MyOU,dc=my,dc=domain (for server-less binding)
- string adPath = "LDAP://ou=myou,dc=my,dc=domain";
- string adUser = "myuser";
- string adPass = "mypass";
- // you might need to play around with the "AuthenticationTypes" to get it to work
- DirectoryEntry entry = new DirectoryEntry(adPath, adUser, adPass, AuthenticationTypes.None);
- DirectorySearcher searcher = new DirectorySearcher(entry);
- searcher.Filter = @"(objectClass=Person)";
- string adPath = "LDAP://my.domain/ou=myou,dc=my,dc=domain";
- string adPath = "LDAP://dc01.my.domain/ou=myou,dc=my,dc=domain";
Add Comment
Please, Sign In to add comment