Solved

Issue creating home folders using a vbscript

Posted on 2011-09-21
1
181 Views
Last Modified: 2012-06-22
we have a vbscript at the moment that will create an account in AD, which it will then add the account to a number of groups and then create a home folder on a server  share and set the permissions.  All of this seems to be working fine ,but...

A number of times although it is creating the homefolder and looks as if it is adding the correct permissions for the user.  However if you try and save any work it comes up with an accessed denied error.  If we then  reapply the permissions it seems to work.

We are using CALCS to do this should we be using XCALCS long term I would like to use powershell but is that possible?
0
Comment
Question by:WNottsC
1 Comment
 
LVL 65

Accepted Solution

by:
RobSampson earned 500 total points
Comment Utility
You could certainly try XCacls.vbs
Here's how I'd use it:

sHomeDir = "\\server\users\jsmith"
sUser = "domain\jsmith"
strCommand = "%COMSPEC% /c cscript.exe %systemroot%\System32\xcacls.vbs " & sHomeDir & " /E /T /G " & sUser & ":F"
objShell.Run strCommand, 1, True

Open in new window


Regards,

Rob.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

When it comes to writing scripts for a Client/Server computing environment it is essential to consider some way of enabling the authentication functionality within a script. This sort of consideration mainly comes into the picture when we are dealin…
This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now