Ubuntu – Simple Samba Share – NO PASSWORD

permissionssambaserver

What I need:

Simple samba config for file server without password and full read write for everyone. No security needed.

History:

I'm making a server to host files for my home. The goal of the server is to host files for Windows machines. The best I've managed to do so far is this configuration. With that, I am able to see the shares and the server from the network, but it says that Windows cannot access them. I am using Linux mate at the server, all the latest updates.

My Config:

[global]

   workgroup = BIOHAZARD
   netbios name = MATUSALEM
   guest account = nobody
   log file = /usr/local/samba/var/log.%m
   max log size = 50
   security = user
   map to guest = bad user
   encrypt passwords = yes

# Share Definitions 
[homes]
   comment = Home Directories
   browseable = no
   writable = yes

[Teste]
    path = /home/peter/share
    writable = yes
    printable = no
    comment = teste
    only guest = yes
    public = yes
        guest ok = yes
        guest only = yes
        guest account = nobody
        browsable = yes
[REDE]
    comment = TESTE 2
    public = yes
    delete readonly = yes
    path = /HOME/REDE
    writeable = yes
        guest ok = yes
        guest only = yes
        guest account = nobody
        browsable = yes
######

Any Ideas?

Best Answer

Yes, Samba can be a pain. I use it for my home as well as work.

The first thing you should do is start over from scratch to make troubleshooting easier. You can do this by running the command below in the terminal.

dpkg-reconfigure samba-common

Then go to the folder on the samba server that you want to share, and make sure that the user nobody can read and write to the share. This is because the user nobody is the username windows clients use. I usually just make a folder in the / directory just to keep things simple, but the "correct" way would be to make a subfolder of /srv. If you have not modified the permissions already, use the commands below.

sudo chown -R nobody.nogroup the_folder
sudo chmod -R 777 the_folder

You can also test to see if nobody can write to the directory by running the following command as root.

sudo -u nobody touch test_file

Edit your /etc/samba/smb.conf and add the lines below the [printers] share definition.

[share_name]              ;the share name can be what ever you want
browseable = yes
path = the_complete_path_to_the_shared_folder
guest ok = yes
read only = no
create mask = 777

Then when you are done save it and run the following.

testparm

This will will warn you if you made any typos. Next, you just need to restart the samba services.

sudo systemctl restart smbd
sudo systemctl restart nmbd
Related Question