<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Samba – Yeri Tiete</title>
    <link>https://yeri.be/tag/samba/</link>
    <description>Yeri Tiete&#39;s blog</description>
    <language>en</language>
    <copyright>© Yeri Tiete</copyright>
    <lastBuildDate>Thu, 30 Apr 2015 11:46:40 +0200</lastBuildDate>
    <atom:link href="https://yeri.be/tag/samba/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>CIFS: mount error(13): Permission denied</title>
      <link>https://yeri.be/cifs-mount-error13-permission-denied/</link>
      <pubDate>Thu, 30 Apr 2015 11:46:40 +0200</pubDate>
      <author>Yeri Tiete</author>
      <guid isPermaLink="true">https://yeri.be/cifs-mount-error13-permission-denied/</guid>
      <description>&lt;p&gt;You&amp;rsquo;ve just updated your Raspberry Pi (or whatever Linux) and you&amp;rsquo;re noticing your CIFS (smb) mounts aren&amp;rsquo;t getting auto mounted anymore. You curse and start noticing this error:&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;# mount -t cifs //192.168.1.100/public -o username=public,password=public sam/&#xA;mount error(13): Permission denied&#xA;Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;The solution is to add after &lt;code&gt;-o username=X,password=Y&lt;/code&gt; the following: &lt;code&gt;sec=ntlm&lt;/code&gt;; thus it becomes &lt;code&gt;-o username=X,password=Y,sec=ntlm&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;You can do the same in &lt;code&gt;fstab&lt;/code&gt;:&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>You&rsquo;ve just updated your Raspberry Pi (or whatever Linux) and you&rsquo;re noticing your CIFS (smb) mounts aren&rsquo;t getting auto mounted anymore. You curse and start noticing this error:</p>
<p><code># mount -t cifs //192.168.1.100/public -o username=public,password=public sam/
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)</code></p>
<p>The solution is to add after <code>-o username=X,password=Y</code> the following: <code>sec=ntlm</code>; thus it becomes <code>-o username=X,password=Y,sec=ntlm</code>.</p>
<p>You can do the same in <code>fstab</code>:</p>
<p><code>//192.168.1.100/public	/mnt/sam/	cifs	domain=TIETE,username=public,password=public,sec=ntlm		0	0</code></p>
<p>No idea why it&rsquo;s suddenly required, but whatevs.</p>
]]></content:encoded>
      <category>linux</category><category>networking</category><category>software</category>
      <category>raspberrypi</category><category>samba</category>
    </item>
    
    <item>
      <title>Gentoo &amp; Samba hanging boot and refusing to start</title>
      <link>https://yeri.be/gentoo-samba-hanging-boot-and-refusing-to-start/</link>
      <pubDate>Mon, 13 Aug 2012 16:39:39 +0200</pubDate>
      <author>Yeri Tiete</author>
      <guid isPermaLink="true">https://yeri.be/gentoo-samba-hanging-boot-and-refusing-to-start/</guid>
      <description>&lt;p&gt;I recently took a server from for maintenance (PSU burned down) and quickly noticed it hung at boot (hangs at Samba starting).&lt;/p&gt;&#xA;&lt;p&gt;I went into interactive boot mode and skipped Samba.&lt;/p&gt;&#xA;&lt;p&gt;Thinking it was a networking issue (server has static IP &amp;amp; routing set up) which didn&amp;rsquo;t match my home network.&lt;/p&gt;&#xA;&lt;p&gt;Set up dhcp, changed the gateway, and started restarting samba from command line.&lt;/p&gt;&#xA;&lt;p&gt;It always resulted in something like this:&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>I recently took a server from for maintenance (PSU burned down) and quickly noticed it hung at boot (hangs at Samba starting).</p>
<p>I went into interactive boot mode and skipped Samba.</p>
<p>Thinking it was a networking issue (server has static IP &amp; routing set up) which didn&rsquo;t match my home network.</p>
<p>Set up dhcp, changed the gateway, and started restarting samba from command line.</p>
<p>It always resulted in something like this:</p>
<pre>BroServ ~ # /etc/init.d/samba restart
 * samba -&gt; start: smbd ...
<span style="color: #808080;">**** HANGS INDEFINITELY **** </span><br />^C * * samba: caught SIGINT, abortingstart-stop-daemon: caught SIGINT, aborting
 [ !! ]v ~ # 
 * samba -&gt; start: nmbd ...
 * start-stop-daemon: /usr/sbin/nmbd is already running [ !! ]
 * Error: starting services (see system logs)
 * samba -&gt; stop: smbd ... [ ok ]
 * samba -&gt; stop: nmbd ...</pre>
<p>Could cancel it with ctrl + c (which I couldn&rsquo;t do at boot).</p>
<p>Tried to recompile CUPS &amp; Samba. Upgraded kernel from 2.6.30 to 3.3.8. Always kept hanging. Google wasn&rsquo;t really helpful. Many people experienced Samba hanging boot process, but there was never one solution to the problem.</p>
<p>The logs showed something along these lines:</p>
<pre>[2012/08/04 16:37:47, 0] smbd/server.c:1141(main)
 smbd version 3.5.15 started.
 Copyright Andrew Tridgell and the Samba Team 1992-2010
[2012/08/04 16:37:47.783423, 0] param/loadparm.c:7668(lp_do_parameter)
 Global parameter guest account found in service section!
[2012/08/04 16:37:47.783520, 0] param/loadparm.c:7668(lp_do_parameter)
 Global parameter guest account found in service section!</pre>
<p>Which basically didn&rsquo;t say much except something about guest account being in the Global section of the config. But at the same time, it had worked for eons before.</p>
<p>However, I went to take a look at noticed this in the Global section:</p>
<pre>guest ok = yes</pre>
<p>And removed it from that section and restarted Samba:</p>
<pre>BroServ ~ # ps aux | grep smb
root 2990 0.0 0.0 4064 576 pts/1 S+ 16:37 0:00 tail -f /var/log/samba/log.smbd
root 3026 0.0 0.0 6368 716 pts/0 S+ 16:38 0:00 grep --colour=auto smb
BroServ ~ # ps aux | grep nmb 
root 2729 0.0 0.0 44008 2736 ? Ss 16:25 0:00 /usr/sbin/nmbd -D
root 3028 0.0 0.0 6368 716 pts/0 S+ 16:38 0:00 grep --colour=auto nmb
BroServ ~ # kill -9 2729
BroServ ~ # ps aux | grep nmb
root 3030 0.0 0.0 6368 712 pts/0 S+ 16:38 0:00 grep --colour=auto nmb
BroServ ~ # /etc/init.d/samba restart 
 * samba -&gt; start: smbd ... [<span style="color: #008000;"> ok</span> ]
 * samba -&gt; start: nmbd ... [ <span style="color: #008000;">ok</span> ]
BroServ ~ # /etc/init.d/samba restart
 * samba -&gt; stop: smbd ... [ <span style="color: #008000;">ok</span> ]
 * samba -&gt; stop: nmbd ... [ <span style="color: #008000;">ok</span> ]
 * samba -&gt; start: smbd ... [ <span style="color: #008000;">ok</span> ]
 * samba -&gt; start: nmbd ... [ <span style="color: #008000;">ok</span> ]
BroServ ~ # /etc/init.d/samba restart
 * samba -&gt; stop: smbd ... [ <span style="color: #008000;">ok</span> ]
 * samba -&gt; stop: nmbd ... [ <span style="color: #008000;">ok</span> ]
 * samba -&gt; start: smbd ... [ <span style="color: #008000;">ok</span> ]
 * samba -&gt; start: nmbd ... [ <span style="color: #008000;">ok</span> ]
BroServ ~ #</pre>
<p>Odd, as the log still shows the same error line:</p>
<pre>[2012/08/04 16:38:29, 0] smbd/server.c:1141(main)
<span style="color: #008000;"> smbd version 3.5.15 started. </span> Copyright Andrew Tridgell and the Samba Team 1992-2010
[2012/08/04 16:38:29.491274, 0] param/loadparm.c:7668(lp_do_parameter)
<span style="color: #ff0000;"> Global parameter guest account found in service section! </span>
[2012/08/04 16:38:29.491343, 0] param/loadparm.c:7668(lp_do_parameter)
 Global parameter guest account found in service section!</pre>
<p>But at least it&rsquo;s starting up now&hellip;</p>
<p>So, what have we learned? Config mistakes can hang Samba and it will result in almost no output to the logs whatsoever.</p>
]]></content:encoded>
      <category>errors</category><category>linux</category><category>software</category>
      <category>samba</category>
    </item>
    
  </channel>
</rss>
