Ask Your Question

Samba share without SeLinux and without credantials

asked 2018-01-04 08:48:04 -0600

Alex80 gravatar image

Hi all!

I shared some directories in my fedora26 and I would like to access them from Windows10 file manager without access user name. The windows10 see Ferdora26 from file manager, when I type Fedora26's ip address, but it asks network credantials. How can I access the directories without credantials?

image description

I have done the following steps:

  1. I swiched off SeLinux (/etc/sysconfig/selinux file, and SELINUX=disabled.
  2. Reboot fedora26.
  3. Installed Samba: yum install samba samba-common samba-client.
  4. Configure Firewall for Samba: firewall-cmd --permanent --add-service=samba
  5. Make the directories with mkdir and chmod 777 for all directories.
  6. Edit smb.conf file:

[mentes] comment = a saves path = /home/a guest only = Yes guest ok = Yes

[jeanmentes] comment = b saves path = /home/b guest only = Yes guest ok = Yes

[minoseg] comment = c saves path = /home/c read only = No guest only = Yes guest ok = Yes

Finally, I Enabled and started Samba service: systemctl enable smb.service and systemctl start smb.service

So I don't want any credentials for the access. How I can solve this problem?

Thanks a lot!

edit retag flag offensive close merge delete


Why turn SELinux off?

florian gravatar imageflorian ( 2018-01-04 12:50:42 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-01-04 11:22:19 -0600

Alex80 gravatar image

updated 2018-01-05 01:45:35 -0600

Okay, I have solved the problem. First of all, the shared folders owner was the root... obviously, it's no good. So I changed the owner and the group of the directories to "nobody":

  • chown nobody:nobody a
  • chown nobody:nobody b
  • chown nobody:nobody c

I gave 777 permission for these folders.

Secondly, I've added a couple of row to the smb.conf file: [global] guest account = nobody map to guest = Bad User

Shared sections: force user = nobody force group = nobody

Now I access the shared folders without credentials. Perhaps the all new rows is not necessary, but the result is perfect for me.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-01-04 08:48:04 -0600

Seen: 263 times

Last updated: Jan 05 '18