0

I've spent the last few months (on and off) trying to get an afp networkshare to work using netatalk on OpenWrt. It takes a bit of work and it's easy to make mistakes so, when I couldn't connect to one of the shares from my MBP, I initially assumed that I made a configuration error. I created two shares that are essentially identical (except that one is for Time Machine and uses different user credentials) and the second share is fine. Strangely enough on my girlfriend's MBP both shares work fine.

Let's call my machine MBP-A and my girlfriend's machine MBP-B, both are running High Sierra. Let's call the share that's not working "TimeMachine" and the working second share "Data".

  • MBP-A can't connect to TimeMachine using Cmd-K in the Finder "The share does not exist on the server. Please check the share name, and then try again."
  • MBP-A connects to "Data" just fine. I get a prompt for username and password, I enter them and the machine connects.
  • MBP-B can connect to both shares just fine. I get a prompt for username and password, I enter them and the machine connects. I have also been able to point Time Machine to the "Time Machine" share and that is running a backup as we speak.
  • When I try to mount the problematic share in Terminal with

    sudo mount -t afp afp://user:password@192.168.1.1/TimeMachine /Volumes/TimeMachine

    it does mount it to a newly created local dir called /Volumes/TimeMachine. I can see the available space in /Volumes/TimeMachine in the Finder and can see that space decrease because the other machine is making a backup to it as we speak. If I want to enter the folder from the Finder, however, I get "The folder “TimeMachine” can’t be opened because you don’t have permission to see its contents."

This leads me to believe that it's not a configuration problem on the server side as it works fine on the other machine but that it's a local problem on my machine. I thought it might have cached the wrong credentials but they are not in the keychain and the problem persists after a reboot.

Any ideas?

  • Why afp? It's been deprecated for years. Why not smb? – Tetsujin Apr 9 at 15:55
  • I used AFP because that is what the tutorial suggested. That is probably because to back up to Time Machine you need some extra capabilities. I have, however, just googled this and apparently newer versions of Samba4 can be compiled with Time Machine support. I now need to find out if I can get that to work on the server side. – Morris Apr 9 at 16:28
1

OK, it looks like I have found the answer. It's a problem in Finder.

Finder apparently doesn't understand that 192.168.1.1/Data and 192.168.1.1/TimeMachine, despite they are advertised separately under AFP that require different credentials, are two different shares.

If I connect to 192.168.1.1/Data, provide correct username and password, and browse that share, everything works. If I then connect to 192.168.1.1/TimeMachine, instead of asking for the credentials to access that share, it tries to reuse the credentials from the previous share. That obviously fails.

Unfortunately the KeyChain is also not able to distinguish between the two so you can't just save both sets of credentials there.

The solution is to create a mount script that logs in to 192.168.1.1/TimeMachine and mounts it directly after a reboot (before much else is done on the machine). Then reboot, go to the Time Machine settings, and point to this share as a network volume for TimeMachine. TimeMachine network drives do get their own key in KeyChain so you can have TM settings store the correct credentials in the KeyChain.

| improve this answer | |

You must log in to answer this question.

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