0 votes

Hello,

We are evaluating Adaxes as a replacement for our existing AD management interface. As a result, we are looking at how Adaxes can simulate or replicate the existing functionality of our current management system.

I have been experimenting with using business rules to automate the creation of home directories and user profiles paths. All user data for our students is stored under...

\\server\COMStudentWork\

Further to this, the parent OU of the a user defines the remaining part of the path, for example, a user named 'sheldon.cooper', under the AD structure CN=sheldon cooper,OU=Senior 4,OU=Students,OU=COM,OU=Establishments,DC=company,DC=pri

should have a home directory path...
\\server\COMStudentWork\Senior 4\sheldon.cooper

I suppose that I could have serveral business rules, one for each parent OU, with a hard coded path, but I was wondering if it would be possible to perform it automatically, based on the OU that the user is created in.

Whilst researching this functionality / problem, I used this post as a guide...

Filling "Department" attribute based on OU name

However, even having an (1st) action in a business rule that sets 'ou' property of the new created user, when a subsequent (2nd) action runs under the rule business rule that set the user home directory path based on \\DC\COMStudentWork\%ou%\%username%, it still results on an actual path created like... \\DC\COMStudentWork\\%username% (notice the missing OU entry).

Apologies if this description of our problem is confusing. I am more than happy to provide further information if required.

regards and thanks,

Jay Paterson

by (20 points)
0

Hi Jay,

If you are using the script to set the department property based on the parent OU then home directory path should be:
\\DC\COMStudentWork\%department%\%username%

However if you are trying to do both in a single step I believe the %department% will not have refreshed in time for the create home drive to work correctly.

How are you adding the users, is it possible to add the department in when you import the users?

1 Answer

0 votes
by (18.0k points)

Hello,

The problem is that value references (e.g. %department%) are resolved only once for all actions/conditions.

I suggest you create user home directories using a script:

$drive = "Z:"
$accessPermissions = "ADM_USERACCESSPERMISSION_FULL"
$inheritParentPermissions = $False
$setUserAsOwner = $True

$parent = $Context.BindToObject($Context.TargetObject.Parent)
$parentName = $parent.Get("name")
$path = "\\server\COMStudentWork\$parentName\%username%"

$Context.TargetObject.CreateHomeDirectory($path, $drive,
    $accessPermissions, $inheritParentPermissions, $setUserAsOwner)

For details, see IAdmUser::CreateHomeDirectory.

Related questions

0 votes
1 answer

Good Morning, I've been working through some of my processes and I'm not looking to make sure the deletion of Home directories (both remote and standard) as well as ... for user deletion. If there are any questions or clarification needed, please let me know.

asked Oct 16, 2015 by jtop (680 points)
0 votes
1 answer

Good afternoon, I'm currently updating some of our scripts and I'm looking to have an option that delete's a users V2 profile path when run. All the scripts I've ... is a script or option available to complete this task, or if you need further clarification.

asked Jan 26, 2015 by jtop (680 points)
0 votes
0 answers

Hello, I am using this script found in the repository to remove the permissions for Adaxes service administrators from a newly provisioned user home directory: https://www. ... namespace, so the folder path is similar to \ \domain.domain.com\ServerName\Users

asked Nov 14, 2022 by GronTron (270 points)
0 votes
1 answer

we used the adaxes "move home directory" tool, but after all the directories were moved, they were all set to the default security of the parent folder. The per user ... there a way to go through each user and assign their rights to the home directory?

asked Feb 27, 2017 by mdedmon (150 points)
0 votes
1 answer

I have a Business Rule where "After User Creation", "Create the home directory". This works fine and adds the user Modify Access to their home directory, but it also Adds ... does not need to be given explicit access. Is there a way to suppress this behavior?

asked Mar 4, 2016 by Kikaida (1.1k points)
3,326 questions
3,026 answers
7,727 comments
544,679 users