I have two Macs, a Lion and a Yosemite. I have several accounts on each one, both user and admin. I activated file sharing on both Macs and selected AFP. I can connect from any account on one Mac to any account on the other one Mac as expected, with one exception.
"As expected" means: Select go->"connect to server" in the Finder menu, then enter one of the users names on the other Mac and its password when prompted, then choose which of the folders on the other Mac to mount.
The exception is that in one of the accounts the Yosemite Mac ("xyz" - unix name) I do not get the "connect as" prompt. It connects directly as the user "xyz" (same name) on the Lion Mac, without giving me a choice or asking for a password. It only asks me which folder I want to mount.
I signed out of iCloud in account xyz on the Lion Mac, changed the password, and deleted the keychain, restarted, etc. Still, no "connect as" prompt.
Now, if I sign out of iCloud in the account xyz on the Yosemite Mac, too, I do get the expected "connect as" prompt. Sign in again, no prompt.
Thus there must a permission buried somewhere on the Lion Mac that grants access to the incoming connections via my Apple ID. However, a brute force search (recursive grep) revealed no trace of my Apple ID. Where can such a permission be buried and how can I reset it?
I tried to replicate this (unexpected) behavior in other accounts, using new Apple IDs, but I was not successful. I always got the expected user name/password prompt.