When attempting to connect to smb://localhost/share, I receive an error that I ought to access the files locally. This is not always desirable. For example, this means I can not use my portable home on my Mac Mini that is serving the home directory.

Windows (via native SMB/CIFS) and other *nix systems (via Samba) can access local shares just fine. Why can I not do so on OS X?

3 Answers 3


According this this link it is possible:


Finder identifies smb:// as a local filesystem and refuses
to mount port 445 even if you've set up an SSH tunnel using

-L 445:localhost:445 

The solution is to alias your lo0 interface to and Finder doesn't see this as a local address.

sudo ifconfig lo0 alias up 

Create the ssh tunnel and map to your Samba / CIFS server

ssh user@remote -L 

Now you can open the share in Finder

smb://[email protected]
  • 1
    Thanks a lot for you anwser. I used this approach to access a virtualbox ubuntu guest on OSX. For me there has been only two little differences. First I had to create the ssh tunnel as 'sudo' and I opened the smb share with 'smb:// Commented Jan 5, 2017 at 10:36
  • 1
    Just sudo ifconfig lo0 alias up is sufficient for testing smb overhead when filesharing on a mac.
    – Ray Foss
    Commented Feb 20, 2018 at 15:51
  • To remove the alias again, use sudo ifconfig lo0 -alias Commented Jun 30 at 6:09

Of course is difficult to give an answer without details such as OS X version, type of networking and so on.

Generally though, I experienced that by restarting File Sharing (by deselecting/selecting the checkbox from the Sharing Preference Pane) solves several issues, such as Windows machines not being able to connect to Mac shares. This issue was due to a race condition in OS X (that in 10.8.5 seems to be still not resolved) where the smb service starts before an auth service, causing it to fail when other computers try to access shared folders with any sort of privileges.

Are you trying to connect to network shares with CMD+K ? It generally works, otherwise if you click Browse you can see all the attached devices an their shares.

  • I don't think you are understanding what I'm asking. I was trying to connect to an SMB share on a Mac from the same Mac. I have since found this is not supported (which is a fundamental flaw, but oh well).
    – Tohuw
    Commented Sep 18, 2013 at 11:03
  • Sorry, I didn't catch the fact that you were connecting to localhost… I took it as placeholder ;)
    – mcdado
    Commented Sep 19, 2013 at 9:44

I have since found that accessing SMB shares from localhost simply isn't supported. However, I have no single authoritative documentation to cite here, but suffice it to say it cannot be done (natively).

More to the point, it is not supported to log on with a mobile account onto the server hosting the home shares - you should only use local accounts.

  • Is this still valid in OS X Server 3.1.1 on Mavericks?
    – unom
    Commented May 20, 2014 at 10:12
  • The ifconfig solution above seems to be working under macOS 12.7.2, not sure when it got fixed.
    – JLG
    Commented Jan 21 at 18:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .