Sigh! Novice who needs advice (please read)

curtblunt
New Contributor

First time poster, been on here before but only just realised how big the community is on here so I thought I'd try my chances and publish a few of the problems I am currently experiencing with my MAC OS network.

Background information first things first.

School environment with 120+ iMac/Macbooks
I have created a Mac server (10.11.6 and Server 5.2) - installed Open Directory and Profile Manager, linked all Profile Manager tokens etc.

Created a Device Group on Profile Manager (MCX) and enrolled a test Macbook to the Device Group. I then started to create some placeholder configurations for the MCX group (restrictions/dock settings blah blah the usual stuff)

I used to use Workgroup Manager so I know pretty much the settings I need to set for the MCX group.

MCX preferences seem to be working, however this is where I am now stuck. Inside PM I noticed there was Groups linking to back to my Windows AD

I found our Student/Staff security group.

I want Students to be able to have

Home Folder (docked/sidebar)
Student Shared (docked/sidebar)

I want Staff to be able to have

Home Folder (docked/sidebar)
Student Shared (docked/sidebar)
Staff Shared (docked/sidebar)

Been searching and searching for applescripts as I can't get Profile Manager to work on Login Items (authenticated network mount) it doesn't do anything, just a question mark on the Dock and doesn't open.

Home drive works on the dock, but I need them on the sidebar.

I would really appreciate if someone out there could help me out, and guide me in the right direction. I could even donate.

Thanks for your time (sorry it's a long post)

Curt Blunt
curt.blunt@heathpark.net

3 REPLIES 3

chzar
New Contributor III

Dock item management is not a strong suit of JSS. There are two 3rd party utilities that work very well: dockutil and Dock Master. Since you want to add network folders, I would recommend you take a look at Dock Master.

Dock Master: http://errorfreeit.com.au/blog/2015/4/28/dock-master

dockutil: https://github.com/kcrawford/dockutil

For adding sidebar items , I wrote a script to add a network share to the sidebar. I wrote it for deployment via Self Service, but you could run it via a launch agent.

#!/bin/bash
protocol="$4"
serverName="$5"
shareName="$6"
user=$(stat -f%Su /dev/console)
# Mount the drive 
osascript << EOD || exit 1
    tell application "Finder" 
    activate
    mount volume "$protocol://${serverName}/${shareName}"
    end tell
EOD
su - "$user" -c "/usr/bin/sfltool add-item com.apple.LSSharedFileList.FavoriteItems file:///Volumes/${shareName}"
su - "$user" -c "/usr/bin/sfltool add-item -n ${shareName} com.apple.LSSharedFileList.FavoriteServers file:///Volumes/${shareName}"
exit 0

millersc
Valued Contributor

Sidebar is one of those things Apple hasn't given admins easy control of. There are some scripts out there, one that seems to be popular is SidebarLists @matt4836. There are some threads here with some instructions. I haven't used this since it's not a priority on my todo list. Dock and desktop icons are good for our little kids.

jhuls
Contributor III

I hadn't heard of SidebarLists but I've been using mysides for awhile now. I've not used sfltool yet but it's new as of El Capitan so if you have older systems, it's a non-starter. Also I'm wanting to think sfltool couldn't remove items from the sidebar. I can't say that with confidence though since I've not used it...I just remember someone stating that after El Capitan was released.