Problem

Here’s an example of how to create a placement rule that places users from a flat structure, depending on whats in the user’s attribute OU(Department), into a hierarchical structure in the Production Tree.

Solution

From Policy Builder:

If class name equal case insensitive User
and if source attribute department equal case insensitive "value of 
department attribute"
set operation destination DN " ou path structure you would like" + "\" + 
escape destination DN()operation attribute("CN")

With a series of these placement rules, you can get everyone in the proper ou, provided their department attribute is properly valued.

Here is the code excerpt taken from the exported driver. There are three cases: staff, xstaff and guest; the operative attr is lblempstat.

<rule name="PublisherPlacementRule">
	<policy>
		<rule>
			<description>guest</description>
			<conditions>
				<and>
					<if-class-name op="equal">User</if-class-name>
					<if-src-attr name="lblEmpStat" op="equal">guest</if-src-attr>
				</and>
			</conditions>
			<actions>
				<do-set-op-dest-dn>
					<arg-dn>
						<token-text xml:space="preserve">LBNL\People\Guest</token-text>
						<token-text xml:space="preserve">\</token-text>
						<token-escape-for-dest-dn>
							<token-op-attr name="CN"/>
						</token-escape-for-dest-dn>
					</arg-dn>
				</do-set-op-dest-dn>
			</actions>
		</rule>
		<rule>
			<description>Staff</description>
			<conditions>
				<and>
					<if-class-name op="equal">User</if-class-name>
					<if-src-attr name="lblEmpStat" op="equal">staff</if-src-attr>
				</and>
			</conditions>
			<actions>
				<do-set-op-dest-dn>
					<arg-dn>
						<token-text xml:space="preserve">LBNL\People\Staff</token-text>
						<token-text xml:space="preserve">\</token-text>
						<token-escape-for-dest-dn>
							<token-op-attr name="CN"/>
						</token-escape-for-dest-dn>
					</arg-dn>
				</do-set-op-dest-dn>
			</actions>
		</rule>
		<rule>
			<description>xstaff </description>
			<conditions>
				<and>
					<if-class-name op="equal">User</if-class-name>
					<if-src-attr name="lblEmpStat" op="equal">xstaff</if-src-attr>
				</and>
			</conditions>
			<actions>
				<do-set-op-dest-dn>
					<arg-dn>
						<token-text xml:space="preserve">LBNL\People\XStaff</token-text>
						<token-text xml:space="preserve">\</token-text>
						<token-escape-for-dest-dn>
							<token-op-attr name="CN"/>
						</token-escape-for-dest-dn>
					</arg-dn>
				</do-set-op-dest-dn>
			</actions>
		</rule>
	</policy>
</rule>
0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Loading...Loading...

Disclaimer: As with everything else at NetIQ Cool Solutions, this content is definitely not supported by NetIQ, so Customer Support will not be able to help you if it has any adverse effect on your environment.  It just worked for at least one person, and perhaps it will be useful for you too.  Be sure to test in a non-production environment.

Leave a Reply

No Comments
By: coolguys
Sep 27, 2006
12:00 am
Reads:
936
Score:
Unrated