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.
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.
<?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
@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
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
./networkShareMounter 2021-06-21 09:44:51.093 networkShareMounter[:] smb://share-not-reachable unknown return code: 60