Mac Thread, New Mac network - is this possible? in Technical; Originally Posted by HodgeHi
I like the look of this script but unsure as to how to pass usernames into ...
11th August 2008, 11:20 PM #16
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 to DMcCoy from:
HodgeHi (12th August 2008)
12th August 2008, 12:55 AM #17
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.
12th August 2008, 01:35 AM #18
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.
21st August 2008, 12:15 PM #19
21st August 2008, 12:27 PM #20
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
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!
21st August 2008, 04:39 PM #21
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
21st August 2008, 05:18 PM #22
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.
27th August 2008, 01:24 PM #23
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
27th August 2008, 02:20 PM #24
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.
27th August 2008, 03:19 PM #25
Oh right, didnt see the template bit
Weird though, because the first 2 test users I tried, it created all the folders automatically
27th August 2008, 03:37 PM #26
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.
27th August 2008, 05:17 PM #27
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
27th August 2008, 06:42 PM #28
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.
28th August 2008, 02:19 AM #29
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'
By Scruff in forum Wireless Networks
Last Post: 9th February 2010, 12:53 AM
By atfnet in forum Courses and Training
Last Post: 20th August 2009, 12:45 PM
Last Post: 15th February 2008, 05:22 PM
By woody in forum Windows
Last Post: 1st December 2007, 07:27 PM
By broc in forum Network and Classroom Management
Last Post: 10th July 2007, 12:54 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)