Background: I’m attempting to set up a public samba share on my local network following this tutorial on thelinuxcode.com. Long term, I’ll probably set up some security around this, but for now I just want to confirm I can follow a basic tutorial. Unfortunately, so far, I’m failing.

What I’ve done so far (on the host machine):

  • Installed samba packages: sudo apt update && sudo apt install samba
  • Confirmed smbd is running: sudo systemctl status smbd
  • Created a dedicated folder for the share: sudo mkdir /mnt/ShareDemo
  • Changed ownership of the ShareDemo folder to nobody:nogroup: sudo chown -R nobody:nogroup /mnt/ShareDemo
  • And changed its permissions to 0775: sudo chmod -R 0775 /mnt/ShareDemo
  • Added the share definition to /etc/samba/smb.conf as follows:
[ShareDemo]
   path = /mnt/ShareDemo
   valid users = @users
   force user = nobody
   force group = nogroup 
   public = yes
   writable = yes
   browseable = yes
  • Updated firewall rules to allow access: sudo ufw allow samba

As far as I can tell, I’ve followed the instructions exactly as described in the tutorial. According to the tutorial, my newly created Samba share should now be accessible from any Windows, macOS, or Linux device on the same local network. On Linux:

  • Install samba-client if you haven‘t already -> DONE.
  • Open your file manager and click “Other Locations” or “Network” -> DONE.
  • Browse for your Ubuntu hostname and click the share folder -> DONE.
  • It will mount automatically without any login prompt needed -> this is where I’m stuck. I’ve tested this on two different Linux devices on my local network. In both cases, the samba share shows up in the file manager, but the system prompts me to authenticate and I cannot proceed as an anonymous user.

Even though the tutorial doesn’t specifically say I need to, I’ve tried restarting smbd after updating smb.conf, but I still have the same issue.

What have I done wrong? Is the tutorial missing a step or simply outdated? Is there another tutorial that I should follow instead? Thanks in advance!

  • just_another_person@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    6 days ago

    It’s a good lesson to learn if you’re working with Samba frequently. Just always that there are two auth systems at work: SMB local to the server and filesystem, and the SMB protocol auth that does network access.

    👍