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


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

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


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

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


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

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


                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

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

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

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

Scrie si tu o vorbulita

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.