KevWCFE Posted October 6, 2011 Posted October 6, 2011 Hi all, That time of year again, we are creating new users. Last year we used some software call BAC (Bulk Active Directory) which was able to take in an Excel file which was a modified version of what the main office uses. This created all the users but didn't create the home folder. I was able to highlight all the new users and add \\server01\studenthome\%username% and that created the folder once I click ok. The home folder was firstname.surname. This year the principal wants the logon name to be the student ID but teachers won't be able to easily find their students' work when looking up the folders in the student home directory as they would all be numbers. I know, I know, if you have at most 30 in the class then it can't be that hard to have the names and numbers on a sheet of paper and find them that way but ye all know that teachers won't be happy with that. After looking through the forum here I found a few people recommending WiseSoft Bulk AD. I downloaded this and discovered it only edits the details of existing users. So I used the previous program to create four test users based on details in an excel sheet. Then I ran Bulk AD to edit the information for these four users in excel. I used a CONCATENATE function to create a folder that had description (we put course code in here) then student id and then student name. This created a unique folder that was easily identifiable by teachers. However, it only updated the attribute for home folder. It never actually created the folder. Finally, the question...does anyone know of a way to force the creation of the folders based on whats in the home folder field? Or, is there a better program for my needs but it has to be free or very cheap as there is no budget to make my life easier. I could go into each user and delete a letter from the home folder entry then put it back in. This activates the apply button which when clicked will create the folder but obviously this defeats the purpose of automation. Also I need to have this done by tomorrow so I'm afraid suggestions of Powershell can't be accepted Thanks for any help guys. I'm so close but yet so far. K
cromertech Posted October 6, 2011 Posted October 6, 2011 I've used the WiseSoft spreadsheet but since turning to 2008R2 I have not been able to make the program create the folders either. I would guess it has something to do with permissions but as I only use the %username% for the folder name I wasn't too worried. Could you exploit the 'Documents' bug by populating the directories with a desktop.ini with the students names on?
KevWCFE Posted October 6, 2011 Author Posted October 6, 2011 Hi matt, Thanks for the relpy. Forgive my ignorance but what is the "documents" bug? K
cromertech Posted October 6, 2011 Posted October 6, 2011 I'm sure it still applies but have a look at this thread http://www.edugeek.net/forums/windows-server-2008/53755-home-folders-renames-my-documents.html If you can find a way to create the desktop.ini file with something like this [.ShellClassInfo] LocalizedResourceName={users name} IconResource=%SystemRoot%\system32\imageres.dll,-112 IconFile=%SystemRoot%\system32\shell32.dll IconIndex=-235 I don't know how flexible this is though. You may be able to create one .ini file that will get the users info from active directory but I'm not so sure now I've had a look at it closer.
KevWCFE Posted October 6, 2011 Author Posted October 6, 2011 Hi Matt, Thanks again for that. Its a little over my head but from what I understand does the folder not have to exist first to put something into it? Most of my server knowledge is dealing with problems as they arrise so I may not as fluent as most of you guys here. K
cromertech Posted October 6, 2011 Posted October 6, 2011 I've just gone back to the WiseSoft spreadsheet and mine will now create the directories. I added myself to the root of the home folders with full permissions and the folder created no problem. The only thing that I don't get now are the user being added to the correct groups but that can be done with active directory users and computers. You could probably restrict this permission to create folders and change permissions only. Home folder has full control for SYSTEM and CREATOR OWNER only apart from my addition today.
KevWCFE Posted October 6, 2011 Author Posted October 6, 2011 Cool. How did you get Wisesoft to create the folder. When I was checking the forums on the WiseSoft site David himself said that it doesn't create the folder. K
cromertech Posted October 6, 2011 Posted October 6, 2011 Take a look in the options on that spreadsheet on the add users page. One of the options I have is 'create work areas'. It seems that as long as you have enough permissions on the server the folders are created with this option ticked. (you can even specify the ntfs permisions). There is a dll that needs to be registered for this to work I think. It comes with the spreadsheet and needs to be in System32 (or SysWOW64 on a 64 bit) 1
KevWCFE Posted October 11, 2011 Author Posted October 11, 2011 Hi Matt, I only realised afterwards that you were talking about the excel sheet that comes from WiseSoft to create users. I was using the Bulk Modifier program so that explains my confusion. In the end I ended up running the bulk modifier and saving the excel sheet that was created with just the home folder column in it and saved as a CSV. I then ran a batch file to run through the CSV with a for loop and run a MKDIR command on every entry it came across. This created the folder based on what was already in the home folder attribute. I thought this worked but today I discovered that students don't have access to that folder. As it was me under administrator who ran the batch I am the owner of the folders and the Teachers group also have access which is inherited from the folder above. Back to the drawing board I guess. As the students are all using the accounts now (I happily told the vice principal to go ahead) I have to find some way to modify the permissions in the folders or delete them and create them again another way with the correct permissions....or manually change the permissions on 1015 folders! I'm hoping for an automated way. Thanks for your help to date. K
cromertech Posted October 12, 2011 Posted October 12, 2011 You can probably modify your batch to include a icacls entry to add the user with full permissions to the relevant folder. Will be something like the following (but this is off the top of my head so probably wrong) icacls {folder} /grant {username}:F so in your csv you can export the users name as well as the folder and target your for loop to to create the directory and then use a second command to collect the username variable for granting the permissions 1
KevWCFE Posted October 24, 2011 Author Posted October 24, 2011 Hi Matt, Thanks again for getting back to me. Wasn't expecting a reply so wasn't checking. Would you believe I did pretty much what you were suggesting. I used cacls not icacls though. It worked anyway so all sorted. Thanks again for your help throughout the issue. Once again the edugeek site has saved me a lot of reading and hair loss K
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now