Mount SMB share?

New Contributor II

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!


Contributor II

Also very interested in this thread.

Valued Contributor

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.

New Contributor

Did you ever find a solution for this? I'm also struggling find a good method that won't prompt for credentials.

Release Candidate Programs Tester

Why not just use a profile to add an item to the Dock?Screen Shot 2021-09-03 at 3.46.47 PM.png


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.

New Contributor

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)
# Add domain
sudo -u $userName -H defaults write ~/Library/Preferences/ adRealm
-string "$adRealm"
# Notify the user 30 days before password expiration
sudo -u $userName -H defaults write ~/Library/Preferences/
passwordNotificationDays -int "$passwordReminder"
# Populate Enterprise Connect share
sudo -u $userName -H /usr/libexec/PlistBuddy -c "add :shares array" ~/Library/Preferences/
sudo -u $userName -H /usr/libexec/PlistBuddy -c "add :shares:dict:path string smb://$userName" /Users/$userName/Library/Preferences/
The commands complete without error, but it doesn't look like the plist was created.

Contributor II

@jcarr That works, however, the shortcut ends up being a "?".

Tried using "smb" and "cifs".

New Contributor III

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.