image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X Server

Reply
 
Thread Tools
  #1  
Old June 1st, 2005, 01:10 PM
Registered User
 
Join Date: May 2004
Location: Ontario Canada
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
closer is on a distinguished road
Question forced user prefs problems

I've got a couple of different questions that I've also posted in the Apple discussion site (but as usual don't expect a reply from... nobody ever seem to answer much there)... anyway, hope we can come up with some dialogue here...

In MacManager I used to be able to force preferences into a users account on their startup... can't seem to figure out where to do this in WorkGroup Mgr (10.3.8 on both client and server)... One pref I want to make standard on user startup is the Safari one.... I want to be able to share a series of tabs with entire student population, and initially with the teachers... and also have the history cleared after each session so it is not available next session...

any ideas where I should look?
__________________
School Macs: OSX Server Dual 2.5 G5 OSX 10.3.9
Network of 42 iMac 500 and 600's OS10.3.9 and 1.25 emacs + 6 - 20" Dual imacs
Home Apples: everything from 1981 onwards!
Reply With Quote
  #2  
Old June 1st, 2005, 01:18 PM
Michael Dhaliwal, ACSA
 
Join Date: Mar 2003
Location: Chicago, IL
Posts: 1,057
Thanks: 0
Thanked 2 Times in 2 Posts
Go3iverson is on a distinguished road
Hmm, so you want to push out safari bookmarks, as tabs, to all of your clients at login?

Here's what I'd do...

Set up a clean version of Safari with those bookmarks. Take the ~/Library/Safari/Bookmarks.plist file from the ideal Safari config and place it in an area accessable by all of your clients, either on a server or maybe in /Users/Shared.

Write a quick script that takes the Bookmarks.plist file from that public area and copies it to ~/Library/Safari/ for the user that's currently logging in. Make that script a managed login item on all your clients via Workgroup Manager.

Obviously, try this in a test environment first!

Hope this helps!
__________________
Michael Dhaliwal
ACSA, Xsan Certified, etc, etc...
District13 Computing
Reply With Quote
  #3  
Old June 1st, 2005, 01:46 PM
Registered User
 
Join Date: May 2004
Location: Ontario Canada
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
closer is on a distinguished road
wow... I knew this board was way better than AppDiscGroup... thanks for the speedy answer

Quote:
Originally Posted by Go3iverson
Hmm, so you want to push out safari bookmarks, as tabs, to all of your clients at login?
We kind of have to do this to retain our internet access (Young Offenders Facility and security is an issue)... also don't want xxx.com stuff bookmarked!!

Quote:
Originally Posted by Go3iverson
Set up a clean version of Safari with those bookmarks. Take the ~/Library/Safari/Bookmarks.plist file from the ideal Safari config and place it in an area accessable by all of your clients, either on a server or maybe in /Users/Shared.
no problem doing that... sounds similar to what I used to do in MacMgr and with (shiver) IE pref's only all I had to do there was drop the IE prefs in the forced preferences folder (MacMgr) on the server

Quote:
Originally Posted by Go3iverson
Write a quick script that takes the Bookmarks.plist file from that public area and copies it to ~/Library/Safari/ for the user that's currently logging in. Make that script a managed login item on all your clients via Workgroup Manager.
there's where it breaks down for me... don't know much about script writing, and in WrkGrpMgr I assume you're talking about the group preferences?... is this where I would activiate the script (that I don't really know anything about)

Quote:
Originally Posted by Go3iverson
Obviously, try this in a test environment first!
I have a test setup so the hounds aren't after me daily!!

out in the boonies with nobody to talk to but you guys... so thanks for your help... much appreciated...
__________________
School Macs: OSX Server Dual 2.5 G5 OSX 10.3.9
Network of 42 iMac 500 and 600's OS10.3.9 and 1.25 emacs + 6 - 20" Dual imacs
Home Apples: everything from 1981 onwards!
Reply With Quote
  #4  
Old June 1st, 2005, 01:59 PM
Michael Dhaliwal, ACSA
 
Join Date: Mar 2003
Location: Chicago, IL
Posts: 1,057
Thanks: 0
Thanked 2 Times in 2 Posts
Go3iverson is on a distinguished road
Yup, you got it right. In the group preferences in WGM you can set up login items. Try something like this:

