Skip to main content
Question

Mount SMB share?

  • September 1, 2021
  • 7 replies
  • 58 views

Forum|alt.badge.img+3

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!

7 replies

CSCC-JS
Forum|alt.badge.img+8
  • Valued Contributor
  • 125 replies
  • September 1, 2021

Also very interested in this thread.


mark_mahabir
Forum|alt.badge.img+15
  • Jamf Heroes
  • 338 replies
  • September 2, 2021

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.


Forum|alt.badge.img+4
  • Contributor
  • 16 replies
  • September 3, 2021

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


Forum|alt.badge.img+21
  • Valued Contributor
  • 322 replies
  • September 3, 2021

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.


Forum|alt.badge.img+4
  • Contributor
  • 16 replies
  • September 9, 2021

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

#!/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.

CSCC-JS
Forum|alt.badge.img+8
  • Valued Contributor
  • 125 replies
  • September 13, 2021

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.


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

Tried using "smb" and "cifs".


SmilieK
Forum|alt.badge.img+7
  • New Contributor
  • 23 replies
  • September 13, 2021

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