Looking for the most reliable way to push SMB shares through Jamf Pro. I see a lot of old threads, scripting, 47 different approaches, etc. Never felt like I really saw a definitive answer.
I have ~100 AD-joined Macs on Jamf Pro (cloud hosted). We're moving 10 shares from our current Windows-based file shares to a Linux-based NAS that uses AD for authentication. Currently users just go to Finder and connect to server (Command + K), but really want to automate connections to shares and any updates we have in the future.
Appreciate any input on a nice and reliable way to do this!
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.
Thanks for the response. I'll look into that.
My last attempt was with creation of an app using Apple Automator to mount the drives. This worked for me when I was logged into the machine, but it's not a valid solution for our pc imaging team. I've been trying the following from the enterprise connect documentation
userName=$(stat -f %Su /dev/console) adRealm=pretendco.com passwordReminder=30
# Add pretendco.com domain
sudo -u $userName -H defaults write ~/Library/Preferences/com.apple.Enterprise-Connect adRealm -string "$adRealm"
# Notify the user 30 days before password expiration
sudo -u $userName -H defaults write ~/Library/Preferences/com.apple.Enterprise-Connect passwordNotificationDays -int "$passwordReminder"
# Populate Enterprise Connect share
sudo -u $userName -H /usr/libexec/PlistBuddy -c "add :shares array" ~/Library/Preferences/ com.apple.Enterprise-Connect.plist
sudo -u $userName -H /usr/libexec/PlistBuddy -c "add :shares:dict:path string smb:// server.pretendco.com/Users/$userName" /Users/$userName/Library/Preferences/com.apple.Enterprise-Connect.plistThe commands complete without error, but it doesn't look like the plist was created.