I have this weird issue on Sonoma where after creating a sharing-only user I'm unable to select it under Windows File Sharing. Instead I only see an entry for my main account (+ other Standard/Admin accounts), which is sometimes duplicated:
Creating a second sharing-only account just results in yet another duplicate of my main, and so on:
This occurred both before and after a full factory reset (OS + data).
Best Answer
I reproduced your issue on two machines (one physical and one virtual), so what you're experiencing is not unique to your system.
However, I figured out a solution to this, and it involves doing something that Allan recommended, however as you pointed out that is impossible ...
unless:
This example assumes a share-only user named "d" has been created. Run the following in Terminal:
Now you can log in as that user:
su d
Enter in the password you set when creating that user, and you should get a shell as that user.
exit
Now go into your settings and you should see that user in the Windows File Sharing list. Note that all those extra duplicate users that you currently see in that list will vanish once you reboot.
Once you've confirmed that you can see the user and have enabled Windows File Sharing, you can reverse the changes you needed to log in as that user:
That should put the user back into the same "ShareOnly" state that you started with.