Hi all. I'm trying to set a Dock item that will allow users to connect to file shares.
The server is an OS X Mavericks OD Master. However the accounts on the boxes are local, but the account names and passwords match what's in OD.
The mountNetworkShare.sh script works for me, but of course it works only at log-in. I need to set Dock items because these users are on laptops and come and go freely.
I've got dockutil working for applications, but I can't get it to work for network shares.
Either AFP or SMB will work, although in the not too distant future I expect to use SMB exclusively,
Any guidance would be hugely appreciated. Thank you.
Are you wanting users to auto login to these shares when they click on the dock icon?
If you know what you'd type in Go > Connect to Server you can write this in TextEdit (make plain text).
Once you've written what you want, highlight the text, hold alt and then drag it onto your desktop. This'll make an AFPLoc file (if AFP) or an inetloc if SMB.
You can add icons to these too.
Taken from another post (https://jamfnation.jamfsoftware.com/discussion.html?id=12873):
/usr/local/bin/dockutil --add smb://$server1/share/abc/$user --label 'Network Docs' --position end --no-restart /Users/$user
By any chances does the directory your trying to link to have a space in it?
A few weeks ago I was trying to do a similar thing. I mount students home directories using the "jamf mount" command, create a entry in the Finder Sidebar for it, and then use Dockutil to also drop it in the dock. I found that students with spaces in their home directory refused to appear in the dock. Dockutil acted normally and subsequential runs claimed the folder already existed it just didn't work.
Thanks johnnydford. Is this supposed to work with non-home folder shares?
Various forms of the following command:
dockutil --add smb://server.pretendco.com/Share --label 'Share' --position end --no-restart
give me the following result:
smb://server.pretendco.com/Share does not seem to be a home directory or a dock plist
I'm not mounting home folders. I'm just mounting basic shares.
OK, here's an update.
Spent lots of time working with JAMF support and we didn't get anywhere. However just after the web meeting I tried something just out of the blue, and it worked:
dockutil --add smb://server.pretendco.com/Share
That's all it takes via Terminal.
However, when pushing out the command via a Casper policy, on almost all devices I don't get the shortcuts. Most devices get none of the shortcuts, a few get one, even fewer get two. None are getting all three.
Touching each device with Terminal I can use the commands and the devices get the shortcuts. Sending the command with Apple Remote Desktop also works. It's just the policy that doesn't work consistently.
Should I be pushing these dockutil commands via Files and Processes?
@gskibum - did you ever get this working? Our teachers are getting frustrated with the question mark in their docks produced with FV and 802.1x in 10.10.4.
It's a shame with casperadmin you can't do custom path dock items with the $3 path @ login. Seems like it'd be the easy answer. I'd prefer a dock icon that doesn't mount the share until clicked versus a script to mount I think.
Here's a script I found in another thread if anyone is interested in that