We have done this on each of the machines, however, when ssh Ing into the machine and trying to change directory to that folder it is not working.
We have both the share and the folder in logon items on start up.
I think the method suggested by
@VitoBotta will only mount the share when the user logs into the graphical user interface. It won't work if the user account is logged out, and then you log in with ssh.
You should probably try a bash script solution.
I haven't tried this in a long time, but here are some commands that may point you in the right direction. I don't have time right now to test thoroughly, so my apologies if it doesn't work right off...
smbutil view //username@machinename
mkdir ./local-mount-point
mount -t smbfs "//username@machinename/the/share/path" ./local-mount-point
If the pathname has a space, use something like
"//user@mymac/Home%20Videos"
(Keep the quotes!)
I have notes that say:
"Always use 'mount' and not 'mount_smbfs', according to the man page."
and
"the user (on the remote file-serving Mac), must have a special setting, "Windows File Sharing", or else the password will always be rejected."
Go to System settings-->Sharing-->File Sharing (i button)-->select the desired folder-->hit the Options button and in the Windows File Sharing section, check the user account to allow the user's password to be "stored in a less secure manner." !
Perhaps that's not needed anymore, but in the past it was required for the Terminal commands to work, and I think it still is.
Resources:
man smbutil
man mount
man mount_smbfs