OS X randomly asking for NAS login after using mount_afp on Terminal This is a very weird issue that is apparently so rare Google hasn't been any help in finding a clue as to why this happens or how to fix it.

I use mount_afp on Terminal to mount the music directory of my NAS into my user's home directory because my music library is too big to store it locally in its entirety. It is not permanently mounted whenever I use my MacBook and I don't always mount it after a reboot, only when I actually need my music library or want to start up iTunes.

I would use a command as follows: mount_afp afp://username:password@my_nas/Multimedia/[userdir]/Music ~/Music to mount the music directory of my NAS directly into the Music directory of my home directory (so iTunes can use its default paths and everything)


(I also get asked when I'm not in my home network)

Now, whenever I open the Photos app on my MacBook when the music directory isn't mounted the system keeps asking me to log into my NAS twice in a row and again two times after some time passes. As of recent, the issue is no more just restricted to the Photos app, it's asking me in random parts of the system to enter my NAS credentials. I can only assume it is somehow connected to me using mount_afp on Terminal to mount the Music directory of my NAS directly into my home directory when I want to listen to music via iTunes or Sync my iPhone. I'm assuming something wants to access parts of my home directory that the system is aware is on my NAS and asking me to login.

I don't understand why it's asking me to log into my NAS because the photo library is actually stored locally and iCloud sync is on and when the NAS isn't mounted it should fall back to the default Music directory which is empty on my hard drive.

Since OS X is UNIX based I thought mount_afp set a mount point in /etc/fstab or something but the file was empty and included a note not to edit it.

Somewhere the system has to record where to go in order to poll my NAS on its own. Since I also tried a complete reinstall of OS X the strange behavior was gone but it came back right when I used mount_afp again. Permanently mounting it is not feasible as I take my MacBook with me a lot when I'm out and about.

I'm out of ideas.
Might want to check /etc/auto_afp for your mount point and remove if present.
Sounds like your Mac is constantly trying (and retrying) to automatically mount that share unsuccessfully.

Try moving to using autofs so you don't need to manually deal with mounting your share and it should be seamlessly unmounting that share when you change networks: http://blog.grapii.com/2015/06/keep-network-drives-mounted-on-mac-os-x-using-autofs/

As for Photos requesting you mount your AFP share despite the Photos Library being stored locally I also don't have a clue there.
Maybe changing how its mounted as suggested may resolve your issue? I'll try and recreate your environment here and let you know if I have the same problem (with a possible solution).