Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted

I have just imported 200+ students and need to set them up with homedirectories.

 

 

I have a csv file with usernames etc and need a script to create the home folders and set permissions on them, if its possible.

 

I have seen a fe pieces of software I could buy but thought I'd ask here 1st for a free option.

 

Cheers

 

Si

Posted

It depends how your home folders are setup. For my user home folders I have one main share (\\server\student data$) and each users home folder is a sub directory of this. (i.e \\server\student data$\year\studentname)

Folder security prevents users from browsing the root of the share and accessing other students work. When you have it set up like this, active directory can be used to create all the home folders by doing the following;

 

1. Highlight them all in Active Directory

2. RH click, and open properties

3. Click the profile tab

4. Tick the home folder box, select the 'connect' option and choose the drive letter you want to use

5. Type the following in the box. '\\SERVERNAME\SHARENAME\%username%'

 

This will create a folder for each user named as their username within the share \\SERVERNAME\SHARENAME\ and set the security on the folder and properties for each user acordingly. I'm not sure if older versions of active directory allow you to modify multiple objects, i'm running Server 2003 SP1 which lets you do this. It works for me, 200 folders created in an instant!

 

Hope that helps,

 

Mike.

Posted
Looks like maniac's solution should work for you but if you still need a script to do it, let me know what your directory structure is and ill fiddle with my script to match what you need (when i get a spare moment). My script is taylored for our network and is used to for the whole process (i.e. create user, home dir and share) so i will need to rip elements out to get it to work for you.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...