Posted on 07-17-2008 11:20 AM
I there a repeatable way to set the system so that the Shared sidebar does not show up? I have set all the sharing and screen sharing as off but the sidebar still shows seemingly random computers on the local subnet.
thanks.
------------------------------------------------
Those who believe in telekinetics, raise my hand
--Kurt Vonnegut
Eric Young
eyoung at thayer.org
781-664-2286 Work
Posted on 07-17-2008 12:42 AM
Ooh! I did this after much digging. I don't have the info in front of me,
but if no one beats me to it, I'll post it here when I get back from my
business trip.
Posted on 07-17-2008 11:29 AM
Those are all the bonjour reporting computers on the subnet showing up. So far the only things I've seen from Apple are to use Managed Preferences or to completely turn off Bonjour and mDNS on Windows computers, but I'm not a fan of either solution. We still want it to be there to show mounted servers. I 'believe' this is a finder preference, so you should be able to change that and then apply it as a user environment to the user templates and also not allow the screenSharing app to be run except for people we want to have it running for.
-John
Posted on 07-17-2008 11:58 AM
Oi.
if it were a snake I'd be dead.
thanks.
------------------------------------------------
Those who believe in telekinetics, raise my hand
--Kurt Vonnegut
Eric Young
eyoung at thayer.org
781-664-2286 Work
Posted on 07-17-2008 02:06 PM
Remove all but the following from the entry:
All of your bound clients will have the "Sharing" section turned off.
Note: If the user turns any portion of it back on in Finder/
Preferences, the "Sharing" will return (escalations might get this
fixed... hint, hint)
Of course you are using WGM/MCX to manage your Mac preference policies, right?
:-)
--
John DeTroye Email: johnd at apple.com
Sr. Consulting Engineer Work: 303-933-1807
Systems Management Specialist Fax: 303-979-6616
Apple - Education iChat: johnd at mac.com
Tips and Tricks Docs - http://idisk.mac.com/johnd
Posted on 07-17-2008 02:25 PM
Thanks, John. That's it.
If you're not using WGM/MCX, Œdefaults write' is your friend. Just remember
that this is a per-user preference. A script in a Casper policy triggered
at every login will simulate the 'often' frequency in WGM. Just make sure
to target ~/Library.
John, are you saying if you set the prefs to 'often' in WGM, then the client
re-enables sharing in the Finder prefs, then the client logs out and logs
back in, that the shared prefs do *not* go back to their managed state? The
behavior you describe is the intended function of 'often'. 'Often' sets
your indicated preference at login, but the client can change it during
their logged in session. At their next login, the preference should return
to its managed state.
If you want a setting to be managed, stay managed, and not be alterable by
the client, you need to use the 'always' frequency.
Am I misunderstanding? Is this preference behaving differently?
Posted on 07-17-2008 02:55 PM
Just this specific setting refuses to follow the rules. "Often" will reset at logout to admin-defined values, normally. There's always something that just won't follow the rules. And if you are managing more than a few Macs, using the defaults command just seems like a lot of work versus setting network-based policies; but that's just me...
johnd
--
John DeTroye Email: johnd at apple.com
Sr. Consulting Engineer Work: 303-933-1807
Systems Management Specialist Fax: 303-979-6616
Apple - Education iChat: johnd at mac.com
Tips and Tricks Docs - http://idisk.mac.com/johnd
Posted on 07-17-2008 07:15 PM
I run a shell script to handle this. Here's my code for this:
#!/bin/sh
#
# Created by Kevin Bernstein on 2008-06-13. All rights reserved.
#
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/lib:/usr/
local/include:/usr/bin:/bin:/usr/sbin:/sbin"
LEOUSERLIST=dscl . list /Users home | awk '/Users/ { print $1 }'
USERNAMES=(${LEOUSERLIST})
echo "";echo "* * Sidebar Update"
for (( i = 0 ; i < ${#USERNAMES[@]} ; i++ ))
do
USERSFOLDER=`dscl . -read /Users/${USERNAMES[$i]} home | awk -s
{'print $2'}`
if [[ -e $USERSFOLDER/Library/Preferences/
com.apple.sidebarlists.plist ]]; then
/usr/libexec/PlistBuddy -c
"set
:networkbrowser:CustomListProperties:com
.apple.NetworkBrowser.bonjourEnabled false" $USERSFOLDER/Library/
Preferences/com.apple.sidebarlists.plist
chown ${USERNAMES[$i]} $USERSFOLDER/Library/Preferences/
com.apple.sidebarlists.plist
chmod 600 $USERSFOLDER/Library/Preferences/
com.apple.sidebarlists.plist
echo "updated sidebar setting for ${USERNAMES[$i]}'s existing
pref" `defaults read $USERSFOLDER/Library/Preferences/
com.apple.sidebarlists networkbrowser | grep
com.apple.NetworkBrowser.bonjourEnabled | awk {'print$1,$3'}`
else
touch $USERSFOLDER/Library/Preferences/com.apple.sidebarlists.plist
/usr/libexec/PlistBuddy -c
"set
:networkbrowser:CustomListProperties:com
.apple.NetworkBrowser.bonjourEnabled false" $USERSFOLDER/Library/
Preferences/com.apple.sidebarlists.plist
chown ${USERNAMES[$i]} $USERSFOLDER/Library/Preferences/
com.apple.sidebarlists.plist
chmod 600 $USERSFOLDER/Library/Preferences/
com.apple.sidebarlists.plist
echo "created sidebar pref for ${USERNAMES[$i]} and set it to
disallow Bonjour shares" `defaults read $USERSFOLDER/Library/
Preferences/com.apple.sidebarlists networkbrowser | grep
com.apple.NetworkBrowser.bonjourEnabled | awk {'print$1,$3'}`
fi
done
exit 0
I realize there are no comments. Sorry. But basically, this querries the local system to find the home directory of every user, then iterates through the accounts attempting to update their com.apple.sidebarlists.plist. If a plist is found then it updates it. Otherwise if not found, it creates it and writes the preferences. It uses PListBuddy (which I found easier to use for this situation). PListBuddy may or may not be in /usr/libexec by default, but is hard coded in this script. Also there's also some chmod and chown code as this runs as root in a postflight script. I have only tested this with local users, so I don't know what the experience would be like for network home users.
NOTE: I have just joined the list for device management ideas. I do not use Casper Suite... but believe this could be pushed out using the scripting interface or pushed as a package, where the above is a postflight script.
Kevin Bernstein
Desktop Engineering & Support
Posted on 07-18-2008 04:40 AM
Excellent thank you.
-------------------------------------------------------------
Where we have strong emotions, we're liable to fool ourselves.
- Carl Sagan
Eric Young
eyoung at thayer.org
Posted on 06-21-2018 12:46 PM
Same question but 2018 and I'm managing Macs. I don't see an on/off feature in my Finder configuration profile settings, is there another way to hide these shared computers? Thanks!