183 lines
8.3 KiB
HTML
183 lines
8.3 KiB
HTML
<html>
|
||
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
|
||
<title>Active Directory Service Interfaces - Communicating to NDS Servers</title>
|
||
</head>
|
||
|
||
<body topmargin="0" leftmargin="0">
|
||
|
||
<table border="0" height="86" cellpadding="0" cellspacing="0">
|
||
<tr>
|
||
<td width="77%" valign="top" height="58"><map name="FPMap2">
|
||
<area href="http://www.microsoft.com/windows2000/library/howitworks/activedirectory/adsilinks.asp" shape="rect" coords="4, 6, 248, 57"></map><img src="banner.gif"
|
||
border="0" alt="http://www.microsoft.com/windows2000/library/howitworks/activedirectory/adsilinks.asp" width="250" height="60" usemap="#FPMap2"></td>
|
||
<td width="3%" height="58"></td>
|
||
<td width="21%" height="58" valign="bottom"><p align="right"><map name="FPMap3">
|
||
<area href="http://www.microsoft.com" shape="rect" coords="7, 6, 108, 39"></map><img src="mslogo.gif"
|
||
border="0" alt="http://www.microsoft.com" width="112" height="40" usemap="#FPMap3"></td>
|
||
</tr>
|
||
<tr>
|
||
<td valign="top" align="left" height="28"><map name="FPMap0">
|
||
<area href="rtk.htm" shape="rect" coords="420, 1, 515, 18" ALT="rtk.htm">
|
||
<area href="interopt.htm" shape="rect" coords="350, 1, 415, 19" ALT="interopt.htm">
|
||
<area href="ad.htm" shape="rect" coords="233, 1, 345, 19" ALT="ad.htm">
|
||
<area href="winnt.htm" shape="rect" coords="165, 1, 223, 19" ALT="winnt.htm">
|
||
<area href="dev.htm" shape="rect" coords="67, 1, 165, 19" ALT="dev.htm">
|
||
<area href="../default.htm" shape="rect" coords="13, 1, 65, 20" ALT = "../default.htm"></map>
|
||
<img rectangle="(233,1) (345, 19) ad.htm" rectangle="(165,1) (223, 19) winnt.htm" rectangle="(67,1) (165, 19) dev.htm" rectangle="(13,1) (65, 20) ../default.htm" src="router.gif" alt="router.gif (3874 bytes)" border="0" usemap="#FPMap0" width="536" height="26"></td>
|
||
<td width="3%" height="28"></td>
|
||
<td width="21%" height="28"></td>
|
||
</tr>
|
||
</table>
|
||
|
||
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="40">
|
||
<tr>
|
||
<td width="2%" height="19"></td>
|
||
<td width="98%" height="19">
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="2%" height="21"></td>
|
||
<td width="98%" height="21">
|
||
<h1><font face="Verdana" color="#0080C0"><strong><small>Communicating with
|
||
the Novell NDS Server</small></strong></font></h1>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="2%" height="21"></td>
|
||
<td width="98%" height="21" valign="top"> <p><font face="Verdana" color="#0080C0"><strong><small>Requirements</small></strong></font><ul>
|
||
<li><font face="Verdana"><small>Install Novell NDS Server</small>.<br>
|
||
</font></li>
|
||
<li><font face="Verdana"><small>Install<small> </small>"<a href="#gateway">Gateway and
|
||
Client Services for Netware</a>". </small><br>
|
||
</font></li>
|
||
<li><font face="Verdana"><small>Install <a href="http://www.microsoft.com/adsi"> ADSI 2.5 or higher</a>. Note
|
||
that you must
|
||
install ADSI <u>after</u> you install the Gateway and Client Service for Netware.</small></font></li>
|
||
</ul>
|
||
<p> </p>
|
||
<p><a name="gateway"></a><font face="Verdana" color="#0080C0"><strong><small>Installing
|
||
Gateway and Client Services for Netware</small></strong></font></p>
|
||
<p><font face="Verdana" color="#0080C0"><small>For Windows NT<4E> 4.0</small></font><ul>
|
||
<li><font face="Verdana" color="#000000"><small>Select <b> Start</b> | <b> Setting</b> |
|
||
<b> Control Panel</b></small></font></li>
|
||
</ul>
|
||
<ul>
|
||
<li><font face="Verdana" color="#000000"><small>Choose Network Applet, and double-click it to
|
||
open up the <b> Network Dialog</b>.</small></font></li>
|
||
</ul>
|
||
<ul>
|
||
<li><font face="Verdana" color="#000000"><small>Select the <b>Service</b>
|
||
tab.</small></font></li>
|
||
</ul>
|
||
<ul>
|
||
<li><small><font face="Verdana" color="#000000">Select <b> Gateway (and Client) Services for
|
||
Netware</b>.</font></small></li>
|
||
</ul>
|
||
<ul>
|
||
<li><font face="Verdana" color="#000000"><small>Install and reboot.</small></font></li>
|
||
</ul>
|
||
<p><font face="Verdana" color="#0080C0"><small>For Windows<77> 2000</small></font><ul>
|
||
<li><font face="Verdana" color="#000000"><small>Select <b> Start</b> | <b> Setting</b> |
|
||
<b> Network and Dial-up
|
||
Connection</b>.</small></font></li>
|
||
</ul>
|
||
<ul>
|
||
<li><font face="Verdana" color="#000000"><small>Select <b> Local Network</b>.
|
||
<b> Local Network</b> will
|
||
appear.</small></font></li>
|
||
</ul>
|
||
<ul>
|
||
<li><font face="Verdana" color="#000000"><small>Select <b> Client for Microsoft Network</b>.</small></font></li>
|
||
</ul>
|
||
<ul>
|
||
<li><font face="Verdana" color="#000000"><small>Click <b>Install</b>.</small></font></li>
|
||
</ul>
|
||
<ul>
|
||
<li><font face="Verdana"><small>Select <b> Client</b> icon, click <b> Add</b>.</small></font></li>
|
||
</ul>
|
||
<ul>
|
||
<li><font face="Verdana"><small>Select <b> Gateway (and Client) Services for Netware</b>.</small></font></li>
|
||
</ul>
|
||
<ul>
|
||
<li><small><font face="Verdana">Installation should be in progress.</font></small></li>
|
||
</ul>
|
||
<p><small><font face="Verdana"> </font></small></p>
|
||
<p><strong><font face="Verdana" color="#0080C0"><small>Connecting to an NDS Server</small></font></strong></p>
|
||
<blockquote>
|
||
<p><font face="Verdana"><small>Dim dso<br>
|
||
Dim obj<br>
|
||
Dim usrName<br>
|
||
Dim password<br>
|
||
Dim serverName<br>
|
||
<br>
|
||
serverName = "ntmarst2"<br>
|
||
userName = "supervisor.ntmarst2"<br>
|
||
password = "secretpwd"<br>
|
||
<br>
|
||
'--- Making the connection<br>
|
||
Set dso = GetObject("NDS:")<br>
|
||
Set cont = dso.OpenDSObject("NDS://" & serverName, userName, password, 0)</small></font></p>
|
||
<p><font face="Verdana"><small><br>
|
||
'--- Enumerating objects<br>
|
||
For Each obj In cont<br>
|
||
Debug.Print obj.Name & " (" & obj.Class & ")"<br>
|
||
Next</small>
|
||
</font></p>
|
||
</blockquote>
|
||
<p> </p>
|
||
<p><font face="Verdana" color="#0080C0"><strong><small>Attribute Retrieval and
|
||
Modification</small></strong></font></p>
|
||
<blockquote>
|
||
<p><small><font face="Verdana">Path = "O=NTMARST2/CN=benny"<br>
|
||
ADsPath = "NDS://" & serverName & "/" & Path<br>
|
||
Set usr = dso.OpenDSObject(ADsPath, userName, password, 0)<br>
|
||
Debug.Print usr.Get("Surname")<br>
|
||
usr.Put "SurName", "Johnson"<br>
|
||
usr.SetInfo</font></small></p>
|
||
</blockquote>
|
||
<p> </p>
|
||
<p><font face="Verdana" color="#0080C0"><strong><small>Object Creation</small></strong></font></p>
|
||
<blockquote>
|
||
<p><small><font face="Verdana">Path = "O=NTMARST2"<br>
|
||
ADsPath = "NDS://" & serverName & "/" & Path<br>
|
||
Set cont = dso.OpenDSObject(ADsPath, userName, password, 0)<br>
|
||
Set usr = cont.Create("user", "alicew")<br>
|
||
usr.Put "cn", "Alice"<br>
|
||
usr.Put "Surname", "Wonderland"<br>
|
||
usr.SetInfo</font></small></p>
|
||
</blockquote>
|
||
<p> </p>
|
||
<p><font face="Verdana" color="#0080C0"><strong><small>Searching</small></strong></font></p>
|
||
<blockquote>
|
||
<p><small><font face="Verdana">
|
||
ADsPath = "NDS://" & serverName<br>
|
||
Set con = CreateObject("ADODB.Connection")<br>
|
||
con.Provider = "ADsDSOObject"<br>
|
||
con.Properties("User ID") = userName<br>
|
||
con.Properties("Password") = password<br>
|
||
con.Open "ADSI"<br>
|
||
<br>
|
||
<br>
|
||
Set com = CreateObject("ADODB.Command")<br>
|
||
Set com.ActiveConnection = con<br>
|
||
com.CommandText = "SELECT ADsPath, 'Object Class' FROM '" & ADsPath &
|
||
"' WHERE Surname='Wonderland'"<br>
|
||
Set rs = com.Execute<br>
|
||
<br>
|
||
<br>
|
||
While Not (rs.EOF)<br>
|
||
Debug.Print rs.Fields("ADsPath")<br>
|
||
rs.MoveNext<br>
|
||
Wend<br>
|
||
<small></small></font></small>
|
||
</blockquote>
|
||
<font face="Verdana"><small>Source code can be found in <a href="../samples/interopt/nds">\samples\interopt\nds</a></small></font>.
|
||
<p> </td>
|
||
</tr>
|
||
</table>
|
||
</body>
|
||
</html>
|