#!/bin/bash
#Copy prefs from /Users/Shared to ~/ for Safari
#
#Written by Michael Dhaliwal

ditto -rsrc /Users/Shared/Bookmarks.plist ~/Library/Safari
exit

I haven't tested it, but its simple and the syntax is pretty straight forward for you to edit how you please. Simply takes the Bookmarks.plist file and moves it to the specified directory. Make sure to give the script proper permissions to run. Check out man chmod. You could use 755 for this, if you like.

__________________
Michael Dhaliwal
ACSA, Xsan Certified, etc, etc...
District13 Computing
Reply With Quote
  #5  
Old June 1st, 2005, 02:48 PM
Registered User
 
Join Date: May 2004
Location: Ontario Canada
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
closer is on a distinguished road
Quote:
Originally Posted by Go3iverson

ditto -rsrc /Users/Shared/Bookmarks.plist ~/Library/Safari
exit
newbie question again... so when the user logs in it activiates this script and moves the Bookmarks.plist to the users own own safari pref folder... and I also must be able to do the same with the History.plist??... is there also a standard .plist for safari that includes the setup to allow for tabs and other safari prefs?

and... another neewbie and... where do I input the above script... do I save it as a specific file that I then Add through the Groups->Research (that's the name of our student group)->Preferences->LoginItems->Add... then locate the script by filename... or am I missing something here!

thanks again for bearing with a newbie
__________________
School Macs: OSX Server Dual 2.5 G5 OSX 10.3.9
Network of 42 iMac 500 and 600's OS10.3.9 and 1.25 emacs + 6 - 20" Dual imacs
Home Apples: everything from 1981 onwards!
Reply With Quote
  #6  
Old June 2nd, 2005, 11:27 PM
Michael Dhaliwal, ACSA
 
Join Date: Mar 2003
Location: Chicago, IL
Posts: 1,057
Thanks: 0
Thanked 2 Times in 2 Posts
Go3iverson is on a distinguished road
You could create a directory in /Library called LoginHooks and place them in there. If you want, you can tell loginWindow to execute the scrips for you at login (funny how that works, huh?!)

The terminal command looks like:

sudo defaults write com.apple.loginwindow LoginHook /Library/LoginHooks/ScriptNameHere

You should be able simply blow away the History.plist file. I'd think Safari would create a new one on first use. So add this into the script we've been assembling:

rm ~/Library/Safari/History.plist

Hope this is helping you! Workgroup Manager is a great tool from Apple and the scripting capabilities of OS X make it a real dream to work with!
__________________
Michael Dhaliwal
ACSA, Xsan Certified, etc, etc...
District13 Computing
Reply With Quote
  #7  
Old June 3rd, 2005, 09:32 AM
Registered User
 
Join Date: May 2004
Location: Ontario Canada
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
closer is on a distinguished road
once again... many thanks!

what I'm realizing now is that I should be attending AppleScriptWriting school somewhere!... is there a site online that you can recommend that is good for starting a real AS newbie about AS?... then maybe I wouldn't be bugging you about some of the basics...
__________________
School Macs: OSX Server Dual 2.5 G5 OSX 10.3.9
Network of 42 iMac 500 and 600's OS10.3.9 and 1.25 emacs + 6 - 20" Dual imacs
Home Apples: everything from 1981 onwards!

Last edited by closer; June 3rd, 2005 at 09:59 AM.
Reply With Quote
  #8  
Old June 3rd, 2005, 05:25 PM
Michael Dhaliwal, ACSA
 
Join Date: Mar 2003
Location: Chicago, IL
Posts: 1,057
Thanks: 0
Thanked 2 Times in 2 Posts
Go3iverson is on a distinguished road
Nah, bug away! I like to give folks help. We've all been new to this at some point or another.

The scripts I've been giving you are shell scripts. That's the more UNIX way of scripting for OS X. There also is AppleScript, which works on the Mac platform quite well and is a more English based syntax. You can find lots of docs on AppleScript on Apple's site and the developer.apple.com website as well. Those are free.
__________________
Michael Dhaliwal
ACSA, Xsan Certified, etc, etc...
District13 Computing
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -5. The time now is 04:37 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.