<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>BigSmoke &#187; samba</title>
	<atom:link href="http://blog.bigsmoke.us/tag/samba/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.bigsmoke.us</link>
	<description>Smokes your problems, coughs fresh air.</description>
	<lastBuildDate>Sat, 04 Feb 2012 18:03:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Configuring a Samba share with unix extensions which all users can write to</title>
		<link>http://blog.bigsmoke.us/2010/11/05/configuring-a-samba-share-with-unix-extensions-which-all-users-can-write-to</link>
		<comments>http://blog.bigsmoke.us/2010/11/05/configuring-a-samba-share-with-unix-extensions-which-all-users-can-write-to#comments</comments>
		<pubDate>Fri, 05 Nov 2010 10:01:44 +0000</pubDate>
		<dc:creator>halfgaar</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[samba]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=1642</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>
Because the unix permission model sucks, it is very hard to have a shared directory where everybody has full access to each others files. The same is true when making a shared samba archive. Luckily, samba has forcing options.
</p>

<pre class="php"><span style="color: #66cc66;">&#91;</span>archief<span style="color: #66cc66;">&#93;</span>
  comment = save stuff here
  path = /path
  guest ok = yes
  writeable = yes
  browseable = yes
  force user = samba
  force group = samba
  create mask = <span style="color: #cc66cc;">0660</span>
  force create mode = <span style="color: #cc66cc;">0660</span>
  directory mask = <span style="color: #cc66cc;">0770</span>
  force directory mode = <span style="color: #cc66cc;">0770</span></pre>

