Posted on 06-20-2019 12:58 PM
How do you get SMB network shares to mount using Jamf Configuration Profiles, under macOS Mojave 10.14.5? All that I have seen is various bash and AppleScript scripts. I was looking for a way to mount the shares without resorting to scripting.
Posted on 06-22-2019 08:08 AM
Hi,
I'm working at the university Erlangen-Nuernberg. We developed a tool to mount network shares via predefined Configuration Profiles. The tool (written in Swift) is started by a LaunchAgent at every network change (for automatic remounting) and when a user logs in. This is done in the background, without any user interaction.
Profile example:
<?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>networkShares</key> <array> <string>smb://home.your.domain/%USERNAME%</string> <string>smb://filer1.your.domain/share</string> <string>smb://filer2.your.domain/another share/foobar</string> </array> </dict> </plist>
We recommend the use of kerberos tickets or mount the shares once manually to store the password in the keychain. That's because we don't want the user to be messed up with any message.
The default mount path is in the users home. We also created a policy to add the folder (~/network share) automatically to the users dock. That's easier for them ;)
You can find it here: https://gitlab.rrze.fau.de/faumac/networkShareMounter
Posted on 01-20-2022 08:52 AM
We just released the new version of the Network Share Mounter (v2.0.0). It's a whole new app - living in the menu bar of a user. Here are some of the new features:
To our repository: https://gitlab.rrze.fau.de/faumac/networkShareMounter
If anyone has a question, problem or feature request, please feel free to contact us.
Posted on 05-23-2024 04:28 PM
Yeah, looks pretty cool.
How do you implement this with JAMF Pro?
There are no clear directions on how this works with JAMF.
Posted on 05-24-2024 04:43 AM
What do you mean with "implement with Jamf Pro"? There are AutoPkg Recipes for packaging. Jamf Manifets for the configuration and configuration notes regarding i. g. autostart and managed login items.
Posted on 06-15-2021 12:10 AM
HI,
I ran into a problem here, the home drive is mapped without a problem. but all other shares that were distributed via config profile as given in the example seem to be ignored.
do you have any idea here ?
Posted on 06-15-2021 07:57 AM
This may not be optimal for your situation, but we use NoMAD to auto-mount SMB shares dynamically with a NoMAD Shares profile (AD environment here). I think Jamf Connect can do the same thing as well.
Posted on 06-15-2021 08:02 AM
We never really got a configuration profile consistently working for this.
For years we used MacMule's very useful script here but more recently we map network shares via NoMAD, and it works very well.
Posted on 06-16-2021 12:36 PM
@mark.mahabir Do you ever see duplicate (or "zombie") SMB mounts in /Volumes with NoMAD?
Posted on 06-18-2021 01:17 AM
@dstranathan I have seen a little bit of that in the past, yes. But nothing recently!
Posted on 06-18-2021 02:20 PM
@dschupp I have done exactly all as you described in the GitLap and also here, unfortunately it does not work, do you have a solution?
@dstranathan how did you NoMad Shares get to Work ?
Posted on 06-18-2021 05:49 PM
@SebastianH It's a MDM configuration profile (menu.nomad.shares) that contains a list of AD groups and a list of corresponding SMB shares basically.
Example of some of the NoMAD Shares options:
Automount = yes/no. Yes means that MoMAD mounts the SMB shares dynamically if the domain is reachable.
Groups = An array of the AD group(s) that are allowed to access the SMB share.
Name = The label that appears in the NoMAD menu.
URL = Example: smb://server.domain/share
(There are a few other options but these are the most common)
SMB shares appear under the NoMAD menu "Network Drives" section. A checkmark indicates the drive is mounted already.
Refer to these NoMAD Shares docs
Posted on 06-21-2021 12:50 AM
hi @SebastianH,
I didn't saw your first post, .. so sorry for my late reply. In that case it would be easier to create an issue in our repo.
Is it possible for you to post your profile here? To get a status code of the binary you can trigger it with the cli. ig:
./networkShareMounter
2021-06-21 09:35:18.155 networkShareMounter[:] smb://my-share: already mounted
2021-06-21 09:35:18.248 networkShareMounter[:] smb://my-home: already mounted
or:
./networkShareMounter
2021-06-21 09:44:51.093 networkShareMounter[:] smb://share-not-reachable unknown return code: 60
Posted on 06-22-2021 02:37 AM
[@dschupp ]
i think i found the issue, i just changed smb://server/share to smb://server.domain.com/share and it works
Posted on 01-07-2022 11:23 AM
Hello, I am having an issue getting devices to use the menu.nomad.shares.plist that is pushed down via a config file. I can see the config file on the device. But, when launching nomad no shares are mounted. I am not sure what is wrong. When I use the plist manually by placing it in the preference file for the user it works as expected.
Posted on 01-07-2022 11:56 AM
You might be able to reach out to Jamf regarding this issue, and there is a #NoMAD channel on the Mac Admins Slack too. Since Jamf Connect and NoMAD are similar in their SMB mounting configs you might find info there too.
Posted on 01-12-2023 02:42 AM
@doschupp I'm trying to implement networkShareMounter 2.1.1 to our environment.
And basically, it is working as planned but...
The shares are mounted successfully (macOS Ventura 13.1) but after a couple of minutes - without any shown to the user - share is suddenly ejected. It seems to reconnect automatically but this causes two problems:
- every unmount/re-mount seems to create a login error on our domain controller (username: DRIVE)
- and every unmount/re-mount creates an empty/orphant alias in the Networksharesfolder (Show mounted shares)
Any idea, what the causes are and how to solve it ?
Posted on 01-12-2023 11:55 PM
Can you send us your plist configuration? (i.g. email to rrze-mac@fau.de). The value `cleanupLocationDirectory` could be the solution for your second problem.
Posted on 01-16-2023 04:26 AM
Indeed, the value "cleanupLocactionDirectory" fixed my second problem.