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>
Thanks,
Karthikeyan
This allows for specifying cifs: over smb: where required, and may therefore make it genius, great, thanks.
You might look into putting dockutil on your machines.
/usr/local/bin/dockutil --add smb://server/share/folder --label 'Network Share' --position end /Users/$user
For those who might like the link to dockutil, you can find it here...
https://github.com/kcrawford/dockutil
Thanks for the posts everyone! Karthikeyan.mac, that PLIST that you posted doesn't seem to work when I add it as a custom setting under the configuration profile. Is there another way to deploy it out?
The preference domain I am using is "com.apple.dock".
@cbrewer
I have tried your script with dockutil and ran it as part of the login policy, and found that the script ran as "root" instead of the user, so my $user is root instead of the logged in user. Any idea how to fix this?
Hi @wilsonch
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'"
etc
Hope that helps!
Darren
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.