7

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:

enter image description here

enter image description here

Creating a second sharing-only account just results in yet another duplicate of my main, and so on:

enter image description here

enter image description here

This occurred both before and after a full factory reset (OS + data).

3
  • Have logged in at least once locally with your sharing account?
    – Allan
    Commented Feb 25 at 22:42
  • @Allan the support page says "Sharing Only: Sharing-only users can access shared files remotely, but can't log in to the computer or change settings" . Even if this turns out to be incorrect, none of the tutorials I've followed mentioned having to log in to the account in order to activate it Commented Feb 26 at 11:33
  • Mine is based on experience. A couple other things to check is that the sharing account has permissions to the directory in question and a password is set
    – Allan
    Commented Feb 26 at 11:36

3 Answers 3

6
+50

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:

sudo mkdir /Users/d
sudo chown d /Users/d
sudo dscl . -change /Users/d UserShell "/usr/bin/false" "/bin/zsh"
sudo dscl . -change /Users/d NFSHomeDirectory "/dev/null" "/Users/d"

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:

sudo dscl . -change /Users/d NFSHomeDirectory "/Users/d" "/dev/null"
sudo dscl . -change /Users/d UserShell "/bin/zsh" "/usr/bin/false"
sudo rm -rf /Users/d

That should put the user back into the same "ShareOnly" state that you started with.

4
  • 1
    Thank you for the detailed answer. I also found a very similar solution elsewhere, but it turns out that all I had to do was assign a UserShell. No idea why that was necessary in the first place, and weirdly the bug where the main account gets duplicated is still present, though luckily it doesn't affect anything. Commented Mar 2 at 1:34
  • Reboot and those dups should go away. At least they did for me!
    – Mr. Man
    Commented Mar 2 at 1:51
  • FWIW for me it was enough to restart the System Settings app to clear the duplicated entries.
    – Kentzo
    Commented Jun 4 at 4:53
  • 1
    Also, you can change UserShell without Terminal, in System Settings → Users & Group → (right-click relevant user → Advanced Options). Change it to any valid shell. Go to Sharing Options and add the Windows authentication option, and then return to Users & Groups and switch the shell back to /usr/bin/false (you will have to use "Choose…" to do so).
    – jaydisc
    Commented Sep 23 at 3:11
3

I had a similar problem with a sharing-only user not appearing amongst the users in the file sharing options, and changing its shell to /sbin/nologin appears to have solved it, e.g. run in the terminal:

sudo chsh -s /sbin/nologin sharingonlyuser

Using /sbin/nologin as a login shell also satisfies the intention of having the sharing-only user prevented from using a real shell.

-2

It sounds like there might be a configuration issue or a limitation with how sharing-only users are displayed in the Windows File Sharing interface on Sonoma. Here are a few things you can try to troubleshoot the problem:

Check Sharing Permissions: Ensure that the sharing-only user has the correct permissions set up for the shared folders or files. The user should have at least Read permissions to be able to access the shared resources.

Verify User Visibility: Confirm that the sharing-only user is visible and correctly set up in the user management settings of the Sonoma device. Sometimes, a user might not be properly configured for sharing, which could prevent it from being displayed in the Windows File Sharing interface.

Restart Sonoma Device: Try restarting the Sonoma device to see if that resolves the issue. Sometimes, a restart can help refresh the settings and make the sharing-only user visible in the Windows File Sharing interface.

Check for Updates: Ensure that the Sonoma device and the Windows operating system are both up to date with the latest software updates. Compatibility issues or bugs could be causing the problem, and updates may provide a fix.

2
  • I'm afraid this is very generic advice and not helpful. As I implied in the post, I already tried rebooting and checking for visibility, and even went as far as reinstalling the OS to no avail. Commented Mar 1 at 9:46
  • This answer could benefit from an edit explaining in details how to do the recommended steps, and what to look out for specifically.
    – nohillside
    Commented Mar 2 at 8:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .