Under configuration profiles I tried to add a dock item pointing to an SMB share (smb://servername/sharename) but I just get a big question mark in the dock. What is the best way to add a network share to the dock?
I know I can add a network mount as a login item but this doesn't work very good for mobile users that boot up their laptop and then VPN.
Create a webloc file and put it on the dock. We don't add it dock but we add to users desktop.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>URL</key> <string>smb://abc.yourservername.com/share</string> </dict> </plist>
I've added the following to our dockutil script to get it to work as the user:
username="$3" if [ -z "$username" ]; then # Checks if the variable is empty (user running script from Self Service) username="$USER" fi echo "User: $username" dockutil="/etc/amsys/dockutil" su "$username" -c "$dockutil --remove all" su "$username" -c "$dockutil --add '/Applications/Microsoft Office 2011/Microsoft Word.app'"
Hope that helps!
Why not just use a profile to add an item to the Dock?
You can even use variables for the username etc. If the device is bound, the user will already have a TGT (verify using klist) from AD. If the device is not bound, you could use the Kerberos Single Sign-on Extension to get the user a TGT from AD.