MacOS – Mounting an SMB share uses the share name and not the local directory name

macosmountsmb

I'm mounting an SMB share via the command line in 10.9 with the following:

mkdir /Volumes/MountName
mount_smbfs //user:password@server/Share$/SubDir /Volumes/MountName

Previously in 10.8 this would be mounted on the desktop with the MountName directory name I manually created for the mount point.

Now it's displaying with the remote share name Share$. The mount point hasn't changed and still appears as /Volumes/MountName.

How can I force the local name of a mounted drive in 10.9?

Best Answer

I think that you might be looking at the /Volumes/ folder with Terminal, right? But it shows the proper name of the same folder using Finder.

The share$ name in /Volumes/ only affects my shell scripts, so I've ignored the difference and life is not too bad ;)