<p>
The key here is the force modes. 
</p>]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2010/11/05/configuring-a-samba-share-with-unix-extensions-which-all-users-can-write-to/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading Samba from Lenny-backports</title>
		<link>http://blog.bigsmoke.us/2010/03/29/upgrading-samba-from-lenny-backports</link>
		<comments>http://blog.bigsmoke.us/2010/03/29/upgrading-samba-from-lenny-backports#comments</comments>
		<pubDate>Mon, 29 Mar 2010 11:17:01 +0000</pubDate>
		<dc:creator>halfgaar</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[backports]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[lenny]]></category>
		<category><![CDATA[lenny-backports]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[smb]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=1373</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>
For some reason, after upgrading to the Samba version from Lenny-backports I needed to support Windows 7 profiles, the workstations suffered from severe problems. The entire profile seemed to be read-only, even though they weren&#8217;t on disk. I couldn&#8217;t change <em>any</em> setting and reverting profile configuration from backups didn&#8217;t help. In the end, the only thing that fixed it was recreating the user profile, both server and client side. This was an upgrade from 3.2.5 to 3.4.7.
</p>

<p>
Another issue I had is that the user database got a new backend and all the users were gone. You can <a href="http://blog.bigsmoke.us/2010/03/22/migrating-user-accounts-when-upgrading-from-samba-3.2-to-3.3-or-3.4">import</a> your existing smbpasswd file with pdbedit.
</p>

<p>
So, when doing this again, be sure to make workstation and server backups.
</p>]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2010/03/29/upgrading-samba-from-lenny-backports/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preventing the creation of $RECYCLE.BIN on Samba shares by Windows 7</title>
		<link>http://blog.bigsmoke.us/2010/03/25/preventing-the-creation-of-recycle.bin-on-samba-shares-by-windows-7</link>
		<comments>http://blog.bigsmoke.us/2010/03/25/preventing-the-creation-of-recycle.bin-on-samba-shares-by-windows-7#comments</comments>
		<pubDate>Thu, 25 Mar 2010 12:59:45 +0000</pubDate>
		<dc:creator>halfgaar</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[smb]]></category>
		<category><![CDATA[veto]]></category>
		<category><![CDATA[windows 7]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=1367</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>
Windows 7 kept creating a $RECYCLE.BIN dir on the network share. This in itself is merely annoying, but there were also errors resulting from it. Whenever a file would be deleted, this message would appear (translated from dutch): &#8220;The recycle bin is damaged, do you want to delete the contents?&#8221; Everything froze until that question was answered.
</p>

<p>
Samba has an option &#8220;veto files&#8221; which can be used to stop the creation of that directory. Put this in each share&#8217;s section in your smb.conf:
</p>

<pre class="php">veto files = <span style="color: #808080; font-style: italic;">/*$RECYCLE.BIN/ </span></pre>

<p>
The slashes are not directory separators in this case. Also, I don&#8217;t know if the preceeding * is necessary, but it does no harm.
</p>]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2010/03/25/preventing-the-creation-of-recycle.bin-on-samba-shares-by-windows-7/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating user accounts when upgrading from samba 3.2 to 3.3 or 3.4</title>
		<link>http://blog.bigsmoke.us/2010/03/22/migrating-user-accounts-when-upgrading-from-samba-3.2-to-3.3-or-3.4</link>
		<comments>http://blog.bigsmoke.us/2010/03/22/migrating-user-accounts-when-upgrading-from-samba-3.2-to-3.3-or-3.4#comments</comments>
		<pubDate>Mon, 22 Mar 2010 15:05:20 +0000</pubDate>
		<dc:creator>halfgaar</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[smb]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=1350</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>
Because I wanted to be able to give Windows 7 machines access to our domain controller, I needed to upgrade samba to 3.4 from lenny-backports. Because the database backend changed, a consequence of this was that the user database was empty; it didn&#8217;t migrate it.
</p>

<p>
pdbedit has an option to import the old smbpasswd file:
</p>

<pre class="php">pdbedit -i smbpasswd:/etc/samba/smbpasswd</pre>

<p>
That should take care of it. I didn&#8217;t test it this way though, because I already fiddled with the user database by creating new users by hand. I imported one user with which I still had problems correctly this way, but I don&#8217;t know if importing this database from the start would have prevented all my errors.
</p>]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2010/03/22/migrating-user-accounts-when-upgrading-from-samba-3.2-to-3.3-or-3.4/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Listing samba users</title>
		<link>http://blog.bigsmoke.us/2010/03/17/listing-samba-users</link>
		<comments>http://blog.bigsmoke.us/2010/03/17/listing-samba-users#comments</comments>
		<pubDate>Wed, 17 Mar 2010 20:58:11 +0000</pubDate>
		<dc:creator>halfgaar</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[smb]]></category>
		<category><![CDATA[users]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=1338</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>
Newer samba versions no longer have a human readable password file. To see the passwords, use pdbedit. Do &#8220;pdbedit -w -L&#8221; to get a classic password file layout.
</p>]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2010/03/17/listing-samba-users/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing extremely slow domain logon windows 7</title>
		<link>http://blog.bigsmoke.us/2010/03/17/fixing-extremely-slow-domain-logon-windows-7</link>
		<comments>http://blog.bigsmoke.us/2010/03/17/fixing-extremely-slow-domain-logon-windows-7#comments</comments>
		<pubDate>Wed, 17 Mar 2010 20:14:51 +0000</pubDate>
		<dc:creator>halfgaar</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[domains]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[slow]]></category>
		<category><![CDATA[windows 7]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=1334</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>
I just installed two Windows 7 machines and both of them take a very long time to logon to the (samba) domain controller. I&#8217;ve found several reports on the internet about people with the same issue. <a href="http://www.mail-archive.com/samba@lists.samba.org/msg104494.html">This</a> was one of the pages I found. I tried it and it works. It says:
</p> 

<ul>
	<li>Run gpedit.msc.</li>
	<li>Go to computer configuration.</li>
	<li>Go to Administrative templates.</li>
	<li>Go to System.</li>
	<li>Go to User profiles.</li>
	<li>Enable &#8220;Set maximum wait time for the network if a user has a roaming user profile or remote home directory&#8221; and set to 0 seconds</li>
</ul>

<p>
You&#8217;d think that this means it can&#8217;t logon, because it suggests the wait period was because of network connection problem. However, I tried adding files to the profile on the server and logged in, and the file was synced to the PC. So, it does seem to work.
</p>


<script type="text/javascript">
ch_fluidH = 1;
ch_nump = "3";
ch_client = "bigsmoke";
ch_width = 550;
ch_height = "auto";
ch_type = "mpu";
ch_sid = "blog.bigsmoke.us single post";
ch_color_site_link = "#0000CC";
ch_color_title = "#0000CC";
ch_color_border = "#FFFFFF";
ch_color_text = "#000000";
ch_color_bg = "#FFFFFF";
</script>
<script src="http://scripts.chitika.net/eminimalls/amm.js" type="text/javascript">
</script>


<p>
While I was at it, I also changed the setting not to allow logons with temporary profiles. It&#8217;s in the same list as the option above. In Dutch, it&#8217;s &#8220;gebruikers niet aanmelden met tijdelijke profielen&#8221;.
</p>

<p>
I also found <a href="http://www.tweakxp.com/article37007.aspx">this</a> about slow logons. It&#8217;s for Windows XP, but perhaps it&#8217;s useful. It sets &#8220;Always wait for the network at computer startup and logon&#8221; to true. For some reason, the asynchronous loading of the network caused slowdown for that person.
</p>

<p>
Finally, I also found people who fixed slow logons by setting the desktop to an image, as opposed to solid color. I tested it, and indeed seemed to influence it.
</p>]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2010/03/17/fixing-extremely-slow-domain-logon-windows-7/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows domains: De opgegeven referenties zijn strijdig met de bestaande groep referenties</title>
		<link>http://blog.bigsmoke.us/2010/03/17/windows-domain-mystery-message</link>
		<comments>http://blog.bigsmoke.us/2010/03/17/windows-domain-mystery-message#comments</comments>
		<pubDate>Wed, 17 Mar 2010 16:50:49 +0000</pubDate>
		<dc:creator>halfgaar</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[domain controller]]></category>
		<category><![CDATA[samba]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=1332</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>
I was trying to add a Windows 2000 machine to our domain, but I got this message (in Dutch, unfortunately):
</p>

<blockquote><p>De opgegeven referenties zijn strijdig met de bestaande groep referenties</p></blockquote>

<p>
In true Windows fashion, this meant that the existing network-drive mappings should be disconnected first&#8230;
</p>]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2010/03/17/windows-domain-mystery-message/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Samba from lenny-backports</title>
		<link>http://blog.bigsmoke.us/2010/03/17/installing-samba-from-lenny-backports</link>
		<comments>http://blog.bigsmoke.us/2010/03/17/installing-samba-from-lenny-backports#comments</comments>
		<pubDate>Wed, 17 Mar 2010 10:11:02 +0000</pubDate>
		<dc:creator>halfgaar</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[backports]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[windows 7]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=1330</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>
With our new Windows 7 machines, <a href="http://wiki.samba.org/index.php/Windows7">we need at least samba 3.3.7</a>. However, our server with Debian stable doesn&#8217;t have that in its repository. So, I was forced to install samba with <a href="http://www.backports.org/dokuwiki/doku.php?id=instructions">lenny-backports</a>.
</p>

<p>
I included this line in my /etc/apt/sources.list:
</p>

<pre class="php">deb http:<span style="color: #808080; font-style: italic;">//www.backports.org/debian lenny-backports main contrib non-free </span></pre>

<p>
Because backports are disabled by default, I needed to pin all the packages required for samba:
</p>

<pre class="php">Package: samba
Pin: release a=lenny-backports
Pin-Priority: <span style="color: #cc66cc;">999</span>
&nbsp;
Package: smbclient
Pin: release a=lenny-backports
Pin-Priority: <span style="color: #cc66cc;">999</span>
&nbsp;
Package: smbfs
Pin: release a=lenny-backports
Pin-Priority: <span style="color: #cc66cc;">999</span>
&nbsp;
Package: samba-common
Pin: release a=lenny-backports
Pin-Priority: <span style="color: #cc66cc;">999</span>
&nbsp;
Package: samba-common-bin
Pin: release a=lenny-backports
Pin-Priority: <span style="color: #cc66cc;">999</span>
&nbsp;
Package: libwbclient0
Pin: release a=lenny-backports
Pin-Priority: <span style="color: #cc66cc;">999</span>
&nbsp;
Package: libtalloc2
Pin: release a=lenny-backports
Pin-Priority: <span style="color: #cc66cc;">999</span></pre>

<p>
I haven&#8217;t actually installed it, but I will soon. So I don&#8217;t know if it will work or not. Aptitude -s suggests it does.
</p>]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2010/03/17/installing-samba-from-lenny-backports/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding a recycle bin to a samba share</title>
		<link>http://blog.bigsmoke.us/2009/11/23/samba-recycle-bin</link>
		<comments>http://blog.bigsmoke.us/2009/11/23/samba-recycle-bin#comments</comments>
		<pubDate>Mon, 23 Nov 2009 14:53:42 +0000</pubDate>
		<dc:creator>halfgaar</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[recycle]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[smb]]></category>
		<category><![CDATA[trash]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=882</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>
People are stupid and remove things accidentally. You can partly mitigate that by adding recycle bin functionality to a samba share.
</p>

<pre class="ini"><span style="color: #000066; font-weight:bold;"><span style="">&#91;</span>Our documents<span style="">&#93;</span></span>
  <span style="color: #000099;">comment </span>=<span style="color: #660066;"> Central storage for all our documents</span>
  <span style="color: #000099;">path </span>=<span style="color: #660066;"> /home/smb</span>
  guest <span style="color: #000099;">ok </span>=<span style="color: #660066;"> yes</span>
  <span style="color: #000099;">writeable </span>=<span style="color: #660066;"> yes</span>
  <span style="color: #000099;">browseable </span>=<span style="color: #660066;"> yes</span>
  force <span style="color: #000099;">group </span>=<span style="color: #660066;"> samba</span>
  create <span style="color: #000099;">mask </span>=<span style="color: #660066;"> <span style="">0660</span></span>
  directory <span style="color: #000099;">mask </span>=<span style="color: #660066;"> <span style="">0770</span></span>
&nbsp;
  <span style="color: #666666; font-style: italic;">; recycler</span>
  vfs <span style="color: #000099;">object </span>=<span style="color: #660066;"> recycle:recycle</span>
  recycle:<span style="color: #000099;">subdir_mode </span>=<span style="color: #660066;"> <span style="">0770</span></span>
  recycle:<span style="color: #000099;">repository </span>=<span style="color: #660066;"> .recycle </span><span style="color: #666666; font-style: italic;">; directory name</span>
  recycle:<span style="color: #000099;">keeptree </span>=<span style="color: #660066;"> Yes</span>
  recycle:<span style="color: #000099;">touch </span>=<span style="color: #660066;"> Yes</span>
  recycle:<span style="color: #000099;">versions </span>=<span style="color: #660066;"> No</span>
  recycle:<span style="color: #000099;">maxsize </span>=<span style="color: #660066;"> <span style="">100000000</span> </span><span style="color: #666666; font-style: italic;">; 100 metric million bytes </span></pre>

<p>
The action is hooked on the delete action. Pressing shift-delete won&#8217;t prevent files from being moved to the recycler, which is good.
</p>

<p>
You can then make a cron job which throws away old files:
</p>

<pre class="bash"><span style="color: #808080; font-style: italic;"># Every day at 6am</span>
<span style="color: #cc66cc;">0</span> <span style="color: #cc66cc;">6</span> * * * root    find /home/smb/.recycle/ -<span style="color: #000066;">type</span> f -mtime <span style="color: #cc66cc;">+5</span> -delete &gt; /dev/null</pre>]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2009/11/23/samba-recycle-bin/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Permissions on a samba share</title>
		<link>http://blog.bigsmoke.us/2009/10/20/permissions-on-a-samba-share</link>
		<comments>http://blog.bigsmoke.us/2009/10/20/permissions-on-a-samba-share#comments</comments>
		<pubDate>Tue, 20 Oct 2009 11:42:01 +0000</pubDate>
		<dc:creator>halfgaar</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[cifs]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[smb]]></category>
		<category><![CDATA[smbfs]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=860</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>
When you mount a samba share without unix extensions enabled, you can set a GID, UID and permissions (on the client machine, at mount time) so you can adjust it to let non-root users use it. 
</p>

<p>
Mounting FAT works this way as well. But there is a big difference. Where new files on a FAT file system are created according to the permissions you set at mount-time, new files on a SAMBA share have their permissions determined by the umask. However, when you unmount and remount the share, the permissions are changed to what they were set to at mount time.
</p>

<p>
This is very annoying behavior, because when you have files that belong to <tt>root:smbusers</tt> and you copy a file, it still belongs to <tt>root:smbusers</tt>, but when your umask is <tt>0022</tt>, it will no longer be group writable and it has become a read only file.
</p>

<p>
I think this is a bug in the SMBFS/CIFS file system driver.
</p>]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2009/10/20/permissions-on-a-samba-share/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

