0

I have Ubuntu 20.04.4 LTS. I installed samba and made a shared directory. When I try to access the shared folder from windows 10 pro it writes "Windows cannot access \ip_address\share" with error 0x80004005. I tried accessing the folder with a virtual machine (on the same computer as windows) with a Linux OS and it worked, so it's a problem with windows. I tried enabling SMB 1 and disabling it from windows features but didn't work. Searched online but didn't find any solution that worked. This is my smb config:

[global]
 server role = standalone server
 map to guest = bad user
 usershare allow guests = yes

[share]
  comment = Open Linux Share
  path = /home/share
  read only = no
  guest ok = yes
  force create mode = 0755
  force user = amine
  force group = amine
FpsError
  • 1
  • 1
  • 2
  • Edit your question please and add the output of this command so we can see if the user "smbuser" has access to the folders being shared: `ls -al /share` – Morbius1 Aug 04 '22 at 16:59

1 Answers1

1

Your config does not make sense, since "public and "protected" files are using the same user. Use "valid users" to enlist those that are allowed. These users must exist on your samba server:

pbedit -a -u guest

smbpasswd must be empty for "public" if you want to have free access.

For your protected files enlist those users, that may have access to those shares. Add those users via pbeditwith a password. But these instructions can be found here

kanehekili
  • 5,846
  • 1
  • 12
  • 32
  • You cannot use 'valid users' on a guest share unless you add 'nobody' to the list. Using 'force user' and 'force group' is okay, they just mean that all files and directories created will belong to 'smbuser:smbgroup' provided the user and group exist. Your problem may be that Win10 pro has guest access turned off by default. – Rowland Penny Aug 04 '22 at 06:51
  • I'm sorry this is my first time using ubuntu so I'm not following well. What should I do now? I don't care about protected files so I'm deleting that share. I tried running the first command you gave but it gave me an error "Failed to open/create TDB passwd". – FpsError Aug 04 '22 at 12:43
  • If you just want guest access, then do not create any Samba users. You would just connect as an unknown user and Samba will then map the unknown user to the Linux user 'nobody'. But none of this will help because Windows 10 Pro doesn't allow guest access by default. – Rowland Penny Aug 04 '22 at 18:16