Autor Beitrag
Hansi@OMG
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 304

Vista
Delphi 2006 Prof., Lazarus
BeitragVerfasst: So 20.03.05 21:30 
Hallo,
ich will mit Delphi auf das Active Directory eines Windows 2000 Domaincontrollers zugreifen. Ich weis, dass man ihn über LDAP ansteuern kann und habe gelesen, dass das auch mit ADO geht.
Könnte mir da jemand helfen, wie das generell funktioniert?
Wenn nicht, könnte mir jemand sagen, wie ich das VB-Skript, dass ich in einem Forum gefunden habe in Delphi umsetzen kann:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
 
Sub BenuntzerAnlegen (Benutzer,Vorname,Nachname,Passwort)
Dim ouo, b
Set ouo = GetObject("LDAP://OU=user,DC=domaene,DC=de")
Set b = ouo.Create("user", "CN=" & Vorname & " " & Nachname)
Dim WshShell, ret
Set WshShell = WScript.CreateObject("WScript.Shell")
b.Put "sAMAccountName", Benutzer
b.Put "userPrincipalName", Benutzer & "@domaene.de"
b.Put "profilePath", "\\server\daten\profile\" & Benutzer
b.Put "homeDirectory", "\\server\daten\home\" & Benutzer
b.Put "homeDrive", "U:"
b.SetInfo
b.SetPassword Passwort
b.AccountDisabled = False
b.SetInfo
WScript.Sleep(1000)
ret = WshShell.Run ("verz.cmd " & Benutzer,0,1)
End Sub



Moderiert von user profile iconmatze: Topic aus Datenbanken verschoben am Di 22.03.2005 um 12:31

_________________
Who doesn't know the Micrsoft developer "Mahatma Fatal Error"?
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Do 24.03.05 03:16 

_________________
es gibt leute, die sind genetisch nicht zum programmieren geschaffen.
in der regel haben diese leute die regel...
Hansi@OMG Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 304

Vista
Delphi 2006 Prof., Lazarus
BeitragVerfasst: Do 24.03.05 11:24 
Danke, ich habe in Google immer nach Delphi Domain Controller oder sowas gesucht, deswegen bin ich nicht auf dieses Suchergebnis gekommen.

_________________
Who doesn't know the Micrsoft developer "Mahatma Fatal Error"?
renekr
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 41

Win 2000 ,Win XP, Win 7 64Bit
Delphi 2007 Ent,VBA,C#,ASP.net,VS2009Pro,VS2010 RC
BeitragVerfasst: So 20.08.06 15:22 
Hallo,
Ich bin gerade auch an dem Thema LDAP dran und habe einiges an Hilfe ,aber kommt nciht zu einem guten Ergebniss.
Hast du es inzwischen mit Delphi hinbekommen?
Ich will nur die Memberof von Computerkonten auslesen und per MArkierung oder selektion an andere Computerkonten übertragen.

danke