Quantcast
Channel: Software Communities : Popular Discussions - ActiveRoles
Viewing all articles
Browse latest Browse all 1277

Creat Home Directory script

$
0
0
 Hi, I'm new to ARS but have a pressing need. There is a built in  ARS policy Object "Home FolderAutoProvisioning" However this only works for new users that are created via ARS. If the user is created as in our case via Oracle Identity Manager it doesn't work. I therefore have to write a custom script and select 'Handle changes from DirSync Control'. I have created the following script
 **************

Sub onPostCreate(Request)
'Requires ADSetHome.exe on the ARS machine

uName = Request.Get("sAMAccountName")
homeFolderPath = "\\udsfs_student\Exam\"

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "adsethome.exe" & uName & homeFolderPath & " /h=u /c"
End Sub

*********************
adsethome is a JRB utility that creates the home folder assigns the permissions on the folder and sets the home folder to connect to a Drive letter (in this case U:). This works if I run it in a DOS shell manually, but doesn't seem to do anything when run as a policy. The logs on the server show the user is created and the log for the onPostCreate is as follows: No errors are given - it just does nothing!. any help on how to get the script to work is much appreciated.
Thanks,
Diarmuid

*************
Attribute is modified.
Operation GUID: 04e932ad-2fd3-466f-a5bd-b56be11d7918
Attribute name: edsaScriptText
Attribute value: Sub onPostCreate(Request)
'Requires ADSetHome on the ARS machine

uName = Request.Get("sAMAccountName")
homeFolderPath = "\\udsfs_student\Exam\"

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "adsethome.exe" & uName & homeFolderPath & " /h=u /c"
End Sub
 
Action: Replace

Viewing all articles
Browse latest Browse all 1277

Trending Articles