Active Directory/Connect

From Rosetta Code
Revision as of 17:13, 14 May 2009 by 82.198.197.104 (talk) (Show simple Tcl ldap/AD example)
Task
Active Directory/Connect
You are encouraged to solve this task according to the task description, using any language you may know.

VBScript

Creating the normal connection to AD

Set objConn = CreateObject("ADODB.Connection")
Set objCmd = CreateObject("ADODB.Command")
objConn.Provider = "ADsDSOObject"
objConn.Open

Tcl

This does not use SSPI/Kerberos yet, so your AD would need to allow simple ldap access.

package require ldap
set conn [ldap::connect $host $port]
ldap::bind $conn $user $password