Standalone Samba Configuration Template

03 Janurary 2017

  • Clean and reorganize.

26 February 2017

  • Initial commit.

Installing on Debian

You will need the subversion package (install with aptitude install subversion).

  • Install subversion:
aptitude install subversion
aptitude install libpam-smbpass
cp /usr/share/doc/libpam-smbpass/examples/password-sync /etc/pam.d/
  • [Optional] Note that this step is not needed and probably not even recommended by now. On modern Linux distributions just install the wsdd2 package that will handle advertisements on the local network.
  • *[Outdated] This is left here for historical reasons but it should not be necessary and even counter-indicated with wsdd2. Install avahi in order to broadcast the shares to the network:
aptitude install avahi-daemon avahi-utils avahi-discover

and create the service file by issuing:

cat << EOF > /etc/avahi/services/samba.service
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
 <name replace-wildcards="yes">%h</name>
 <service>
   <type>_smb._tcp</type>
   <port>445</port>
 </service>
 <service>
   <type>_device-info._tcp</type>
   <port>0</port>
   <txt-record>model=Macmini4,1</txt-record>
 </service>
</service-group>
EOF

and then restart the avahi service:

/etc/init.d/avahi-daemon restart
  • Make a backup of your /etc/samba directory.
  • Change directory to /etc/samba and, depending on your samba version, issue:
svn export http://svn.grimore.org/configuration-templates/samba/3/standalone --force .

to check out Samba3 files, or:

svn export http://svn.grimore.org/configuration-templates/samba/4/standalone --force .

to check out Samba4 files.

  • Configure the files /etc/samba/smb.conf.local and add your shares to /etc/samba/smb.conf.share
  • Finally, restart Samba:
/etc/init.d/samba restart

Index


samba/templates/standalone.txt ยท Last modified: 2024/11/13 08:53 by office

Access website using Tor Access website using i2p Wizardry and Steamworks PGP Key


For the contact, copyright, license, warranty and privacy terms for the usage of this website please see the contact, license, privacy, copyright.