Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
Mapping Another MAC Hard Drive Using Shell Script
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="37Shannon" data-source="post: 1814093" data-attributes="member: 401815"><p>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. </p><p></p><p>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:</p><p></p><p>open 'smb://User:User&123@MAC-SYSTEMB/Desktop'</p><p></p><p>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.</p><p></p><p>Now, this is an <em>OK</em> solution, but it is not an <u>ideal</u> 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.</p></blockquote><p></p>
[QUOTE="37Shannon, post: 1814093, member: 401815"] 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 [I]OK[/I] solution, but it is not an [U]ideal[/U] 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. [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Operating System
Mapping Another MAC Hard Drive Using Shell Script
Top