Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

peros550

macrumors newbie
Original poster
Jun 6, 2018
26
5
I need to mount multiple SMB shares which all having the same name (i.e. Documents) macOS will mount them like this: Documents, Documents-1, Documents-2 etc which makes very difficult to distinguish which mount point corresponds to which server.

I have found two ways of mounting SMB share through script.

The following simplified statements seem to work, but they create a share which is only visibly by the root, so my current user has no access to it.
do shell script "sudo mkdir /Volumes/Documents180" user name "mac_user" password "mac_password" with administrator privileges

do shell script "sudo mount_smbfs //smb_user:smb_password@192.168.179.24/Documents /Volumes/Documents180" user name "mac_user" password "mac_password" with administrator privileges

The following method seems to create the share, which is visible by the local user, but there is no control over the mount point it creates in the system.
mount volume "smb://smb_user:smb_password@192.168.179.24/Documents/"


Is it possible to mount a share and select which mount point will be using ?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.