I think I can get you started, but using terminal commands, which you said you'd prefer to avoid. Apologies, but it might give you a starting point. All of the following you could put in a bash script and run as a login item.
You'll need to first share out the target drive(s) (MyBook
in the examples below) using file sharing (System Preferences > Sharing > check the File Sharing box, add the drives you need and set appropriate permissions - I just use Everyone to keep it simple).
You can mount a remote machine and/or its associated drives using mount like so:
Make a directory as the mount point (obviously call test
whatever you want):
mkdir /Volumes/test
Now mount the remote drive. I'm assuming this is already connected to your iMac and appears when you connect to your iMac using Finder:
mount -t afp afp://<your mac's name>/<drive name to mount> /Volumes/test
On my remote Mac Mini, to connect to my MyBook attached to it via USB, that would be:
mount -t afp afp://bobs-mac-mini/MyBook /Volumes/test
If you need to authenticate (I got error -5000
when trying to mount my home folder), you can also do this using
mount -t afp afp://<username>:<password>@<your mac's name>/<drive name to mount> /Volumes/test
However, the password would unfortunately have to be in the clear. So again, this might be:
mount -t afp afp://binarybob:password123@bobs-mac-mini/MyBook /Volumes/test
You can also connect to your home folder using the above method, just by replacing MyBook
with the name of your home folder.
The drive you mounted should now appear in the finder and you should be able to use it like any other locally mounted drive. When you're finished, you can do:
umount /Volumes/test
to remove it. BTW, if you're not an administrator, you might need to add sudo
in front of each command and type an administrator password.
Best Answer
After upgrading to High Sierra, I had the same issue, coupled with SMB hanging without connecting to remote servers.
The SMB issue was solved by changing the SMB version to v2 in the /etc/nsmb.conf configuration file and rebooting the Mac as recommended in this post on SMB share deadlock. After the reboot with the new /etc/nsmb.conf, shared devices were again correctly listed in the sidebar, so I surmise both issues are linked.
The /etc/nsmb.conf file I use is: