<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  
  
  <channel>
    <title>chrisjrob: samba</title>
    <link>https://chrisjrob.com</link>
    <atom:link href="https://chrisjrob.com/tag/samba/feed/index.xml" rel="self" type="application/rss+xml" />
    <description>GNU Linux, Perl and FLOSS</description>
    <language>en-gb</language>
    <pubDate>Fri, 13 Feb 2026 17:22:31 +0000</pubDate>
    <lastBuildDate>Fri, 13 Feb 2026 17:22:31 +0000</lastBuildDate>
    
    <item>
      <title>Howto | Install Samba to Access Windows Shares</title>
      <link>https://chrisjrob.com/2009/03/21/install-samba-to-access-windows-shares/</link>
      <pubDate>Sat, 21 Mar 2009 06:15:07 +0000</pubDate>
      <author>chrisjrob@gmail.com (Chris Roberts)</author>
      <guid>https://chrisjrob.com/2009/03/21/install-samba-to-access-windows-shares</guid>
      <description>
       <![CDATA[
         
         <p>If you are looking for a full Samba LDAP installation, please look elsewhere, this is a simple set-up to access files from an existing Windows or Samba server.</p>

<h2 id="installation">Installation</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># apt-get install smbfs smbclient
</code></pre></div></div>

<!--more-->

<h2 id="create-password-file">Create password file</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ echo "username=abc" &gt;&gt; /home/username/.smbpassword
$ echo "password=p455w0rd" &gt;&gt; /home/username/.smbpassword
$ chmod go-rwx /home/username/.smbpassword
</code></pre></div></div>

<h2 id="add-network-drives">Add network drives</h2>

<p>Edit /etc/fstab:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># /etc/fstab: static file system information.
#
# &lt;file system&gt; &lt;mount point&gt;      &lt;type&gt;      &lt;options&gt;                    &lt;dump&gt;  &lt;pass&gt;
proc            /proc              proc        defaults                     0       0
/dev/sda1       /                  ext3        defaults,errors=remount-ro   0       1
/dev/sda5       none               swap        sw                           0       0
/dev/scd0       /media/cdrom0      udf,iso9660 user,noauto                  0       0
//hostname/D$   /media/shared      cifs        auto,rw,uid=trident,gid=users,fmask=0664,dmask=0775,iocharset=iso8859-15,credentials=/home/user/.smbpassword 0 0
</code></pre></div></div>

<p>Having done this, I find that you have to issue a:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo mount -a
</code></pre></div></div>

<p>This simply remounts any unmounted filesystems from /etc/fstab.</p>

<h2 id="mount-directly">Mount directly</h2>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo mount -t cifs //hostname/D$ /media/drive_d -o username=..,password=...,auto,rw,uid=...,gid=...,file_mode=0664,dir_mode=0775,iocharset=iso8859-15
$ sudo mount -t cifs //hostname/D$ /media/drive_d -o auto,rw,uid=...,file_mode=0664,dir_mode=0775,iocharset=iso8859-15,credentials=/home/user/.smbpasswd
$ sudo umount /media/drive_d
</code></pre></div></div>

<h2 id="unmount">Unmount</h2>

<p>You unmount by referencing the mount point.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ sudo umount /media/drive_d
</code></pre></div></div>

<h2 id="openoffice">OpenOffice</h2>

<p>There is a bug in OpenOffice which prevents you from being able to open documents by clicking on the file from within a Samba share. To fix this replace the default %U switch with %f in the KDE Menu configuration editor - right click over the KDE start menu → Menu Editor; next find every occurrence of the OO suite and replace %U with %f.</p>

<h2 id="references">References</h2>

<ul>
  <li>http://www.justlinux.com/nhf/Filesystems/Mounting_smbfs_Shares_Permanently.html</li>
  <li>http://www.linuxquestions.org/questions/linux-newbie-8/mounting-an-smbfs-using-fstab-461202/</li>
</ul>

       ]]>
      </description>
    </item>
    
  </channel> 
</rss>
