Active Directory/Connect: Difference between revisions

From Rosetta Code
Content added Content deleted
(Show simple Tcl ldap/AD example)
m (→‎{{header|Tcl}}: better formatting)
Line 11: Line 11:
=={{header|Tcl}}==
=={{header|Tcl}}==
This does not use SSPI/Kerberos yet, so your AD would need to allow simple ldap access.
This does not use SSPI/Kerberos yet, so your AD would need to allow simple ldap access.
<lang tcl>package require ldap

set conn [ldap::connect $host $port]
package require ldap
ldap::bind $conn $user $password</lang>
set conn [ldap::connect $host $port]
ldap::bind $conn $user $password


[[Category:Active Directory]]
[[Category:Active Directory]]

Revision as of 22:33, 14 May 2009

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. <lang tcl>package require ldap set conn [ldap::connect $host $port] ldap::bind $conn $user $password</lang>