I have a number of (windows) networked drives that I need to connect to using my Mac - the trick is that on many of these servers I'd like to be able to connect directly to the c$ share. So I end up with a list of mounted volumes that look like:


Which causes great confusion in some of my applications.

My question is: Can I specify a custom name for a mount point? Something like:


I haven't been able to Google up any solutions for doing this, but I suspect that it should be possible. I currently connect using an Automator script, but I'm not afraid to shell script it either.

...or am I thinking about this the wrong way?

Thanks for your consideration...


You can do this in a shell script with something like:



if [[ -e "$mountpoint" ]]; then
    echo "Error: the path $mountpoint is already in use' >&2
    exit 1

mkdir "$mountpoint" || {
    echo "Error creating mount point" >&2
    exit 1

mount -t smbfs "//$username@$serverpath" "$mountpoint" || {
    echo "Error mounting smb://$mountpoint" >&2
    rmdir "$mountpoint"
    exit 1

There are some caveats with this method: first, while this mounts the server volume under the path /Volumes/server1, it'll still show up in the Finder as C$. Programs that access files by path will not be confused, but you will be.

Second, this will prompt for the server password in Terminal. It would possible to include the password in the form "//$username:$password@$serverpath", but then the password is visible to anyone who does a ps listing. Unfortunately, it does not seem to use passwords stored in the keychain.

Finally, the /Volumes directory is normally used by OS X's various built-in volume mounting systems; I don't think adding manually mounted volumes will cause trouble, but there's a small risk of a conflict.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.