Configure Samba Public Share

Samba Public Share

Before you configure Samba public share make sure to install Samba on Arch Linux or install Samba on Ubuntu Linux. You will also want to configure Samba shares. The public share is useful for sharing files freely between guest users without any credentials.

 

 

Create Public Share

Edit samba configuration file.

sudo nano /etc/samba/smb.conf

 

 

Add a public share definition to the end of the file. Public share will be accessible by any user without a password. This is useful for sharing files with guest users.

[Public]
path = /mnt/virtual/public
guest ok = yes
guest only = yes

The guest ok option set to yes allows guest users to connect without a password. Set guest only option to yes to force any user to connect as a guest user. This will prevent new files from being created with a lack of adequate permissions for other users.

 

Optionally also configure Samba home share.

Finish the installation of Samba on Arch Linux or Samba on Ubuntu Linux.

  • Juri Jevdokimov

    Hi
    I have a question
    Samba 4.1.12 default global conf debian8
    [homes]
    path = /mnt/folder
    guest ok = yes
    guest only = yes
    How to do Anonymous logon?
    And change folder?
    Thx

    • Add the following to [global] section changing the guest username as needed.

      map to guest = Bad User
      guest account = nobody

      This will map any invalid users/pass combos to specified guest user.

      • Juri Jevdokimov

        I can not open this folder: The file or folder smb://192.169.0.1/homes does not exist
        Folder created, chmod 0777. Link dropbox smb.conf
        https://www.dropbox.com/s/dd0hamjfav781x6/smb.conf?dl=0
        Please help. I need share this name and folder

        • This line seems wrong, try commenting it out:

          #valid users = %S

          You also need to make sure user nobody actually exists.

          • Juri Jevdokimov

            Why when I change name to [homes] It stops working?
            I can not get in to the folder

          • Not sure what you mean by that exactly. Maybe [homes] is a special share name though I don’t think so.

          • Juri Jevdokimov

            I thought about it, but in previous versions it worked.
            Thanks for trying