Category Archives: Samba

Public writable Share in samba

This document describes how to make public writable shares in samba. Samba is an open source Linux software that is used to create shared folder that can be accessed from Windows machines. This procedure was carried out on Debian/Ubuntu Linux, but with minor changes can be used on other Linux distributions too.

1. Install samba
[codesyntax lang="bash"]

sudo su -
apt-get install samba smbclient

[/codesyntax]

2. Make a backup copy of the original configuration files
[codesyntax lang="bash"]

cp -av /etc/samba /etc/samba.orig

[/codesyntax]

3. Create directory to be shared
[codesyntax lang="bash"]

mkdir -p /share
chmod -R a+rwx /share

[/codesyntax]

4. Configure samba to allow public writable shares
[codesyntax lang="bash"]

echo "" > /etc/samba/smb.conf
vim /etc/samba/smb.conf

[/codesyntax]

[global]
                workgroup = WORKGROUP
                server string = %h server (Samba)
                dns proxy = no
                log file = /var/log/samba/log.%m
                max log size = 1000
                syslog = 0
                panic action = /usr/share/samba/panic-action %d
                security = share
                encrypt passwords = true
                passdb backend = tdbsam
                obey pam restrictions = yes
                unix password sync = yes
                passwd program = /usr/bin/passwd %u
                passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
                pam password change = yes
                map to guest = bad user
                guest account = nobody
                load printers = yes
                printing = cups
                printcap name = cups
                usershare allow guests = yes
 

[print$]
                comment = Printer Drivers
                path = /var/lib/samba/printers
                browseable = yes
                read only = yes
                guest ok = yes
 

[printers]
                comment = Printer in Linux
                path = /var/spool/samba
                guest ok = Yes
                printable = Yes
                use client driver = Yes
                browseable = No
 

[myshare]
                path = /share
                browsable = yes
                writable = yes
                read only = no
                guest only = yes
                create mask = 0644
                directory mask = 0755