Posted on 02-09-2009 07:06 PM
Hello,
I have deployed an image for 11 iMacs but have had a tough time getting rid of menubar items. They are removed when I am booted from an external drive containing the partition I image, but after that image is deployed to all the iMacs I get Time Machine, Airport and other unwanted menubar items again.
I have searched for a script to run after imaging to solve this with no success. Do any of you have a script you use or another solution to remove unwanted menubar items?
Thanks in advance.
Ron Prue
Technical Services
Noah Corporation
435.214.2928
ron.prue at mynoahs.com
Posted on 02-10-2009 06:21 AM
Ron
I went through the same thing last year. What I do is create a nested group of all my groups that I need to manage the menu bar for in WGM. Then, select your nested group and select preferences. Once the preferences pane opens, you need to click on the details tab. Add the following application by hitting the plus sign, /System/Library/CoreServices/Managedclient/.app. Once you add that you can manage the menu items. For example I got rid of TimeMachine on every mac in our network because i did not want to support it. So, I used this method. You should create a new key, and say always, then choose your menu item of choice you wish to manage, choose boolean for the type and choose false for the value. Linked is what it should look like once you add in the proper settings.
http://i120.photobucket.com/albums/o189/tlarkin80/Picture1-3.png
Then MCX will push this out to every machine on your network and you can then manage menu items. I already put in a request to Apple to actually just make a menu items menu in WGM instead of doing it this way.
I also submitted this as a hint on OS X Hints website found here:
http://www.macosxhints.com/article.php?story080801104313882 ( http://www.macosxhints.com/article.php?story080801104313882 )
This should do what you want.
Posted on 02-10-2009 06:30 AM
Hi Thomas
I just emailed him a copy of my mcx file to edit as he pleased and then suggested he put it in /Library/Managed Preferences/
in case he didnt have WGM,
would that work?
Criss
Criss Myers
Senior Customer Support Analyst (Mac Services)
Apple Certified Technical Coordinator v10.5
LIS Business Support Team
Library 301
University of Central Lancashire
Preston PR1 2HE
Ex 5054
01772 895054
Posted on 02-10-2009 07:09 AM
Incase you don't have WGM, here is a script I use to make Time Machine go the way of the dodo.
#!/bin/sh
# killTimeMachine.sh
#
#
# Created by Harter, Ryan on 11/12/08.
# Copyright 2008 UWSP. All rights reserved.
# Disable Time Machine
/usr/bin/defaults write /Library/Preferences/com.apple.TimeMachine
DoNotOfferNewDisksForBackup -bool YES
/usr/bin/defaults write /Library/Preferences/com.apple.TimeMachine
AutoBackup -bool NO
# Stop putting it in the dock
/usr/libexec/PlistBuddy -c "Delete :add-app:0:path" /Library/
Preferences/com.apple.dockfixup.plist
# Get it out of the menu
/bin/mv "/System/Library/CoreServices/Menu Extras/TimeMachine.menu" "/
System/Library/CoreServices/Menu Extras/TimeMachine.menu.bac"
The menu portion should be similar for any other menu items you want to remove. I think this was inspired by something in the Resource Kit, but can't quite remember.
Ryan Harter
UW - Stevens Point
Workstation Developer
715.346.2716
Ryan.Harter at uwsp.edu
Posted on 02-10-2009 07:18 AM
I should add that PlistBuddy was not always included in OS X, you may need to run "/usr/bin/locate PlistBuddy | sed 2,10000d" and then use the one you find. If it wasn't included then it was generally found in package receipts.
Ryan Harter
UW - Stevens Point
Workstation Developer
715.346.2716
Ryan.Harter at uwsp.edu
Posted on 02-10-2009 07:53 AM
The menu bar items are all stored in ~/Library/Preferences/ com.apple.systemuiserver.plist.
You do have to use PlistBuddy to script them, because they are nested one level below the top. But PlistBuddy is included in 10.5 (/usr/ libexec/PlistBuddy)
Posted on 02-10-2009 09:06 AM
I will just add, if you aren't using OS X Server and MCX to manage your clients you may want to seriously consider doing so. It will save you so much time and effort and if you miss something in your image you can always fix it with nested group preferences. It is worth every penny of what it costs to set it up.
Now, I will get off my soap box and go back to work
Thanks
Posted on 02-11-2009 10:03 AM
Sorry for the slow reply. I was distracted with another project for a bit.
I am using Leopard Server and WGM, but not currently to manage mobile accounts or computers. It handles file serving, mail, ftp and VPN.
The machines I want to maintain are at another facility 60 miles away. They are public machines that I am trying to lock down and I image them occasionally but can't seem to repress the menu items. They are already managed by JSS and I would really like to try and accomplish this task using a policy/script if possible. If not, I can look into getting them managed by my server.
BRW, thanks for the replies. You guys are great.
Ron Prue
Technical Services
Noah Corporation
435.214.2928
ron.prue at mynoahs.com
Posted on 02-11-2009 10:09 AM
I sent off that script that I use, Maura also pointed out the plist that they are stored in. Did any of that work for you?
Ryan Harter
UW - Stevens Point
Workstation Developer
715.346.2716
Ryan.Harter at uwsp.edu
Posted on 02-11-2009 11:19 AM
Yes, sorry Ryan, I did get it and am will try implementing it after a test bed trial.
Thanks!
Ron Prue
Technical Services
Noah Corporation
435.214.2928
ron.prue at mynoahs.com
Posted on 02-11-2009 06:06 PM
While stumbling around in the dscl command line today doing something unrelated to this subject I noticed that there is a whole MCX subset of commands.
I would maybe look into that to see about scripting out certain things. It looks like it can do local management as well. If you type dscl, then once in interactive mode type -mcxhelp you will get a very long laundry list of items.
I actually had no idea that 10.5 version of dscl had that.....guess you learn something new every day huh?
Also, it seems that there is an option to import MCX from a server. So maybe there is no longer a need for log in/out to force an update to MCX, you can maybe now do it via script or command from casper policies!
Posted on 02-11-2009 11:58 PM
is that not the same as the WGM preferences you can set whilst in the local node, think i emailed you that earlier?
The same things you can do with WGM for a ldap account you can do for the local node
Criss
Criss Myers
Senior Customer Support Analyst (Mac Services)
Apple Certified Technical Coordinator v10.5
LIS Business Support Team
Library 301
University of Central Lancashire
Preston PR1 2HE
Ex 5054
01772 895054
Posted on 02-12-2009 04:53 AM
I've been managing MCX for a while via dscl, and if I recall correctly,
there were features in Casper 7 demoed at Macworld which will put a nicer
interface on it.
----------
Miles A. Leacy IV
? Certified System Administrator 10.4
? Certified Technical Coordinator 10.5
? Certified Trainer
Certified Casper Administrator
----------
voice: 1-347-277-7321
miles.leacy at themacadmin.com
www.themacadmin.com
Posted on 02-12-2009 06:53 AM
Criss
Well, if you are referring to exporting and importing MCX settings, then yes that is from what it looks like, totally possible. I have just never tried to apply MCX to a machine that wasn't bound to an Apple server. I wonder how well it works with mismatched OS versions and all other factors as well. I am also curious how often it updates. If I push out a MCX update via the dscl command, does it update instantly, or does it still require a log in/out for the full update?
Well, I will definitely be playing with this towards summer time as we like to keep a highly managed local account on every machine just in case the network goes down or they don't have a mobile account yet, or for whatever the reason may be we like to keep a local account so the machine can always be used. We like to keep that local account very highly managed so users are more inclined to use their actual account.
Have you played with configuring the MCX file by dscl? What were your experiences?
Thanks
Posted on 02-12-2009 07:07 AM
I got into MCX via dscl after reading Nigel Kersten's article on AFP548.
Rather than do a whole lot of typing and proofreading on the subject, I'll
just link to his article:
http://www.afp548.com/article.php?story=using-mcx-in-the-dslocal-domain&query=mcx
It's pretty cool stuff. What I do is limit my scripts to setting a single
preference, then I can apply those scripts singly or in groups via Casper
policies.
----------
Miles A. Leacy IV
? Certified System Administrator 10.4
? Certified Technical Coordinator 10.5
? Certified Trainer
Certified Casper Administrator
----------
voice: 1-347-277-7321
miles.leacy at themacadmin.com
www.themacadmin.com