- Joined
- Feb 12, 2019
- Messages
- 5
- Reaction score
- 0
- Points
- 1
- Your Mac's Specs
- Mac Mini (Late 2014) 8GB 1600 MHz DDR3 memory 500GB internal, 2TB external running El Cap 10.11.6
I have 2 Mac Minis known as SystemB and SystemC. My question is that, using a shell script invoked by cron under Terminal, I would like to mount the hard disk of SystemB from SystemC. This is easy enough to do using Finder, but none of the mount commands I've tried in my shell script have worked.
On a different forum, I found someone using Sierra had done this with the "open" command. Since I'm at the highest release of El Cap before the release of Sierra, I tried the "open" command to see if it worked, and it did. Here is the (sanitized) command I'm currently using:
open 'smb://User:User&123@MAC-SYSTEMB/Desktop'
Originally the user password contained an "@" (i.e., "User@123"), but I simply could not escape this no matter what quoting or backslash options I tried, so I changed the "@" in the password to an "&", which works as long as I quote the "open" argument as shown.
Now, this is an OK solution, but it is not an ideal solution, because the "open" command above opens a Finder window when the "open" completes. This means that every time my "cron" script runs, it opens the Finder window on my desktop. I would really rather it didn't do that. So, I'm still open to suggestions on how to network-map the hard-drive on SystemB from SystemC. There doesn't seem to be a "nfsmount" or "netmount" command in the shell, and I don't see (or, perhaps, don't understand) how any of the options on "mount" would let me do this.
On a different forum, I found someone using Sierra had done this with the "open" command. Since I'm at the highest release of El Cap before the release of Sierra, I tried the "open" command to see if it worked, and it did. Here is the (sanitized) command I'm currently using:
open 'smb://User:User&123@MAC-SYSTEMB/Desktop'
Originally the user password contained an "@" (i.e., "User@123"), but I simply could not escape this no matter what quoting or backslash options I tried, so I changed the "@" in the password to an "&", which works as long as I quote the "open" argument as shown.
Now, this is an OK solution, but it is not an ideal solution, because the "open" command above opens a Finder window when the "open" completes. This means that every time my "cron" script runs, it opens the Finder window on my desktop. I would really rather it didn't do that. So, I'm still open to suggestions on how to network-map the hard-drive on SystemB from SystemC. There doesn't seem to be a "nfsmount" or "netmount" command in the shell, and I don't see (or, perhaps, don't understand) how any of the options on "mount" would let me do this.