Solved

Making Home Folders as part of a domain for individual users login names.

Posted on 2010-11-18
4
248 Views
Last Modified: 2012-05-10
Hi All, I have been recently creating user accounts for a primary School and although I have now created unique login details or all children in the School I have not setup their Home folders on the server. I have added the the profile paths but I have been warned the path has been created but the home directory must be created manually with the correct permissions. This in the past has not been too much of an issue as I have been able to do exactly what it asks manually for the relatively small amounts of new users I have created.

The down side is I  have created 250+ new user accounts and all have a unique char & num based login username. I would like to create an automated batch file that will create a folder (with the same name as the users login) in the students users area on the server with full permissions for everyone. I just don't know how to automate the creation of the folder using the domain login username without doing it manualy.

I have an excel file, CSV or TSV that can be imported for each class that has their username in a columb

Any help would be appreciated

Regards

James
0
Comment
Question by:edgeit
  • 2
4 Comments
 
LVL 7

Expert Comment

by:ieden
ID: 34164694
I would suggest My Document folder redirection. When enabled, the username directory is automatically created as the policy is deployed. Then you can use the path created \\server\share\%USERNAME% as the home directory.
0
 
LVL 9

Assisted Solution

by:conradie
conradie earned 100 total points
ID: 34165058
In Excel, you could just create a column that has the word "md" in it next to the user name column. Repeat that all the way down the column. Then, create a third column that merges these two columns by adding them together with a space between.

See here for details on the merge of cells:

http://office.microsoft.com/en-us/excel-help/combine-the-contents-of-multiple-cells-HA010248390.aspx

Then take that third column and paste it into notepad, and save it it as a script, called usernames.cmd or something.

Test it out by running this script in a folder that is empty, and verify the results. Then, when its good and tested, run it in the folder you want to make the new user folders in.  
0
 
LVL 39

Accepted Solution

by:
Adam Brown earned 400 total points
ID: 34165298
You can leverage the Quest Powershell Cmdlets for this. You'll need to install Powershell: http://support.microsoft.com/kb/968930
And the Quest Active Roles Powershell Cmdlets: http://www.quest.com/powershell/activeroles-server.aspx

Once those are installed, open the Quest Active Roles Management shell and the script to do it is pretty straightforward. Change to the directory where you want the folders created and run the attached commands.

It'll build a folder based on the users' account names, then assign each user as the owner of their folder. It will then assign full permissions to the user and the Administrators group.
get-qaduser | where {$_.accountisdisabled -eq $false} | foreach {$name = $_.samaccountname
md $name
icacls $name /setowner $name /T
icacls $name /grant :r $name:F /T
icacls $name /grant administrators:F /T
}

Open in new window

0
 
LVL 9

Expert Comment

by:conradie
ID: 34165337
Acbrown, very nice solution. I'm going to have to take a look at that as well. :)
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

773 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