The script just loops through a list of usernames in the filename specified "script.sh 06 tempfile". So an example tempfile for me would contain:
Originally Posted by HodgeHi
If you are managing AD users then you can't create the home dirs etc with WGM - this script is just for using on an OS X server if it is the one with the user home folders on it.
After the summer I will have retired my utterly useless XRAID and Xserve controlling it to menial tasks (xraid will be moved to a x86 server running openfiler, at least I hope so). The apple users and windows users will all have files served over smb from a windows server instead. This gets me back filetype filtering and quotas again.
Thanks for the reply. I understand what you mean by the XRaid although i have yet to really push it. We are a primary school after all. I have decided to place most of the shares on there mainly for speed. With only a max of around 60 concurrent connections it should be quick enough. Well, we'll see after the 6 weeks.
The AD-OD sandbox paper i posted had a script to create the home dirs for the users in AD (it runs on the AD server, VBScript). I used this to create the users dirs but now need to copy the os x template into their home dirs too. This is the bit i am unsure about.
I will post an update if i can work out how to do it.
It's not the xraid itself that's the issue so much that os x is such a bad file server. 10.5 has mostly been a disaster from that point of view with crashing issues with both afp and smb. I've even had corruption with nfs!
I will just have one xserve doing OD and the other netboot/netinstall.
Oh thanks, now you tell me! ;)
Originally Posted by DMcCoy
I'm still a bit confused about that script. I take it 'tempfile' needs to be in the same directory as the script. What format does it have to be in? And whats the 06 for?
sorry for the really dumb questions :o
the file is just a list of usernames to loop through, one after another with a line break. It just reads it from the directory the script is in.
The 06 is take as an input for the year group. I have each year group as a sharepoint so 06, 05, 04 etc
The sharepoint for users strating in 06 would be
/Volumes/RAIDA/Users/Students/06 (on the network as server\06) so all the script does is replace the $1 with the first variable passed to the script. Use 07 tempfile and it gets created in the 07 folder :p
I had high hopes for 10.5 as I had managed to get 10.4 stable (after around 10.4.8) but it's just got worse and worse. I'm looking to merge my mac and windows home folders back together and sharing them from a windows server!
Still a bit stuck though.
Ive edited the script to reflect my folder structure and changed MEDINA - I assume I need to put the name of my domain in there?
Anyway, I run it as "sudo sh script.sh year10 tempfile"
And I get:
'cript.sh: line 4: syntax error near unexpected token 'do
'cript.sh: line 4: 'do
Dont really understand what that means...I really have no idea with bash scripts, sorry.
I copied the script into notepad (since I can only get on edugeek on an xp VM) and then opened the .txt file in OSX and saved as .sh. That wouldnt have broken some formatting would it? It all looks fine
It may have broken the line endings, you could ssh to the server with putty and paste it into a new nano file and then save, hopefully that won't mess up the formatting.
OK now got a problem, for no obvious reason, where when users log in, the documents, downloads etc folders arnt created, when they were before.
Nothing at all has changed, permissions are set right, it doesnt make sense.
They are still given their network folder, but the documents shortcut in the dock shows a question mark and theres only library and a few other folders created
OS X will not create the folders for AD users afaik. Thats why I was running the script to copy the template to their home folder.
Oh right, didnt see the template bit
Weird though, because the first 2 test users I tried, it created all the folders automatically
Some are create by os x when it finds they are not there, you will know if it's copied the template as the ichat icons will be in the Pictures folder.
Well I just couldnt use that script at all, I corrected whatever spaces had been put in at line 4, but then it had trouble with the 'else' at the end, and hours of changing and retyping it later it still wouldnt run.
So in the end, I turned on SMB, and created the folders and set the permissions with a windows script. Obviously I'm missing the template this way, but it creates the desktop, downloads and library folders, and ive created the Documents folders with a script.
Seems to work well enough.
Not perfect but I was rapidly running out of time and have a lot of other things to do.
Thanks for all your help dmccoy, and sorry for all the stupid questions.
Theres still little bits to sort, the printers via managed prefs is one of them, but all the user creation and authentication bits are done so I'm happy
how many users do you have? I only had around three hundred or so and decided to manually copy the template profile into each home dir. Once I had edited the template by logging in as a user and then copying that template into the english.lproj template folder using the template app found on the apple-scripts site. I then copied the template onto the desktop. I then copied them manually into each user dir. With the acls propergating through the folders the permissions were created as the files copied in as expected. The only issue I saw was the drop box but we don't use them anyway. I would like to use the script method and will look into it when I have more time.
For converting line endings I found textwrangler really good as you have the option at the save prompt to choose which type of carriage returns to use.
Good luck with your adventures. I've yet to find out if mines gonna hold up to the task. That day is Monday.
Ive got about 300 in each year, and years 10, 11, 12 and 13 use the Macs so thats 1200...bit too many to do manually lol
But yeah I do find that doing things manually sometimes is quicker than fiddling for hours trying to get the 'quick' way working.
Good luck for Monday. I've got till Wednesday, will be glad when its survived a day in 'action'