-
-
Save natritmeyer/6621231 to your computer and use it in GitHub Desktop.
#Mounting the share is a 2 stage process: | |
# 1. Create a directory that will be the mount point | |
# 2. Mount the share to that directory | |
#Create the mount point: | |
mkdir share_name | |
#Mount the share: | |
mount_smbfs //username:[email protected]/share_name share_name/ | |
#Unmount the share: | |
umount share_name |
mount_smbfs: mount error: /Users/machenchi/shareDev: No such file or directory
But I have made a dir withmkdir /Users/machenchi/shareDev
@vaxilicaihouxian @mwmcode I had the same issue. I fixed it by putting the last argument (i.e the mounting point) in quotes. So, the original command becomes:
mount_smbfs //username:[email protected]/share_name "share_name/"
For those who keep getting File exists
without sudo
it may be that you already have that drive mounted in Finder. In my case I was exploring the drive in finder. When I unmounted that it worked a charm.
Details and an automation script available: https://stackoverflow.com/a/78877529/945789
For those who keep getting
File exists
withoutsudo
it may be that you already have that drive mounted in Finder. In my case I was exploring the drive in finder. When I unmounted that it worked a charm.Details and an automation script available: https://stackoverflow.com/a/78877529/945789
so it is!
Just tested and confirmed this also works:
mount -t smbfs //username:[email protected]/sharename mountfolder
You can leave the password off and be prompted for it.
You can leave the username off if it matches your current username.
mount -t smbfs //server.name/sharename mountfolder
Can update the gist for Monterey which requires adding
WORKGROUP
?mount_smbfs //'WORKGROUP;username':password@remote-host/shared local-mount-point/