Automate User Home Directory Creation
Adaxes allows you to automatically create, share, move and delete user home directories when a user account is created, modified or deleted in Active Directory. In this tutorial, you will learn how to configure Adaxes to automatically create a home directory for new users created in AD.
To automate the creation of user home directories, you need to create a Business Rule that will be automatically executed after a new user account is created in Active Directory.
Launch Adaxes Administration Console, right-click your Adaxes service, point to New and click Business Rule . The Create Business Rule wizard will open.
Enter the name for the new Business Rule, and click Next.
Here you need to specify when the new Business Rule must be executed. As we want to create home directories after creation of new users, do the following:
- Select User in the Object Type list.
- Select After in the Operation section.
- Select Creating a User in the Operation section and click Next.
At the next step, you need to specify what the Business Rule will do when a new user is created. To add the Create Home Directory action to the Business Rule, do the following:
- Click the Add Action link.
- In the dialog that opens, select the Create the home directory action.
- In the Action Parameters section, specify a network path template for home directories that will be created by this rule. Click OK.
Optionally, you may want the new Business Rule to create home directories only if certain conditions are met. For example, to create a home directory only if a user is a member of the Marketing department, perform the following steps:
- Select the action/condition set (click the created action to highlight the set) and click the Add Condition icon.
- In the dialog that opens, select the If<property><relation><value> condition type.
- In the Condition Parameters section, specify Department equals Marketing and click OK.
Optionally, you can add some other actions and conditions to this Business Rule. For example, you may want to create home directories for users from the Sales department in a different network location. For this purpose, click the Add action to a new set link and repeat steps 4 and 5. When finished, click Next.
You can also distribute home folders among multiple servers based on the first letter of the user last name. For this purpose, use the If <property> <relation> <value> condition and select matches regexp in the relation drop-down list. For example, if you specify the condition parameters as follows:
Last Name - matches regexp - ^[a-f], Business Rule actions will be performed only for users, whose last name starts with letters A to F.
Here, at the Activity Scope page you need to specify where in Active Directory a user must be created to trigger this Business Rule. Click Add.
In the Business Rule Activity Scope dialog that opens, you need to specify the Active Directory locations where the Business Rule will be effective. Select one of the following items:
All Objects - select if you want this Business Rule to be executed if a user
is created in any AD domain managed by the Adaxes service.
Specific Domain - select if you want this Business Rule to be executed if
a user is created in the AD domain you specify.
- OU or Container - select if you want this Business Rule to be executed only if a new user if created under the selected OU or container.
Select the item you need and click Add. When finished, click OK.
The specified activity scope items will be displayed in the Assignments list. Click Finish.
Now, when the Business Rule is complete, every time a new user is created in AD (no matter in which way - using Administration Console, Web Interface, during data import, via PowerShell scripts, etc.), Adaxes will automatically create a home directory for this user.