I have a Windows 10 machine (22H2) which must share files in foreign local networks, let's call it the "server". I have created a shared folder and can perfectly access it from other Windows computers (Win10 or Win11) while I am sharing with "Turn off password protected sharing". Once I turn on "Password protected sharing" clients correctly ask for credentials. When I enter the username and password of a local user account of the server I get "The username or password is incorrect".
Password protected sharing works perfectly fine the other way round, i.e. if I setup a share on other computers and then access it from "the server" or other computers using a local accounts on those other machines.
I have tried two different local accounts on the server, one User, one Administrator, same result. I can perfectly use those two accounts to sign in on the server. It looks like the local accounts on the server are not available/usable for file sharing.
The other machines only have local accounts whereas on the server there is a Microsoft account in addition. Could that be it? The MS account is the main account on the server and should not be used for sharing.
EDIT: I worked through all 13 points mentioned in Option One of this tutorial on tenforums.com so I am quite sure the regular settings to make this work are ok, including "Private" network, network discovery, file & printer sharing, services running, ... I got this to work on several other machines just this server is nasty.