Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Mount smb server 'tree'

Hi there, I have some smb file servers (about 10) that I want to mount in a folder structure by running a script.

To make it visual:

/Volumes/company/management         - smb://fileserver1/mgmnt
/Volumes/company/Video
/Volumes/company/Video/public       - smb://fileserver2/public_video
/Volumes/company/Video/internal     - smb://fileserver1/internal_video
/Volumes/company/projects
/Volumes/company/projects/A         - smb://fileserver3/A
/Volumes/company/projects/B         - smb://fileserver3/B

(Obviously, I got a list of folder path and corresponding server shares to start from.)


The user will have to log in with his/her/it's user credentials and it would make sense if the user only has to enter these details once when running the script.


The first step to automating is doing it manually. While doing so, I noticed that if I 'connect to server..' from within Finder I'm asked for credentials once: on my first file server. When I connect to another server, osx seems to try the credentials it already has and it can connect to the second server without asking for a password again. This also works from AppleScript with


tell app "finder" to mount volume "smb://fileserver1/shareA"
tell app "finder" to mount volume "smb://fileserver2/shareB"


Unfortunately this lacks mount destination.


The only way I found for setting the mount destination is from bash with variants of mount/mount_smbfs that require a username and password to be entered for each and every one of them:

mount_smbfs //user:pass@filerserver1/shareA /Volumes/company/folderA


Any idea how I can get the best of both worlds?


Thanks!

Posted on Apr 26, 2019 3:23 AM

Reply

Similar questions

19 replies

Mount smb server 'tree'

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.