how to connect remote machines using Active directory credentials?

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<p style="border:none; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; margin-bottom:5px; outline:0px; padding-right:0px; color:#2a2a2a; line-height:15px; text-align:left
Hi,
<p style="border:none; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; margin-bottom:5px; outline:0px; padding-right:0px; color:#2a2a2a; line-height:15px; text-align:left

<p style="border:none; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; margin-bottom:5px; outline:0px; padding-right:0px; color:#2a2a2a; line-height:15px; text-align:left
I have planned to write a tool to list and connect machinces available in the active directory from the remote machine. Im able to connect the AD and get the list of computers using
<p style="border:none; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; margin-bottom:5px; outline:0px; padding-right:0px; color:#2a2a2a; line-height:15px; text-align:left

<p style="border:none; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; margin-bottom:5px; outline:0px; padding-right:0px; color:#2a2a2a; line-height:15px; text-align:left
ADsOpenObject(L"LDAP://myDC",L"user", L"pwd",ADS_SECURE_AUTHENTICATION,IID_IDirectorySearch,(void**)&pContainerToSearch);
<p style="border:none; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; margin-bottom:5px; outline:0px; padding-right:0px; color:#2a2a2a; line-height:15px; text-align:left
hr = pContainerToSearch->ExecuteSearch(L"(&(objectClass=computer))", pszAttr, dwCount, &hSearch );
<p style="border:none; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; margin-bottom:5px; outline:0px; padding-right:0px; color:#2a2a2a; line-height:15px; text-align:left
Also I can retrieve the Users available in the Active directory. No I wish to connect the computers which are listed by the above function. Is it possible to use the ConnectServer() with samAccountName? I believe that password cannot retrieveable from the AD.
So
<p style="border:none; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; margin-bottom:5px; outline:0px; padding-right:0px; color:#2a2a2a; line-height:15px; text-align:left
How to connect those machines using connectServer() (a wmi function). ?
<p style="border:none; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; margin-bottom:5px; outline:0px; padding-right:0px; color:#2a2a2a; line-height:15px; text-align:left
Is it possible to connect machines with out password or what are AD parameters i have to use for connecting those machines?
<p style="border:none; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; margin-bottom:5px; outline:0px; padding-right:0px; color:#2a2a2a; line-height:15px; text-align:left
Can you please give me some idea or sample code it will be helpful for me ?
<p style="border:none; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; margin-bottom:5px; outline:0px; padding-right:0px; color:#2a2a2a; line-height:15px; text-align:left
Thanks in advance.
<p style="border:none; font-family:Segoe UI,Lucida Grande,Verdana,Arial,Helvetica,sans-serif; margin-bottom:5px; outline:0px; padding-right:0px; color:#2a2a2a; line-height:15px; text-align:left
-ilavaa
<
ilavaa

View the full article
 
Back
Top