<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>missmiis &#187; Novell</title>
	<atom:link href="http://www.wapshere.com/missmiis/category/novell/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wapshere.com/missmiis</link>
	<description>Adventures in identity management</description>
	<lastBuildDate>Fri, 03 Feb 2012 20:41:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Archiving Home Directories</title>
		<link>http://www.wapshere.com/missmiis/archiving-home-directories</link>
		<comments>http://www.wapshere.com/missmiis/archiving-home-directories#comments</comments>
		<pubDate>Fri, 13 Jul 2007 01:46:23 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[ILM 2007]]></category>
		<category><![CDATA[MIIS 2003]]></category>
		<category><![CDATA[Novell]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=40</guid>
		<description><![CDATA[One of the things I love about MIIS is that it can be put to work on any object type you care to name, as long as you can cobble together some sort of automation process.
One such example is a home directory. While needed by the user, it is not part of the user account [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things I love about MIIS is that it can be put to work on any object type you care to name, as long as you can cobble together some sort of automation process.</p>
<p>One such example is a home directory. While needed by the user, it is not part of the user account &#8211; it is a seperate object. It&#8217;s life cycle, while linked to that of the user, may follow a different path. You may be happy to delete a user object, knowing it can be recreated with the same groups and rights &#8211; but you can&#8217;t be so cavalier with data. Business requirements may have the home directory archived, or moved, or re-permissioned to another user. But as long as you can specify these rules, and write some code around them, there&#8217;s no reason why MIIS can&#8217;t manage your user data as effortlessly as your user accounts.</p>
<p>I have already posted about <a href="http://www.wapshere.com/missmiis/?p=15">an extensible MA for user home directory creation</a>. I extended this code to make it zip up the home directory after account deletion. For that I needed a VB.NET compatable archiving library. I used <a target="_blank" href="http://www.zbitinc.com/product.aspx?p=1">Zbitz</a> &#8211; but there&#8217;s plenty to choose from out there.</p>
<h3>Set a Flag</h3>
<p>The first step is to set a flag in the <strong>MVExtension</strong> code when I&#8217;ve figured out some sort of action needs to be taken.</p>
<p>In my system I take a two-step process to getting rid of a user. Initially the user account is disabled and a datestamp written into the Description field. At the same time the home directory is zipped to an archive location, though not yet removed. This makes it very easy to restore the account if a mistake was made.</p>
<p>After 90 days, if the account is still disabled, it is deleted along with the home directory.</p>
<p>In the following code snippet, csHomeDir is the CS object representing the home directory. The value numDaysDisabled has been calculated from the datestamp in the user&#8217;s Description field.</p>
<blockquote><p><font size="1"><font size="1" color="#0000ff">If</font><font size="1"> </font><font size="1" color="#0000ff">Not</font><font size="1"> csHomeDir(&#8220;Status&#8221;).Value.ToLower = &#8220;archived&#8221; </font><font size="1" color="#0000ff">Then</font><br />
</font><font size="1">    Utils.TransactionProperties(&#8220;archiveHomedir&#8221;) = <font size="1" color="#0000ff">True</font><br />
</font><font size="1"><font size="1" color="#0000ff">ElseIf</font><font size="1"> csHomeDir(&#8220;Status&#8221;).Value.ToLower = &#8220;archived&#8221; </font><font size="1" color="#0000ff">AndAlso</font><font size="1"> numDaysDisabled &gt; 90 </font><font size="1" color="#0000ff">Then</font><br />
</font><font size="1">    csHomeDir.Deprovision()<br />
<font size="1" color="#0000ff">End</font><font size="1"> </font><font size="1" color="#0000ff">If</font></font></p></blockquote>
<h3>Set the Status</h3>
<p>The next thing I need to do is set the Status on the home directory object (as described in <a href="http://www.wapshere.com/missmiis/?p=15">this post</a>). This can only be done as a export flow rule, so is a job for the <strong>MAExtension</strong> code.</p>
<blockquote><p><font size="1" color="#0000ff">Case</font><font size="1"> &#8220;exportStatus&#8221;</font><br />
<font size="1"><font size="1" color="#0000ff">    If</font><font size="1"> Utils.TransactionProperties(&#8220;archiveHomedir&#8221;) = </font><font size="1" color="#0000ff">True</font><font size="1"> </font><font size="1" color="#0000ff">AndAlso</font><font size="1"> csentry(&#8220;Status&#8221;).Value = &#8220;active&#8221; </font><font size="1" color="#0000ff">Then</font></font><br />
<font size="1">        csentry(&#8220;Status&#8221;).Value = &#8220;archive pending&#8221;</font><br />
<font size="1"><font size="1" color="#0000ff">    End</font><font size="1"> </font><font size="1" color="#0000ff">If</font></font></p></blockquote>
<h3>Archive the Directory</h3>
<p>Creating the archive is a job for the <strong>CSExtension </strong>code. I run the archive and then, if successful, I change the Status to &#8220;archived&#8221;. If the archive was unsuccessful I don&#8217;t make any changes in the SQL table &#8211; the Status remains &#8220;active&#8221; and the whole process will be attempted again.</p>
<blockquote><p><font size="1" color="#0000ff">If</font><font size="1"> csentry(&#8220;Status&#8221;).Value = &#8220;archive pending&#8221; </font><font size="1" color="#0000ff">Then</font><br />
<font size="1"><font size="1" color="#0000ff">    If</font><font size="1"> <a target="_blank" href="http://www.wapshere.com/missmiis/?page_id=41">ArchiveHomeDir</a>(path) = 0 </font><font size="1" color="#0000ff">Then</font></font><br />
<font size="1">        <a target="_blank" href="http://www.wapshere.com/missmiis/?page_id=42">updateRow</a>(path, csentry(&#8220;stringDN&#8221;).Value, csentry(&#8220;Server&#8221;).Value.ToUpper, csentry(&#8220;Volume&#8221;).Value.ToUpper, csentry(&#8220;Folder&#8221;).Value.ToLower, &#8220;archived&#8221;)</font><br />
<font size="1"><font size="1" color="#0000ff">    End</font><font size="1"> </font><font size="1" color="#0000ff">If</font></font><br />
<font size="1"><font size="1" color="#0000ff">End If</font></font></p></blockquote>
<h3>Some Other Comments</h3>
<p>The great thing about this method is that it is very robust. Because the Status field is not changed until the directory has been successfully archived, MIIS will just keep retrying it. If there are a lot of archives, and it&#8217;s holding up other jobs, you can just stop the Export. The next time round MIIS picks up from where it left off.</p>
<p>One slight problem is that I change the Status as part of the Export, and this is a bit of a cheat from an MIIS perspective. Because I&#8217;ve exported &#8220;archive pending&#8221; but then imported either &#8220;archived&#8221; or &#8220;active&#8221; I always get the &#8220;Exported change was not reimported&#8221; warning. But it&#8217;s just a warning, and I was always happy to live with it. Perhaps I&#8217;ll do some further refining at a later date.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/archiving-home-directories/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating an Extensible MA</title>
		<link>http://www.wapshere.com/missmiis/creating-an-extensible-ma</link>
		<comments>http://www.wapshere.com/missmiis/creating-an-extensible-ma#comments</comments>
		<pubDate>Sun, 10 Jun 2007 23:58:04 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[ILM 2007]]></category>
		<category><![CDATA[MIIS 2003]]></category>
		<category><![CDATA[Novell]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=15</guid>
		<description><![CDATA[Here’s a quick walkthrough of creating an XMA. It’s by no means complete or authoritative, and just shows a method I’ve found success with. The example is creating Netware home directories, something I recognize most people don’t need to do these days, but it&#8217;s a flexible method which I have used for other scenarios as [...]]]></description>
			<content:encoded><![CDATA[<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman">Here’s a quick walkthrough of creating an XMA. It’s by no means complete or authoritative, and just shows a method I’ve found success with. The example is creating Netware home directories, something I recognize most people don’t need to do these days, but it&#8217;s a flexible method which I have used for other scenarios as well.</font></p>
<h3 style="margin: 12pt 0cm 3pt"><font face="Arial">Step 1 – Create the MA</font></h3>
<ol type="1" style="margin-top: 0cm">
<li style="margin: 0cm 0cm 0pt; tab-stops: list 36.0pt" class="MsoNormal"><font face="Times New Roman">Create an Extensible MA in Identity Manager. </font></li>
<li style="margin: 0cm 0cm 0pt; tab-stops: list 36.0pt" class="MsoNormal"><font face="Times New Roman">On the Properties page, after entering a name for the MA, untick the separate process option, as it will stop you being able to debug your code.</font></li>
</ol>
<p style="margin: 0cm 0cm 0pt; tab-stops: list 36.0pt" class="MsoNormal"><img align="middle" width="270" src="http://www.wapshere.com/images/xma-seperateprocess.GIF" height="35" style="width: 270px; height: 35px" /></p>
<ol start="3">
<li>
<p style="margin: 0cm 0cm 0pt; tab-stops: list 36.0pt" class="MsoNormal"><font face="Times New Roman">On the Configure Connection Information page, I always tick the <strong>Import and Export</strong> option. I really don’t know what circumstances might need an Import-only or Export-only MA – perhaps I’ll find out one day.</font></p>
</li>
<li style="margin: 0cm 0cm 0pt; tab-stops: list 36.0pt" class="MsoNormal"><font face="Times New Roman">For the Connected Data Source extension name just put the name of the dll you will write – it doesn’t matter if it doesn’t exist yet. The convention is <em>MAName</em>_CSExtension.dll.</font></li>
</ol>
<p style="margin: 0cm 0cm 0pt; tab-stops: list 36.0pt" class="MsoNormal"><font face="Times New Roman"><img align="middle" width="348" src="http://www.wapshere.com/images/xma-connection.GIF" height="219" style="width: 348px; height: 219px" /></font></p>
<p style="margin: 0cm 0cm 0pt; tab-stops: list 36.0pt" class="MsoNormal">&nbsp;</p>
<p style="margin: 0cm 0cm 0pt 36pt" class="MsoNormal"><shape type="#_x0000_t75" style="width: 261pt; height: 164.25pt" id="_x0000_i1026"></shape><imagedata src="file:///C:DOCUME~1CarolLOCALS~1Tempmsohtml1 6clip_image002.gif" o:title="xma-connection"></imagedata></p>
<ol start="5" type="1" style="margin-top: 0cm">
<li style="margin: 0cm 0cm 0pt; tab-stops: list 36.0pt" class="MsoNormal"><font face="Times New Roman">On the Configure Attributes page, you need to tell MIIS the attributes in the <a target="_blank" href="http://www.wapshere.com/missmiis/?page_id=8#CDS">CDS</a>, because MIIS doesn’t know how to go and find them out itself. On the Advanced tab you specify the object type – you can only have one object type in an XMA, but you can call it whatever you like.</font></li>
</ol>
<p style="margin: 0cm 0cm 0pt; tab-stops: list 36.0pt" class="MsoNormal"><img align="middle" width="463" src="http://www.wapshere.com/images/xma-attribs.GIF" height="384" style="width: 463px; height: 384px" /> </p>
<p style="margin: 0cm 0cm 0pt; tab-stops: list 36.0pt" class="MsoNormal">&nbsp;</p>
<p style="margin: 0cm 0cm 0pt; tab-stops: list 36.0pt" class="MsoNormal"><font face="Times New Roman">Most of the rest of the MA config pages are similar to all MAs, and should not need explanation.</font></p>
<h3 style="margin: 12pt 0cm 3pt"><font face="Arial">Step 2 – Create the CSExtension</font></h3>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman">In Identity Manager, highlight your new MA and click <strong>Create Extension Projects</strong>. Select the Project Type and change the Project Name as shown here:</font></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal">&nbsp;</p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman"><img align="middle" width="539" src="http://www.wapshere.com/images/xma-createcsext.GIF" height="239" style="width: 539px; height: 239px" /></font></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal">&nbsp;</p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><shape type="#_x0000_t75" style="width: 404.25pt; height: 179.25pt" id="_x0000_i1028"></shape><imagedata src="file:///C:DOCUME~1CarolLOCALS~1Tempmsohtml1 6clip_image004.gif" o:title="xma-createcsext"></imagedata></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman">This will give you a skeleton project with the procedures GenerateImportFile, BeginExport, ExportEntry and EndExport to be filled in by you.</font></p>
<h3 style="margin: 12pt 0cm 3pt"><font face="Arial">Step 3 – Export Steps</font></h3>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman">I’ll look at the Exports first. The BeginExport and EndExport subs are run once at the start and end of the whole export and are used to establish and end your connection to the <a target="_blank" href="http://www.wapshere.com/missmiis/?page_id=8#CDS">CDS</a>. The ExportEntry sub is run for each object exported.</font></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal">&nbsp;</p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman">I tend to maintain a SQL table alongside the CDS where I can record extra information about the objects. So, taking my Netware home directory example, I have a table in a SQL database on the MIIS server with these columns:</font></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal">&nbsp;</p>
<table border="1" cellPadding="0" cellSpacing="0" style="border-collapse: collapse; border: medium none" class="MsoTableGrid">
<tr>
<td width="98" vAlign="top" style="padding-right: 5.4pt; padding-left: 5.4pt; padding-bottom: 0cm; width: 73.45pt; padding-top: 0cm; background-color: transparent; border: windowtext 1pt solid"><strong><font size="3"><font face="Times New Roman">Path</font></font></strong></td>
<td width="96" vAlign="top" style="border-right: windowtext 1pt solid; padding-right: 5.4pt; border-top: windowtext 1pt solid; padding-left: 5.4pt; padding-bottom: 0cm; border-left: #ece9d8; width: 71.65pt; padding-top: 0cm; border-bottom: windowtext 1pt solid; background-color: transparent"><strong><font size="3"><font face="Times New Roman">DN</font></font></strong></td>
<td width="102" vAlign="top" style="border-right: windowtext 1pt solid; padding-right: 5.4pt; border-top: windowtext 1pt solid; padding-left: 5.4pt; padding-bottom: 0cm; border-left: #ece9d8; width: 76.3pt; padding-top: 0cm; border-bottom: windowtext 1pt solid; background-color: transparent"><strong><font size="3"><font face="Times New Roman">Server</font></font></strong></td>
<td width="104" vAlign="top" style="border-right: windowtext 1pt solid; padding-right: 5.4pt; border-top: windowtext 1pt solid; padding-left: 5.4pt; padding-bottom: 0cm; border-left: #ece9d8; width: 77.95pt; padding-top: 0cm; border-bottom: windowtext 1pt solid; background-color: transparent"><strong><font size="3"><font face="Times New Roman">Volume</font></font></strong></td>
<td width="102" vAlign="top" style="border-right: windowtext 1pt solid; padding-right: 5.4pt; border-top: windowtext 1pt solid; padding-left: 5.4pt; padding-bottom: 0cm; border-left: #ece9d8; width: 76.35pt; padding-top: 0cm; border-bottom: windowtext 1pt solid; background-color: transparent"><strong><font size="3"><font face="Times New Roman">Folder</font></font></strong></td>
<td width="89" vAlign="top" style="border-right: windowtext 1pt solid; padding-right: 5.4pt; border-top: windowtext 1pt solid; padding-left: 5.4pt; padding-bottom: 0cm; border-left: #ece9d8; width: 67.1pt; padding-top: 0cm; border-bottom: windowtext 1pt solid; background-color: transparent"><strong><font size="3"><font face="Times New Roman">Status</font></font></strong></td>
</tr>
</table>
<p><font face="Times New Roman">The Path is the primary key of the table. The DN is the owner’s – and this field allows me to join back to the user object in the metaverse. Status may contain ‘adding’, ‘active’, ‘archived’, or ‘deleted’. I could also add fields for dates and comments if I wanted to improve my logging.</font></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman">So, in my code, the ExportEntry step calls scripts that create the homedir itself, and then enter information into the SQL table to record the fact.</font></p>
<blockquote><p><span style="font-size: 8pt; color: blue; font-family: 'Courier New'">Public</span><span style="font-size: 8pt; font-family: 'Courier New'"> <span style="color: blue">Sub</span> ExportEntry(<span style="color: blue">ByVal</span> modificationType <span style="color: blue">As</span> ModificationType, <span style="color: blue">ByVal</span> changedAttributes <span style="color: blue">As</span> <span style="color: blue">String</span>(), <span style="color: blue">ByVal</span> csentry <span style="color: blue">As</span> CSEntry) </span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="color: blue">Implements</span> IMAExtensibleCallExport.ExportEntry</span><span style="font-size: 8pt; font-family: 'Courier New'"><span> </span><br />
<span style="color: green">&#8216;A CS object has already been created by the provisioning code</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span></span></span><span style="font-size: 8pt; font-family: 'Courier New'"><span style="color: blue">  Dim</span> server <span style="color: blue">As</span> <span style="color: blue">String</span> = csentry(&#8220;Server&#8221;).Value </span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">  Dim</span> volume <span style="color: blue">As</span> <span style="color: blue">String</span> = csentry(&#8220;Volume&#8221;).Value </span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">  Dim</span> folder <span style="color: blue">As</span> <span style="color: blue">String</span> = csentry(&#8220;Folder&#8221;).Value </span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">  Dim</span> path <span style="color: blue">As</span> <span style="color: blue">String</span> = &#8220;\&#8221; server &amp; &#8220;&#8221; &amp; volume &amp; &#8220;&#8221; &amp; folder</span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">  If</span> modificationType = modificationType.Add <span style="color: blue">Then</span></span><br />
<span style="font-size: 8pt; color: green; font-family: 'Courier New'">  &#8216;Check it is not already in the SQL table</span><br />
<span style="font-size: 8pt; color: blue; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">    If</span> <span style="color: blue">Not</span> rowExists(path) <span style="color: blue">AndAlso</span> csentry(&#8220;DN&#8221;).IsPresent <span style="color: blue">Then</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">      Dim</span> dn <span style="color: blue">As</span> <span style="color: blue">String</span> = csentry(&#8220;DN&#8221;).Value </span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">      If</span> CreateHomeDir(csentry) = 0 <span style="color: blue">Then</span></span><br />
<span style="font-size: 8pt; color: green; font-family: 'Courier New'">      &#8216;Only add the SQL table row if CreateHomeDir</span><br />
<span style="font-size: 8pt; color: green; font-family: 'Courier New'">      &#8216;was successful. This will force MIIS to try </span><br />
<span style="font-size: 8pt; color: green; font-family: 'Courier New'">      &#8216;again next export if CreateHomeDir failed.</span><br />
<span style="font-size: 8pt; color: blue; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span>        addRow(path, dn, server, volume, folder, &#8220;adding&#8221;)</span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">      End</span> <span style="color: blue">If</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">    End</span> <span style="color: blue">If</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">  End</span> <span style="color: blue">If</span></span><br />
<span style="font-size: 8pt; color: blue; font-family: 'Courier New'">End</span><span style="font-size: 8pt; font-family: 'Courier New'"> <span style="color: blue">Sub</span></span><span style="font-size: 8pt; color: blue; font-family: 'Courier New'"> </span></p></blockquote>
<h3 style="margin: 12pt 0cm 3pt"><font face="Arial">Step 4 – Import Steps</font></h3>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman">Extensible MAs can only import objects from a text file, so your job, in the GenerateImportFile sub, is to construct the text file that contains all the information MIIS will be expecting. My preferred format is AVP because it will support both single and multi-valued attributes.</font></p>
<blockquote>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman">Path: \server1homectest</font></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman">DN: ctest.staff.nds</font></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman">Server: server1</font></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman">Volume: home</font></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman">Folder: ctest</font></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman">Status: active</font></p>
</blockquote>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman">I tend to combine harvesting information direct from the source, with matching against what I’ve written into the SQL table. If an object doesn’t actually exist – say a homedir was not created, or was accidentally deleted – I won’t list the object in the text file; MIIS will register that as an unexpected disappearance; and will reprovision the object. Which is exactly what you’d want to happen.</font></p>
<blockquote><p><span style="font-size: 8pt; color: blue; font-family: 'Courier New'">Public</span><span style="font-size: 8pt; font-family: 'Courier New'"> <span style="color: blue">Sub</span> GenerateImportFile(<span style="color: blue">ByVal</span> filename <span style="color: blue">As</span> <span style="color: blue">String</span>, <span style="color: blue">ByVal</span> connectTo <span style="color: blue">As</span> <span style="color: blue">String</span>, <span style="color: blue">ByVal</span> user <span style="color: blue">As</span> <span style="color: blue">String</span>, <span style="color: blue">ByVal</span> password <span style="color: blue">As</span> <span style="color: blue">String</span>, <span style="color: blue">ByVal</span> configParameters <span style="color: blue">As</span> ConfigParameterCollection, <span style="color: blue">ByVal</span> fullImport <span style="color: blue">As</span> <span style="color: blue">Boolean</span>, <span style="color: blue">ByVal</span> types <span style="color: blue">As</span> TypeDescriptionCollection, <span style="color: blue">ByRef</span> customData <span style="color: blue">As</span> <span style="color: blue">String</span>)</span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="color: blue">  Implements</span> IMAExtensibleFileImport.GenerateImportFile</span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; color: blue; font-family: 'Courier New'">  Dim</span><span style="font-size: 8pt; font-family: 'Courier New'"> Servers <span style="color: blue">As</span> <span style="color: blue">String</span>() = {&#8220;server1&#8243;, &#8220;server2&#8243;, &#8220;server3&#8243;}</span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">  Dim</span> i <span style="color: blue">As</span> Int16</span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">  Dim</span> s() <span style="color: blue">As</span> <span style="color: blue">String</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="color: blue"></span></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">  Dim</span> folders <span style="color: blue">As</span> System.Collections.IEnumerator</span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">  Dim</span> sqlConn <span style="color: blue">As</span> <span style="color: blue">New</span> SqlConnection(MIISDB_CONNECTION_STRING)</span><span style="font-size: 8pt; font-family: 'Courier New'"><span> </span>sqlConn.Open()</span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">  Dim</span> fw <span style="color: blue">As</span> StreamWriter</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">  Try</span></span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"><span style="color: blue"></span></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: green">  &#8216;Open the output file specified in the run profile</span></span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"><span style="color: green"></span></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span>    fw = <span style="color: blue">New</span> StreamWriter(filename, <span style="color: blue">False</span>)</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">  Catch</span> ex <span style="color: blue">As</span> Exception</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">  Throw</span> <span style="color: blue">New</span> UnauthorizedAccessException(&#8220;Unable to open file: &#8221; &amp; filename)</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">  End</span> <span style="color: blue">Try</span></span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"><span style="color: blue"></span></span><span style="font-size: 8pt; color: blue; font-family: 'Courier New'"></span></span><span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; color: blue; font-family: 'Courier New'"></span><span style="font-size: 8pt; color: blue; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">  For</span> i = 0 <span style="color: blue">To</span> UBound(Servers)</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: green">  &#8216;List all folders under \serverhome</span></span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"><span style="color: green"></span></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span>    s = System.IO.Directory.GetDirectories(&#8220;\&#8221; &amp; Servers(i) &amp; &#8220;Home&#8221;)</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span>    folders = s.GetEnumerator</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">    While</span> folders.MoveNext</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: green">    &#8216;For each folder, write an entry into the import file</span></span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"><span style="color: green"></span></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span>      fw.WriteLine(&#8220;Path: &#8221; &amp; folders.Current)</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span>      fw.WriteLine(&#8220;Server: &#8221; &amp; Servers(i))</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span></span>      fw.WriteLine(&#8220;Volume: Home&#8221;)</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span>      fw.WriteLine(&#8220;Folder: &#8221; &amp; folders.Current.Replace(&#8220;\&#8221; &amp; Servers(i) &amp; &#8220;Home&#8221;, &#8220;&#8221;))</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: green">      &#8216;Get DN and Status from the SQL table</span></span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"><span style="color: green"></span></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">      Dim</span> sqlQuery <span style="color: blue">As</span> <span style="color: blue">New</span> SqlCommand(&#8220;SELECT * FROM &#8221; &amp; MIISDB_TABLE &amp; &#8221; where path=&#8217;&#8221; &amp; folders.Current &amp; &#8220;&#8216;&#8221;, sqlConn)</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">      Dim</span> cnReader <span style="color: blue">As</span> SqlDataReader = sqlQuery.ExecuteReader</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">      If</span> cnReader.Read <span style="color: blue">Then</span></span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"><span style="color: blue"></span></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span>        fw.WriteLine(&#8220;stringDN: &#8221; &amp; cnReader.Item(1))</span><span style="font-size: 8pt; font-family: 'Courier New'"><span> </span>fw.WriteLine(&#8220;Status: &#8221; &amp; cnReader.Item(5))</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">      Else</span></span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"><span style="color: blue"></span></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span>        fw.WriteLine(&#8220;stringDN: &#8220;)</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span>        fw.WriteLine(&#8220;Status: owner unknown&#8221;)</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">      End</span> <span style="color: blue">If</span></span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"><span style="color: blue"></span></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span>      fw.WriteLine()</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span>      cnReader.Close()</span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">    End</span> <span style="color: blue">While</span></span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"><span style="color: blue"></span></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span><span style="color: blue">  Next</span></span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"><span style="color: blue"></span></span><span style="font-size: 8pt; color: blue; font-family: 'Courier New'"></span><span style="font-size: 8pt; color: blue; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"><span></span>  sqlConn.Close()</span></span></span><br />
<span style="font-size: 8pt; font-family: 'Courier New'"><span style="font-size: 8pt; color: blue; font-family: 'Courier New'"><span style="font-size: 8pt; font-family: 'Courier New'"></span><span style="font-size: 8pt; font-family: 'Courier New'"><span></span>  fw.Close()</span></span></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-size: 8pt; color: blue; font-family: 'Courier New'">End</span><span style="font-size: 8pt; font-family: 'Courier New'"> <span style="color: blue">Sub</span></span></p>
</blockquote>
<h3 style="margin: 12pt 0cm 3pt"><font face="Arial">And the rest…</font></h3>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman">The complete solution also includes deprovisioning, as well as steps to archive home directories to ZIP files before deletion&#8230; but I’ll cover all that in <a href="http://www.wapshere.com/missmiis/?p=40">another post</a>.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/creating-an-extensible-ma/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Connecting MIIS to eDirectory</title>
		<link>http://www.wapshere.com/missmiis/connecting-miis-to-edirectory</link>
		<comments>http://www.wapshere.com/missmiis/connecting-miis-to-edirectory#comments</comments>
		<pubDate>Sun, 10 Jun 2007 23:36:32 +0000</pubDate>
		<dc:creator>Carol</dc:creator>
				<category><![CDATA[ILM 2007]]></category>
		<category><![CDATA[MIIS 2003]]></category>
		<category><![CDATA[Novell]]></category>

		<guid isPermaLink="false">http://www.wapshere.com/missmiis/?p=13</guid>
		<description><![CDATA[When setting up an eDirectory MA I found I had to install the Netware server certificate as a Trusted Root Authority. This is the way I did it:

Open ConsoleOne 
Browse to the OU of the server you wish to attach to from MIIS (it needs to be one with a copy of all partitions containing [...]]]></description>
			<content:encoded><![CDATA[<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman">When setting up an eDirectory MA I found I had to install the Netware server certificate as a Trusted Root Authority. This is the way I did it:</font></p>
<ol type="1">
<li style="margin: 0cm 0cm 0pt; tab-stops: list 36.0pt" class="MsoNormal"><font face="Times New Roman">Open ConsoleOne </font></li>
<li style="margin: 0cm 0cm 0pt; tab-stops: list 36.0pt" class="MsoNormal"><font face="Times New Roman">Browse to the OU of the server you wish to attach to from MIIS (it needs to be one with a copy of all partitions containing OUs you’re going to sync) </font></li>
<li style="margin: 0cm 0cm 0pt; tab-stops: list 36.0pt" class="MsoNormal"><font face="Times New Roman">Locate the SSL CertificateIP for that server </font></li>
<li style="margin: 0cm 0cm 0pt; tab-stops: list 36.0pt" class="MsoNormal"><font face="Times New Roman">Open the certificate Properties, click the Certificates tab, and Export the certificate to a file. </font></li>
<li style="margin: 0cm 0cm 0pt; tab-stops: list 36.0pt" class="MsoNormal"><font face="Times New Roman">Open a remote desktop session to the MIIS and login using the MIIS service account </font></li>
<li style="margin: 0cm 0cm 0pt; tab-stops: list 36.0pt" class="MsoNormal"><font face="Times New Roman">Run IE, click Tools, Internet Options, Content, Certificates </font></li>
<li style="margin: 0cm 0cm 0pt; tab-stops: list 36.0pt" class="MsoNormal"><font face="Times New Roman">Click the Trusted Root Certification Authorities tab and Import the cert file you created. </font></li>
<li style="margin: 0cm 0cm 0pt; tab-stops: list 36.0pt" class="MsoNormal"><font face="Times New Roman">Run Identity Manager. </font></li>
<li style="margin: 0cm 0cm 0pt; tab-stops: list 36.0pt" class="MsoNormal"><font face="Times New Roman">Create or import the eDirectory MA. </font></li>
<li style="margin: 0cm 0cm 0pt; tab-stops: list 36.0pt" class="MsoNormal"><font face="Times New Roman">Specify the Netware server name, the port (636), and the account to connect with, using the Fully Qualified DN. </font></li>
</ol>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><font face="Times New Roman">If you get a “Server Down” error then it’s probably a certificate problem.</font></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wapshere.com/missmiis/connecting-miis-to-edirectory/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

