Posted on 09-01-2021 12:14 PM
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!
09-01-2021 12:25 PM - edited 09-01-2021 12:25 PM
Also very interested in this thread.
Posted on 09-02-2021 11:29 AM
We've used a variety of solutions in the past but in recent years have settled on the built-in functionality of NoMAD, which seems to be pretty robust.
Posted on 09-03-2021 10:03 AM
Did you ever find a solution for this? I'm also struggling find a good method that won't prompt for credentials.
Posted on 09-03-2021 12:52 PM
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.
Posted on 09-09-2021 09:44 AM
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
#!/bin/bash
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.plist
The commands complete without error, but it doesn't look like the plist was created.09-13-2021 07:04 AM - edited 09-13-2021 07:04 AM
@jcarr That works, however, the shortcut ends up being a "?".
Tried using "smb" and "cifs".
Posted on 09-13-2021 07:09 AM
If using the SSO Plugin take a look at Section 5 of this guide for how to have Drives "Auto-Mount" when connected to the network. https://hcsonline.com/images/PDFs/Jamf_Kerberos.pdf