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.
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)
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.