High Sierra Macs always connect to file server with AppleID, not the correct username/password

Solution 1:

I see that this post is one year old but I noticed the same issue today. Finally, I found out that the issue is related to the iCloud Keychain.

I created a fresh new account on my computer and connected to my server from this account : my server username was displayed. Then I connected iCloud with my AppleID in the test account. After that, the server connection was still displaying my server username. After activating the iCloud Keychain service, there was still no issue. But, after enabling the iCloud Keychain AND checking the "keep login in my keychain" option at the server login, the server connexion is now displaying my AppleID.

I think it's a bug in macOS but it's pretty annoying as you can no longer know which username is used for the connection.