Imported from the Apple Support Forums via the Wayback Machine 🔗
Hi all,
I am trying to write a script that mounts several samba drives and moves files around.
Now, the command
mount_smbfs //whatever@adrive/share /Volumes/test
works perfectly, asking me for a password; however, if I put the password as specified in the man page for both mount and mount_smbfs, it says that the test directory exists, no matter if this is true or not.
I tried to create it, to remove it, but nothing changes.
Imported from the Apple Support Forums via the Wayback Machine 🔗
I have no SMB shares to try with, but have you tried using any of the mount command examples at the end of the man page for mount_smbfs? mount_smbfs calls the mount command to do its job. Using mount may help isolate your issue.
In all cases, though, you should use mkdir to create the mount point prior to calling mount/mount_smbfs. Your text didn't make it clear you were always doing so.
0
miguelastico·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Hi; thanks for the reply
Yes, I tried all the examples on the man page, and I tried either creating the directory, either not creating it.
this are the attempts (just the "/" changes) with mount
mount -t smbfs miguel:password@//10.0.1.3/movies ./dir
but nothing
still, without password I can access (and then I am asked to put it, making this not suitable for a script)
0
D7·
Imported from the Apple Support Forums via the Wayback Machine 🔗
Are the examples you're showing the exact statements you are executing, or are you using environment variables to populate or any else that might permute the statements?
If by chance you are executing these in a script with environment variables it might be helpful to copy the execution line and echo it to the terminal to verify it is resulting in exactly what you expect.
Also, I noticed that mount_afp has the same syntax as mount_smbfs except that mount_afp includes 'afp:' before the two slashes. Might be worth a try to add 'smb:' or 'smbfs:'. The statement I use to mount my AFP shares is: