<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="https://www.stress-free.co.nz"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>stressfree - samba</title>
 <link>https://www.stress-free.co.nz/tech/samba</link>
 <description></description>
 <language>en</language>
<item>
 <title>Mounting CIFS shares at login with SELinux enabled</title>
 <link>https://www.stress-free.co.nz/mounting_cifs_shares_at_login_with_selinux_enabled</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
    &lt;div class=&quot;image&quot;&gt;&lt;img src=&quot;/sites/default/files/u63/selinux.jpg&quot; title=&quot;undefined&quot; width=&quot;100&quot; height=&quot;100&quot; onmouseover=&quot;undefined&quot; onmouseout=&quot;undefined&quot; /&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://www.nsa.gov/selinux/&quot;&gt;SELinux&lt;/a&gt; is as painful to use sometimes as it is powerful when it comes to locking down server permissions. Unfortunately even with distributions such as Red Hat which &lt;a href=&quot;http://www.redhat.com/security/innovative/selinux/&quot;&gt;supports SELinux out of the box&lt;/a&gt;, you will still experience problems. &lt;/p&gt;&lt;p&gt;One such issue I came across recently was automounting CIFS shares on boot using &lt;a href=&quot;http://www.hscripts.com/tutorials/linux-services/netfs.html&quot;&gt;netfs&lt;/a&gt;. At startup the netfs service was returning an &quot;error 13 - error opening credentials file&quot; when attempting to mount the CIFS shares. The problem was the SELinux was not allowing the netfs script to access the file that contained the CIFS authorisation details.&lt;/p&gt;&lt;p&gt;For example, my &lt;strong&gt;/etc/fstab&lt;/strong&gt; had the following entry:&lt;/p&gt;&lt;p class=&quot;codesnippet&quot;&gt;//WINDOWSSERVER/SHARE          /mnt/windowsshare             cifs    credentials=/etc/samba/auth.cifs        0 0&lt;/p&gt;&lt;p&gt;And in the &lt;strong&gt;/etc/samba/auth.cifs&lt;/strong&gt; file were the following details:&lt;/p&gt;&lt;p class=&quot;codesnippet&quot;&gt;username=windowsuser&lt;br /&gt;password=windowspassword&lt;/p&gt;&lt;p&gt;The solution to the problem was to change a SELinux boolean parameter with the following command (&lt;a href=&quot;http://www.engardelinux.org/modules/index/list_archives.cgi?list=fedora-selinux&amp;amp;page=0189.html&amp;amp;month=2008-02&quot;&gt;found here&lt;/a&gt;):&lt;/p&gt;&lt;p class=&quot;codesnippet&quot;&gt;setsebool -P allow_mount_anyfile 1&lt;/p&gt;&lt;p&gt;This lets the mount command open any referenced file, effectively side-stepping the netfs error. Sure it is not 100% secure but it works without having to completely disable SELinux which seems to be most people&#039;s answer to any problems.&lt;/p&gt;&lt;!--break--&gt;  &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/linux&quot;&gt;linux&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/samba&quot;&gt;samba&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/selinux&quot;&gt;selinux&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Sat, 17 May 2008 02:36:57 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">508 at https://www.stress-free.co.nz</guid>
</item>
<item>
 <title>Automounting Samba shares in Leopard</title>
 <link>https://www.stress-free.co.nz/automounting_samba_shares_in_leopard</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
    &lt;p&gt;&lt;strong&gt;Edit 15th November 2007:&lt;/strong&gt; After a few weeks of use I have found the automount technique described here is a little unreliable not only from the perspective of keeping the mount point active but also for maintaining the correct file permissions. This maybe addressed in future OSX 10.5 updates but for the time being using user-level mounts via Finder or  Go -&amp;gt; Connect to Server is more reliable. To automatically mount a volume save the mount point as a Favorite &lt;span style=&quot;font-style: italic&quot; class=&quot;Apple-style-span&quot;&gt;(Go -&amp;gt; Connect to Server -&amp;gt; Add favorite)&lt;/span&gt; and then drag this favorite &lt;span style=&quot;font-style: italic&quot; class=&quot;Apple-style-span&quot;&gt;(stored in ~/Library/Favorites)&lt;/span&gt; to the Login Items under Account Preferences.&lt;/p&gt;
&lt;hr /&gt;
&lt;div class=&quot;image&quot;&gt;&lt;img src=&quot;/sites/default/files/u63/leopard_cd.jpg&quot; title=&quot;Leopard CD&quot; width=&quot;150&quot; height=&quot;146&quot; onmouseover=&quot;undefined&quot; onmouseout=&quot;undefined&quot; /&gt;&lt;/div&gt;
&lt;p&gt;Apple have pleased a number of people by laying to rest the &lt;a href=&quot;http://en.wikipedia.org/wiki/NetInfo_Manager&quot;&gt;NetInfo Manager in OSX 10.5 &amp;#39;Leopard&amp;#39;&lt;/a&gt;. Many of the functions performed by this Registry-like tool have been incorporated into the far tidier Directory Utility tool. Unfortunately whilst this tool includes the ability to define automounted NFS shares the same capability is not provided for Samba. This is a pain because if you have a couple of Samba servers on the network that need to be connected all the time, a good example being a network share for iTunes music.&lt;/p&gt;
&lt;p&gt;Fortunately all is not lost as we can still edit the automount configuration files directly so that our Samba shares are always accessible. To start with open up the Terminal application as an administrative user and then use sudo to create a bash shell.&lt;/p&gt;
&lt;p class=&quot;codesnippet&quot;&gt;sudo bash &lt;span style=&quot;font-style: italic&quot; class=&quot;Apple-style-span&quot;&gt;(enter)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;You will be prompted to enter your administrator password at this point.&lt;/p&gt;
&lt;p&gt;We will now create a file entitled &lt;span style=&quot;font-weight: bold&quot; class=&quot;Apple-style-span&quot;&gt;auto.smb&lt;/span&gt; in the /etc/ directory to hold our server details.&lt;/p&gt;
&lt;p class=&quot;codesnippet&quot;&gt;pico /etc/auto.smb &lt;span style=&quot;font-style: italic&quot; class=&quot;Apple-style-span&quot;&gt;(enter)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In this file enter the following line (add more lines for extra servers/shares) &lt;/p&gt;
&lt;p class=&quot;codesnippet&quot;&gt;$Sharename -fstype=smbfs ://$Username:$Password@$Server/$Share&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-weight: bold&quot; class=&quot;Apple-style-span&quot;&gt;Where:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-style: italic&quot; class=&quot;Apple-style-span&quot;&gt;$Sharename&lt;/span&gt; = the name you want to give the mount point&lt;br /&gt;&lt;span style=&quot;font-style: italic&quot; class=&quot;Apple-style-span&quot;&gt;$Username&lt;/span&gt; = the user to connect to the server as&lt;br /&gt;&lt;span style=&quot;font-style: italic&quot; class=&quot;Apple-style-span&quot;&gt;$Password&lt;/span&gt; = password of the user&lt;br /&gt;&lt;span style=&quot;font-style: italic&quot; class=&quot;Apple-style-span&quot;&gt;$Serve&lt;/span&gt;r = the name of the server (dns/wins entry)&lt;br /&gt;&lt;span style=&quot;font-style: italic&quot; class=&quot;Apple-style-span&quot;&gt;$Share&lt;/span&gt; = the name of the share on the server&lt;/p&gt;
&lt;p&gt;As this file stores the username and password to the server in plain text set the permissions of the file so that only the root user can read it.&lt;/p&gt;
&lt;p class=&quot;codesnippet&quot;&gt;chmod 600 /etc/auto.smb &lt;span style=&quot;font-style: italic&quot; class=&quot;Apple-style-span&quot;&gt;(enter)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Now edit the &lt;span style=&quot;font-weight: bold&quot; class=&quot;Apple-style-span&quot;&gt;/etc/auto_master&lt;/span&gt; file and append the auto.smb record at the end of the file. The auto_master file controls all the automounts for the system, leave everything about this file alone except for the extra line at the end. &lt;/p&gt;
&lt;p class=&quot;codesnippet&quot;&gt;pico /etc/auto_master&lt;span style=&quot;font-style: italic&quot; class=&quot;Apple-style-span&quot;&gt; (enter)&lt;/span&gt;&lt;/p&gt;
&lt;p class=&quot;codesnippet&quot;&gt;#&lt;br /&gt;# Automounter master map&lt;br /&gt;#&lt;br /&gt;+auto_master # Use directory service&lt;br /&gt;/net -hosts -nobrowse,nosuid&lt;br /&gt;/home auto_home -nobrowse&lt;br /&gt;/Network/Servers -fstab&lt;br /&gt;/-  -static&lt;br /&gt;/Users/Resources auto.smb&lt;/p&gt;
&lt;p&gt;This will tell the automounter to mount the shares defined in the /etc/auto.smb file under the /Users/Resources directory. So for example if auto.smb defined a Music share we would end up with /Users/Resources/Music. &lt;span style=&quot;font-weight: bold&quot; class=&quot;Apple-style-span&quot;&gt;&lt;span style=&quot;font-style: italic&quot; class=&quot;Apple-style-span&quot;&gt;Note:&lt;/span&gt;&lt;/span&gt; You do not have to use /Users/Resources.&lt;/p&gt;
&lt;p&gt;With the configuration files in place it is now time to tell the automounter to refresh the settings. Exectute the following command:&lt;/p&gt;
&lt;p class=&quot;codesnippet&quot;&gt;automount -vc &lt;span style=&quot;font-style: italic&quot; class=&quot;Apple-style-span&quot;&gt;(enter)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If all goes well you should see the following output from this command:&lt;/p&gt;
&lt;p class=&quot;codesnippet&quot;&gt;automount: /net updated&lt;br /&gt;automount: /home updated&lt;br /&gt;automount: /Users/Resources updated&lt;br /&gt;automount: no unmounts&lt;/p&gt;
&lt;p&gt;Now you should be able to open the Finder and see a /Users/Resources directory that lists (and magically takes you to) all the network shares you have defined in the auto.smb file.&lt;/p&gt;
&lt;p&gt;Hopefully this is only a temporary fix and Apple includes the option to mount Samba as well as NFS shares in Directory Utility. Technically it is not hard to do and the end result would be far tidier. &lt;/p&gt;
&lt;!--break--&gt;  &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/osx&quot;&gt;osx&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/samba&quot;&gt;samba&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/leopard&quot;&gt;leopard&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Mon, 29 Oct 2007 08:52:51 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">471 at https://www.stress-free.co.nz</guid>
</item>
<item>
 <title>Jeremy Allison speaks out on Novell</title>
 <link>https://www.stress-free.co.nz/jeremy_allison_speaks_out_on_novell</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
    &lt;p&gt;On December 29th Jeremy Allison officially left Novell and was able to speak openly about the Novell-Microsoft deal. He provided answers to questions posed &lt;a href=&quot;http://blogs.zdnet.com/microsoft/?p=179&quot;&gt;Mary Jo Foley of ZDNet&lt;/a&gt; and &lt;a href=&quot;http://boycottnovell.com/2006/12/31/jeremy-allison-interview/&quot;&gt;Boycott Novell&lt;/a&gt; although it would appear that his answers to the later source were for the most part copied and pasted from his ZDNet interview. What is interesting from the interviews is that the controversial patent deal was included by Microsoft at the last minute (5 days before the announcement). This would suggest Novell was setup by Microsoft, or even worse intentionally withheld information from people within their own company that understood the most about the issues at hand. Whichever was the cause it does not bode well for Novell as it was a lot of negative publicity they could have seriously done without and even avoided if managed more effectively.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;  &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/microsoft&quot;&gt;microsoft&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/samba&quot;&gt;samba&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/novell&quot;&gt;novell&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Mon, 15 Jan 2007 22:22:41 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">373 at https://www.stress-free.co.nz</guid>
</item>
<item>
 <title>Jeremy Allison leaves Novell in protest</title>
 <link>https://www.stress-free.co.nz/jeremy_allison_leaves_novell_in_protest</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
    &lt;p&gt;Lead Samba developer and vocal open source figure Jeremy Allison has &lt;a href=&quot;http://rss.slashdot.org/~r/Slashdot/slashdot/~3/64694401/article.pl&quot;&gt;left his position at Novell&lt;/a&gt; in protest of their recent patent-protection &lt;a href=&quot;/how_things_are_shaping_up_with_the_novell_microsoft_deal&quot;&gt;agreement with Microsoft&lt;/a&gt;. It is a great move from Jeremy who has made it clear in the past that his principles (and tongue lashings) will not be bent by corporate pressure. &lt;/p&gt;&lt;p&gt;In a parting shot Jeremy made public a letter he had sent to Novell management. Within it he made a brilliant point regarding the patent agreement and the often misunderstood reaction to it by the Free Software community:&lt;/p&gt;&lt;h6&gt;&quot;Do you think that if we&#039;d have found what we legally considered a clever way around the Microsoft EULA so we didn&#039;t have to pay for Microsoft licenses and had decided to ship, oh let&#039;s say, &quot;Exchange Server&quot; under this &quot;legal hack&quot; that Microsoft would be silent about it - or we should act aggr[i]eved when they change the EULA to stop us doing this?&quot;&lt;/h6&gt;&lt;p&gt;It is an excellent point that brings into question people&#039;s willingness to accept theft and wrong doing as something that can only occur to an object with a defined monetary value. The components that form GNU Linux have a value, they are Free in all senses of the word. Yet when Novell and Microsoft found a way around the GPL2 license to &#039;sell&#039; their patent-protection alongside GNU Linux many in the industry viewed it as completely honest and worthwhile. This  even though the agreement broke in spirit, but not in practice, the licensing terms of the GPL2.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;UPDATE:&lt;/strong&gt; &lt;a href=&quot;http://news.com.com/Open-source+leader+leaving+Novell+for+Google/2100-7344_3-6145615.html&quot;&gt;CNET News.com is reporting&lt;/a&gt; that Jeremy Allison will be joining Google in the new year. &lt;/p&gt;&lt;p&gt;&lt;!--break--&gt; &lt;br /&gt;&lt;/p&gt;  &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/linux&quot;&gt;linux&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/samba&quot;&gt;samba&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/novell&quot;&gt;novell&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Fri, 22 Dec 2006 10:22:02 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">371 at https://www.stress-free.co.nz</guid>
</item>
<item>
 <title>Getting Vista working with Samba</title>
 <link>https://www.stress-free.co.nz/getting_vista_working_with_samba</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
    &lt;p&gt;In their efforts to &#039;innovate&#039; (a.k.a. make it harder for people to use non-Microsoft products) it would appear that connecting to a Samba file server in Vista is not as easy as in prior versions of Windows. This &lt;a href=&quot;http://www.builderau.com.au/blogs/codemonkeybusiness/viewblogpost.htm?p=339270746&quot;&gt;BuilderAu post&lt;/a&gt; describes how to enable LM and NTLM authentication methods supported by Samba but disabled in Vista by default. It sounds like the Samba team are moving fast on getting Samba fully Vista compatible, unfortunately issues like this will effect NAS devices and servers not running the latest versions of Samba for a long time to come.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;  &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/microsoft&quot;&gt;microsoft&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/samba&quot;&gt;samba&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Fri, 15 Dec 2006 12:29:20 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">366 at https://www.stress-free.co.nz</guid>
</item>
<item>
 <title>The Samba Team responds to Novell&#039;s actions</title>
 <link>https://www.stress-free.co.nz/the_samba_team_responds_to_novells_actions</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
    &lt;p&gt;A few weeks after the &lt;a href=&quot;/how_things_are_shaping_up_with_the_novell_microsoft_deal&quot;&gt;Novell/Microsoft announcement&lt;/a&gt; the Samba Team have &lt;a href=&quot;http://news.samba.org/announcements/team_to_novell/&quot;&gt;officially requested Novell reconsider&lt;/a&gt; their stand on patents. The Samba project is an important (if not crucial) piece of open source software that is allowing a wide variety of platforms (but mainly Linux) to compete head to head with Microsoft solutions in the workplace. Jeremy Alison co-heads the Samba project and is an employee of Novell but obviously this has not stopped the team from taking a moral stand against software patents and the actions of Novell and Microsoft.&lt;/p&gt;&lt;p&gt;This stance is completely opposite to the Mono team leader &lt;a href=&quot;http://tirania.org/blog/archive/2006/Nov-04.html&quot;&gt;Miguel de Icaza&#039;s official support of the deal&lt;/a&gt;, but this is not surprising considering 99% of Mono development is funded and directed by Novell. I doubt Novell will heed Samba&#039;s request but at least its good to see such a prominent project take such a decisive stand on the matter. &lt;br /&gt;&lt;!--break--&gt;&lt;br /&gt;&lt;/p&gt;  &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/linux&quot;&gt;linux&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/samba&quot;&gt;samba&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/novell&quot;&gt;novell&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Mon, 13 Nov 2006 08:38:17 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">348 at https://www.stress-free.co.nz</guid>
</item>
<item>
 <title>Adventures in Samba with LDAP</title>
 <link>https://www.stress-free.co.nz/adventures_in_samba_with_ldap</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
    &lt;div class=&quot;image&quot;&gt;&lt;img src=&quot;/sites/default/files/images/news/samba-logo.jpg&quot; alt=&quot;&quot; width=&quot;160&quot; height=&quot;81&quot; /&gt;&lt;/div&gt;&lt;p&gt;Over the last week I have been experimenting with &lt;a href=&quot;http://sourceforge.net/projects/smbldap-tools/&quot;&gt;SMBLDAP-Tools&lt;/a&gt; and some of the new features available in the latest versions of Samba 3. Whilst I&#039;ve written about &lt;a href=&quot;/suse_openldap_samba_howto&quot;&gt;setting up a Samba Primary Domain Controller with an LDAP-backend&lt;/a&gt; before SMBLDAP-Tools makes configuring this potentially troublesome (but very powerful) combination a lot easier.&lt;/p&gt;&lt;p&gt;For my testing I have been using the Factory build of &lt;a href=&quot;http://ftp.suse.com/pub/projects/samba/3.0/10.0/&quot;&gt;Samba 3.0.23C for Suse 10&lt;/a&gt;. Suse 10 does not have a package for SMBLDAP-Tools but Suse 10.1+ does so I used the 10.1 source package and built it for Suse 10. After a bit of hassle I also applied a &lt;a href=&quot;http://www.active.ee/download/smbldap-useradd-0.9.1.diff&quot;&gt;patch&lt;/a&gt; that fixed &lt;a href=&quot;http://lists.samba.org/archive/samba/2005-June/106478.html&quot;&gt;Computer creation account problems&lt;/a&gt;. If you are using Suse 10.0 the SMBLDAP-Tools package I built can be downloaded from &lt;a href=&quot;/sites/default/files/suse/smbldap-tools-0.9.1-11.noarch.rpm&quot;&gt;here&lt;/a&gt;, otherwise compiling it from source is difficult as its just a collection of Perl scripts.&lt;!--break--&gt;&lt;/p&gt;&lt;h2&gt;Configuring SMBLDAP-Tools &lt;/h2&gt;&lt;p&gt;The easiest way to configure SMBLDAP-Tools is to run its configuration script at the command prompt:&lt;/p&gt;&lt;p class=&quot;codesnippet&quot;&gt;configure.pl &lt;em&gt;(Enter)&lt;/em&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;This will ask a range of questions ranging from the authentication details of your LDAP server to the specifics of your user profiles. Once configured it will save the &lt;strong&gt;smbldap.conf&lt;/strong&gt; and &lt;strong&gt;smbldap_bind.conf&lt;/strong&gt; files to the &lt;strong&gt;/etc/smbldap-tools&lt;/strong&gt; directory ready to use.&lt;/p&gt;&lt;p&gt;After tailoring the configuration scripts as root run the smbldap-populate command to generate most of the required LDAP entries. Unfortunately it looks like Samba 3.0.23 expects a few other Domain groups which can be created with the following commands:&lt;/p&gt;&lt;p class=&quot;codesnippet&quot;&gt;smbldap-groupadd -s S-1-5-32-545 -a -g 545 -t builtin &quot;Users&quot; &lt;em&gt;(Enter)&lt;/em&gt;&lt;br /&gt;smbldap-groupadd -s S-1-5-32-546 -a -g 546 -t builtin &quot;Guests&quot; &lt;em&gt;(Enter)&lt;/em&gt;&lt;br /&gt;smbldap-groupadd -s S-1-5-32-547 -a -g 547 -t builtin &quot;Power Users&quot; &lt;em&gt;(Enter)&lt;/em&gt;&lt;/p&gt;&lt;p&gt;To create users use the smbldap-useradd command. The &lt;a href=&quot;http://sourceforge.net/docman/display_doc.php?docid=33543&amp;amp;group_id=166108&quot;&gt;documentation for SMBLDAP-Tools&lt;/a&gt; is very comprehensive plus the help provided by the individual commands is very explanatory.  &lt;/p&gt;&lt;h2&gt;The smb.conf file&lt;/h2&gt;&lt;p&gt;With SMBLDAP-Tools in place and configured it is now time to configure Samba. Below is my &lt;strong&gt;/etc/samba/smb.conf&lt;/strong&gt; file. Please note this file has been processed by a Perl script hence all the spaces between configuration options are missing (do not worry Samba does not mind).&lt;/p&gt;&lt;p class=&quot;codesnippet&quot;&gt;[global]&lt;br /&gt;        preservecase              = yes&lt;br /&gt;        bindinterfacesonly        = true&lt;br /&gt;        nameresolveorder          = wins lmhosts bcast&lt;br /&gt;        maptoguest                = Bad User&lt;br /&gt;        printcapname              = /dev/null&lt;br /&gt;        domainlogons              = Yes&lt;br /&gt;        disablenetbios            = yes&lt;br /&gt;        preferredmaster           = Yes&lt;br /&gt;        strictlocking             = no&lt;br /&gt;        socketoptions             = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 IPTOS_LOWDELAY&lt;br /&gt;        printing                  = bsd&lt;br /&gt;        workgroup                 = STRESSFREE&lt;br /&gt;        useclientdriver           = no&lt;br /&gt;        security                  = user&lt;br /&gt;        domainmaster              = Yes&lt;br /&gt;        timeserver                = yes&lt;br /&gt;        ldapadmindn               = cn=admin,o=sfs&lt;br /&gt;        ldapsuffix                = o=sfs&lt;br /&gt;        ldapusersuffix            = ou=Users&lt;br /&gt;        ldapgroupsuffix           = ou=Groups&lt;br /&gt;        ldapmachinesuffix         = ou=Computers&lt;br /&gt;        ldapdeletedn              = Yes&lt;br /&gt;        adduserscript             = /usr/sbin/smbldap-useradd -m &quot;%u&quot;&lt;br /&gt;addgroupscript            = /usr/sbin/smbldap-groupadd -p &quot;%g&quot;&lt;br /&gt;        deleteuserfromgroupscript = /usr/sbin/smbldap-groupmod -x &quot;%u&quot; &quot;%g&quot;&lt;br /&gt;        deletegroupscript         = /usr/sbin/smbldap-groupdel &quot;%g&quot;&lt;br /&gt;        addusertogroupscript      = /usr/sbin/smbldap-groupmod -m &quot;%u&quot; &quot;%g&quot;&lt;br /&gt;        setprimarygroupscript     = /usr/sbin/smbldap-usermod -g &quot;%g&quot; &quot;%u&quot;&lt;br /&gt;        addmachinescript          = /usr/sbin/smbldap-useradd -w &quot;%u&quot;&lt;br /&gt;        deleteuserscript          = /usr/sbin/smbldap-userdel &quot;%u&quot;&lt;br /&gt;        passwdchat                = &quot;Changing password for*\nNew password*&quot; %n\n &quot;*Retype new passw$&lt;br /&gt;         passwdprogram             = /usr/sbin/smbldap-passwd -u %u&lt;br /&gt;unixpasswordsync = yes&lt;br /&gt;ldappasswdsync = yes&lt;br /&gt;        ldaptimeout               = 5  &lt;br /&gt;        loglevel                  = 0 &lt;br /&gt;        interfaces                = eth0,lo&lt;br /&gt;        passdbbackend             = ldapsam:ldap://ldap.stress-free.co.nz/&lt;br /&gt;        loadprinters              = no&lt;br /&gt;        winssupport               = yes&lt;br /&gt;        changesharecommand        = /usr/local/sbin/add_delete_share.pl&lt;br /&gt;        addsharecommand           = /usr/local/sbin/add_delete_share.pl&lt;br /&gt;        deletesharecommand        = /usr/local/sbin/add_delete_share.pl&lt;br /&gt;        serverstring              = StressFree file and print server&lt;br /&gt;        oslevel                   = 65&lt;br /&gt;        svcctllist                = cups apache2 mysql scalix scalix-tomcat dnsmasq smb nmb &lt;br /&gt;&lt;br /&gt;        ## Section - [netlogon]&lt;br /&gt;[netlogon]&lt;br /&gt;        browseable                = No&lt;br /&gt;        comment                   = Network Logon Service&lt;br /&gt;        path                      = /var/lib/samba/netlogon&lt;br /&gt;        writelist                 = root &lt;br /&gt;&lt;br /&gt; ## Section - [profiles]&lt;br /&gt; [profiles]&lt;br /&gt;         cscpolicy                 = disable&lt;br /&gt;         directorymask             = 0700&lt;br /&gt;         createmask                = 0600&lt;br /&gt;         browseable                = No&lt;br /&gt;         path                      = /home/profiles&lt;br /&gt;         forceuser                 = %U   &lt;br /&gt;         guestok                   = Yes&lt;br /&gt;         readonly                  = no&lt;br /&gt;         profileacls               = yes&lt;br /&gt;&lt;br /&gt;## Section - [music]&lt;br /&gt;[music]&lt;br /&gt;        createmask                = 664&lt;br /&gt;        directorymask             = 0775&lt;br /&gt;        browseable                = yes&lt;br /&gt;        writeable                 = yes&lt;br /&gt;        path                      = /home/music&lt;br /&gt;        guestok                   = no  &lt;br /&gt;        comment                   = Music volume&lt;br /&gt;        forcegroup                = users&lt;br /&gt;&lt;br /&gt;## Section - [homes]&lt;br /&gt;[homes]&lt;br /&gt;        readonly                  = No   &lt;br /&gt;        browseable                = No&lt;br /&gt;        comment                   = Home Directories&lt;br /&gt;        inheritacls               = Yes&lt;br /&gt;        validusers                = %S &lt;br /&gt;&lt;/p&gt;&lt;p&gt;With the above configuration many aspects of Samba can be configured directly within Windows (NT4, 2000, XP) using the &lt;a href=&quot;http://support.microsoft.com/kb/173673&quot;&gt;srvtools.exe&lt;/a&gt; package. To administer these settings you must be logged into the domain as a Domain Administrator. This &lt;a href=&quot;http://www.informationweek.com/news/showArticle.jhtml?articleID=193303529&amp;amp;pgno=1&amp;amp;queryText=&quot;&gt;InformationWeek article&lt;/a&gt; talks more about the extended Samba/Windows administration features which turn out to be quite powerful. &lt;/p&gt;&lt;p&gt;In the above example I have configured Windows-based services and shares controlling. Whilst not as powerful as command line access these pieces of functionality are very useful to have in environments where the day-to-day administrator is not competent with a Linux command line.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; When setting these things up always remember to checkout the very thorough &lt;a href=&quot;http://samba.org/samba/docs/man/manpages-3/smb.conf.5.html&quot;&gt;smb.conf Man file&lt;/a&gt; and &lt;a href=&quot;http://samba.org/samba/docs/&quot;&gt;Samba documentation&lt;/a&gt;.&lt;/p&gt;&lt;table border=&quot;0&quot; class=&quot;imagetable&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;/sites/default/files/images/tutorials/samba/samba_services_lg.jpg&quot;&gt;&lt;img src=&quot;/sites/default/files/images/tutorials/samba/samba_services_sm.jpg&quot; alt=&quot;&quot; width=&quot;225&quot; height=&quot;168&quot; /&gt;&lt;br /&gt;Manage Linux services from Windows &lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;/sites/default/files/images/tutorials/samba/samba_shares_lg.jpg&quot;&gt;&lt;img src=&quot;/sites/default/files/images/tutorials/samba/samba_shares_sm.jpg&quot; alt=&quot;&quot; width=&quot;225&quot; height=&quot;168&quot; /&gt;&lt;br /&gt;Manage Samba shares from the desktop&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h2&gt;Services Control&lt;/h2&gt;&lt;p&gt;The services running on the Linux server can be controlled from Windows via Samba as of version 3.0.21. This functionality integrates into the NT4 Server Manager applet and 2000/XP MMC snap-in. Configuring it is very easy and requires two steps:&lt;/p&gt;&lt;p&gt;1. Create symlinks for the services you wish Samba to be able to control in &lt;strong&gt;/usr/lib/samba/svcctl&lt;/strong&gt; to the service scripts in &lt;strong&gt;/etc/init.d&lt;/strong&gt;. For example to control MySQL from Samba:&lt;/p&gt;&lt;p class=&quot;codesnippet&quot;&gt;ln -s /etc/init.d/mysql /usr/lib/samba/svcctl/mysql &lt;/p&gt;&lt;p&gt;2. Once the symlinks are created to the relevant Linux services edit the &lt;strong&gt;/etc/samba/smb.conf&lt;/strong&gt; file and set the svcctl parameter in the [global] section:&lt;/p&gt;&lt;p class=&quot;codesnippet&quot;&gt;        svcctllist                = mysql&lt;/p&gt;&lt;p&gt;Restart Samba and now when you browse to the Linux server in Server Manager or MMC and view its services you will see the MySQL service, its status and have the option to start or stop it.&lt;/p&gt;&lt;h2&gt;Share Management&lt;/h2&gt;&lt;p&gt;NT4 Server Manager allows the directory shares for the server to be manipulated. This task is performed by either a perl or python script found in &lt;strong&gt;/usr/share/doc/packages/samba/examples/scripts/shares&lt;/strong&gt;. &lt;/p&gt;&lt;p&gt;Locate the modify_samba_config.pl file found within the above directory and copy it to /usr/local/sbin. For clarity I also rename it to &lt;strong&gt;add_delete_share.pl&lt;/strong&gt;. I have found that in Samba 3.0.23 this script must be modified in order for things to work correctly, edit the file and find the following lines:&lt;/p&gt;&lt;p class=&quot;codesnippet&quot;&gt;elsif ($#ARGV == 3) {&lt;br /&gt;        $add_mode = 1;&lt;br /&gt;}&lt;/p&gt;&lt;p&gt;and change it to read (change the 3 to a 4):&lt;/p&gt;&lt;p class=&quot;codesnippet&quot;&gt;elsif ($#ARGV == 4) {&lt;br /&gt;        $add_mode = 1;&lt;br /&gt;} &lt;/p&gt;&lt;p&gt;Now edit the &lt;strong&gt;/etc/samba/smb.conf&lt;/strong&gt; file and add the following configuration options:&lt;/p&gt;&lt;p class=&quot;codesnippet&quot;&gt;changesharecommand        = /usr/local/sbin/add_delete_share.pl&lt;br /&gt;        addsharecommand           = /usr/local/sbin/add_delete_share.pl&lt;br /&gt;        deletesharecommand        = /usr/local/sbin/add_delete_share.pl&lt;/p&gt;&lt;p&gt;Restart Samba and you should find the shares on the server can be modified as required. Do note however that this script is not very advanced and does not provide advanced privileges support, it only creates basic shares. Also be aware that when using the Server Management tool the path to shared directories must be entered in a Windows centric format, for example c:\home\david for /home/david.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;  &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/linux&quot;&gt;linux&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/samba&quot;&gt;samba&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/ldap&quot;&gt;ldap&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Mon, 30 Oct 2006 05:00:56 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">343 at https://www.stress-free.co.nz</guid>
</item>
<item>
 <title>Jeremy Allison on FLOSS Weekly</title>
 <link>https://www.stress-free.co.nz/jeremy_allison_on_floss_weekly</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
    &lt;p&gt;&lt;a href=&quot;http://samba.org/~jra/&quot;&gt;Jeremy Allison&lt;/a&gt; finally made an appearance on &lt;a href=&quot;http://www.twit.tv/floww14&quot;&gt;FLOSS Weekly to talk about Samba&lt;/a&gt;. The delay was not through lack of trying (it was the third take of the show) and as usual he does not disappoint. My favourite bit when he was talking about a Sun conference he attended starring then CEO Scott McNealy:&lt;br /&gt;&lt;/p&gt;&lt;h3&gt;&quot;So he picks some like five rows back and she comes up to ask him a question. And it turns into a completely scripted song and dance routine. She was a ringer because he was scared to get an unfiltered question. He was scared to get an unfiltered question from one of his employees. I must admit Novell just isn&#039;t that organised....&quot;&lt;/h3&gt;&lt;p&gt;I guess that pretty much sums up the differences between Sun and Novell in a couple of sentences. &lt;!--break--&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;  &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/samba&quot;&gt;samba&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/podcasts&quot;&gt;podcasts&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Wed, 18 Oct 2006 09:59:29 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">338 at https://www.stress-free.co.nz</guid>
</item>
<item>
 <title>SuSE/OpenLDAP/Samba Howto</title>
 <link>https://www.stress-free.co.nz/suse_openldap_samba_howto</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
    &lt;p&gt;This tutorial assumes you are familar with basic Linux and Windows concepts and are comfortable using SuSE Linux 9 (Professional or Enterprize). SuSE 9.2 Professional was used during the production of this guide but for most part the commands, software and general concepts should be applicable on any current version of SuSE (or OpenSUSE).    &lt;br /&gt;To ease configuration it is very helpful to do most things from another desktop so that you can use really useful utilities like graphical Internet browsers and copy/paste tools. &lt;/p&gt;&lt;h2&gt;Setting up the basic system&lt;/h2&gt;  &lt;p&gt;First off install your basic SuSE system. For this tutorial I used SuSE 9.2 Professional with the network install CD using the local New Zealand mirror at &lt;a href=&quot;http://linux.jetstreamgames.co.nz/suse/i386/9.2&quot;&gt;http://linux.jetstreamgames.co.nz/suse/i386/9.2&lt;/a&gt;    &lt;br /&gt;I prefer to perform an initial basic install with no extra packages or windowing environment. Using this strategy I have complete control over what goes on the system as far as software is concerned. This is important as a default SuSE install will put alot of unnecessary applications and libraries onto your server. &lt;/p&gt;&lt;p&gt;Once the base install is complete using Yast to install openldap, samba, apache2-prefork and php (with ldap &amp;amp; session support). If you are not sure how to do this log in as root and type yast (enter) in the terminal. To install packages select Software -&amp;gt; Install and Remove Software. &lt;/p&gt;&lt;p&gt;Run Online update (Software -&amp;gt; Online Update) afterwards to make sure you are at current working levels. There is a bug in the default install of PHP session support on SuSE 9.2. Without running Online Update you won’t get far in this tutorial as Apache will have problems running. &lt;/p&gt;  &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/suse&quot;&gt;suse&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tutorials&quot;&gt;software tutorials&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/samba&quot;&gt;samba&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/ldap&quot;&gt;ldap&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Thu, 24 Aug 2006 03:55:25 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">490 at https://www.stress-free.co.nz</guid>
</item>
<item>
 <title>Sambas Recycle VFS provides Salvage-like functionality</title>
 <link>https://www.stress-free.co.nz/sambas_recycle_vfs_provides_salvage_like_functionality</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
      &lt;div class=&quot;image&quot;&gt;&lt;img src=&quot;/sites/default/files/images/news/samba-logo.jpg&quot; border=&quot;0&quot; alt=&quot;samba-logo.jpg&quot; hspace=&quot;0&quot; vspace=&quot;0&quot; width=&quot;160&quot; height=&quot;81&quot; /&gt;&lt;/div&gt;If anyone&#039;s used &lt;a href=&quot;http://en.wikipedia.org/wiki/Novell_Storage_Services&quot;&gt;Novell&#039;s NSS filesystem&lt;/a&gt; they will know how useful the Salvage tool is. All too often a file once thought of as useless is suddenly needed or even worse a useful file accidentally deleted. In a traditional Samba setup this deleted file is lost for good unless a copy exists in backup form. This is fine for some occasions but if you have just spent eight hours working on the file going back to a twelve hour old version is not that appealing.  &lt;p&gt;&lt;a href=&quot;http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/VFS.html#id2617365&quot;&gt;Samba 3&#039;s Recycle VFS (Virtual File System)&lt;/a&gt; module solves this problem by providing Salvage like capabilities in a nice Samba container. When a file is deleted on the share it is not deleted from the filesystem but instead its file-pointer moved to the specified recycle directory for later retrieval (just like your standard Recycle Bin). &lt;/p&gt;  &lt;p&gt;Recycle VFS is enabled at the share level which makes it quite flexible. To enable the functionality add the following to your smb.conf file (where SambaShare is a configured share) and restart Samba:&lt;/p&gt;  &lt;p class=&quot;codesnippet&quot;&gt;[SambaShare]    &lt;br /&gt;   path = /home/example    &lt;br /&gt;   public = yes    &lt;br /&gt;   writable = yes    &lt;br /&gt;   browsable = yes    &lt;br /&gt;&lt;br /&gt; # Add from this point down to the share config to enable Recycle VFS....    &lt;br /&gt;   vfs object = recycle    &lt;br /&gt;      recycle:repository = .recycle/%U    &lt;br /&gt;      recycle:keeptree = Yes    &lt;br /&gt;      recycle:touch = Yes    &lt;br /&gt;      recycle:versions = Yes    &lt;br /&gt;      recycle:maxsixe = 0    &lt;br /&gt;      recycle:exclude = *.tmp    &lt;br /&gt;      recycle:exclude_dir = /tmp &lt;/p&gt;  &lt;p&gt;This will enable the recycling functionality on the SambaShare share. Pointers to deleted files will be placed in the .recycle/Username directory on the share. To help Samba out you should create the .recycle directory in the share and make sure all users who may be deleting files on the share have read/write access to the directory.    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;This way if someone deletes a file they can browse to \\Server\SambaShare\.recycle\UserName and find the deleted file for easy restoration. The versions option enables multiple files of the same name to be safely deleted without fear of loosing all but one of the copies.    &lt;br /&gt;&lt;span style=&quot;font-weight: bold&quot;&gt;NOTE:&lt;/span&gt; The recycle directory does not have to be named .recycle, you can name it anything you like just specify the correct location in the smb.conf file. &lt;/p&gt;  &lt;p&gt;The one issue you will need to plan for now is disk usage as deleted files will no longer be deleted. In order to reclaim disk space you will probably want to setup a cron job that searches for files in the recycle directory older than a specific time and deletes them or just do a big purge whenever storage space gets a little low. &lt;/p&gt;  &lt;p&gt;Thanks goes out to &lt;a href=&quot;http://lists.firepipe.net/pipermail/cwe-lug/2004-September/001924.html&quot;&gt;this LUG thread&lt;/a&gt; and Google for pointing this out to me.    &lt;/p&gt;&lt;h1&gt;Update&lt;/h1&gt;&lt;p&gt;Enabling this salvage functionality will result in a lot of hard disk space being lost to deleted files. Samba currently does not have an automatic clean or compression tool for these files so the easiest way to tidy them up is to remove them after a certain period of time.&lt;/p&gt;&lt;p&gt;To do so run the command (where /home/example is the path to the salvage enabled share):&lt;/p&gt;&lt;p class=&quot;codesnippet&quot;&gt;find /home/example/.deleted -mtime +14 -type f -exec rm -r {} \; &lt;/p&gt;&lt;p&gt;This will delete all deleted files that are more than two weeks old. You can run this command on a regular basis by adding it as a cron job, for example to run it once a month create a file named &lt;strong&gt;/etc/cron.d/clean-deleted&lt;/strong&gt; which contains:&lt;/p&gt;&lt;p class=&quot;codesnippet&quot;&gt;0 3 1 * *  root  find /Users/david/Desktop/Temp -mtime +14 -type f -exec rm -r {} \;&lt;/p&gt;&lt;p&gt;This will delete the old files at 3:00am on the 1st of each month.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;   &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/linux&quot;&gt;linux&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tutorials&quot;&gt;software tutorials&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/samba&quot;&gt;samba&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Mon, 10 Apr 2006 09:03:11 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">258 at https://www.stress-free.co.nz</guid>
</item>
<item>
 <title>Samba 4 Technology Preview released</title>
 <link>https://www.stress-free.co.nz/samba_4_technology_preview_released</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
      &lt;div class=&quot;image&quot;&gt;&lt;img src=&quot;/sites/default/files/images/news/samba-logo.jpg&quot; border=&quot;0&quot; alt=&quot;Samba&quot; hspace=&quot;0&quot; vspace=&quot;0&quot; width=&quot;160&quot; height=&quot;81&quot; /&gt;&lt;/div&gt; A Technology Preview of Samba 4 was &lt;a href=&quot;http://us4.samba.org/samba/news/#4.0.0tp1&quot;&gt;recently released&lt;/a&gt;. The primary new feature is comprehensive &lt;a href=&quot;http://www.zdnet.com.au/news/software/soa/New_Samba_targets_Active_Directory/0,2000061733,39234687,00.htm&quot;&gt;Active Directory support&lt;/a&gt;. At the moment Samba 3 is capable of joining an Active Directory domain but it cannot function as an Active Directory controller of any sort.  &lt;p&gt;Nice additions to Samba 4 is a built-in LDAP back-end and Kerberos encryption that is compatible with Microsoft&#039;s version. Linux Format has an &lt;a href=&quot;http://www.linuxformat.co.uk/modules.php?op=modload&amp;amp;name=News&amp;amp;file=article&amp;amp;sid=217&quot;&gt;interview with Jeremy Alison&lt;/a&gt;, a Samba developer. He talks about the long development process that has taken place and is still to come. The Technology Preview includes a good deal of the AD server functionality but still lacks printer and security features, plus the back-end LDAP structures are in flux. Still it is pretty exciting, maybe OpenSUSE 11 will feature Samba 4....&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;   &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/linux&quot;&gt;linux&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/samba&quot;&gt;samba&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/active_directory&quot;&gt;active directory&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Wed, 25 Jan 2006 21:01:41 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">221 at https://www.stress-free.co.nz</guid>
</item>
<item>
 <title>Fixing Samba/CUPS Permission Issues</title>
 <link>https://www.stress-free.co.nz/fixing_samba_cups_permission_issues</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
    I have found that Samba &amp;lt; 3.0.9 has a few permissions issues with CUPS when using the printing tools from Windows desktops. It turns out that there is a few issues with CUPS permissions and Samba but these apparently have been fixed in Samba versions 3.0.12 onwards.&lt;br /&gt;In the interim to fix the issue you must edit the cupsd.conf file and comment out a few lines so that you have the following:&lt;br /&gt;&lt;p class=&quot;codesnippet&quot;&gt;&amp;lt;Location /admin&amp;gt;&lt;br /&gt;#  AuthType BasicDigest&lt;br /&gt;#  AuthClass Group&lt;br /&gt;#  AuthGroupName sys&lt;br /&gt;  Order Deny,Allow&lt;br /&gt;  Deny From All&lt;br /&gt;  Allow From 127.0.0.1&lt;br /&gt;&amp;lt;/Location&amp;gt;&lt;/p&gt;&lt;br /&gt;This creates a bit of a security risk as anyone on the localhost can make printer administration changes but in a small network this is not such a huge deal (when compared to the loss of functionality if the settings are in place).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/linux&quot;&gt;linux&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tutorials&quot;&gt;software tutorials&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/samba&quot;&gt;samba&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Wed, 12 Oct 2005 08:26:27 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">148 at https://www.stress-free.co.nz</guid>
</item>
<item>
 <title>Customised Netlogon scripts for Samba Howto</title>
 <link>https://www.stress-free.co.nz/customised_netlogon_scripts_for_samba_howto</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
    I have put up a script that allows customisation of the batch file run when a Windows user logs into a Samba PDC. This script creates a unique login script based on the user&#039;s name and the groups they belong to. It ties nicely into any authentication method (file/LDAP/NIS/Kerebos/Samba) as long as PAM has been configured to pull user and group details from that source. The tutorial is online here:&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;https://www.stress-free.co.nz/node/132/59/&quot; title=&quot;Customised Logon Scripts for Samba&quot;&gt;Customised Netlogon scripts for Samba Howto&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/linux&quot;&gt;linux&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/samba&quot;&gt;samba&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Thu, 15 Sep 2005 01:25:00 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">133 at https://www.stress-free.co.nz</guid>
</item>
<item>
 <title>Customised Netlogon scripts for Samba</title>
 <link>https://www.stress-free.co.nz/customised_netlogon_scripts_for_samba</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
    When logging into a Windows domain there is the option to run a script on the desktop to setup drives, synchronize time and anything else that maybe required.&lt;br /&gt;&lt;br /&gt;Unfortunately the power of these scripts are reduced by the limited functionality of the client side scripting language and Samba&#039;s inability to produce tailored batch files for each user.&lt;br /&gt;The following script is capable of generating very complex netlogon batch files based on the users name and group membership information stored on the Samba server. These user credentials are tied to the PAM authentication system and will work if your user credentials are coming from local files, LDAP or any other PAM compatible source.&lt;br /&gt;&lt;br /&gt;To install download and unzip the archive available &lt;a href=&quot;/sites/default/files/samba-netlogon.zip&quot; title=&quot;Samba Netlogon Scripts&quot;&gt;here&lt;/a&gt;. &lt;br /&gt;&lt;span style=&quot;font-weight: bold&quot;&gt;NOTE:&lt;/span&gt; For the script to run successfully you must install the very small unix2dos utility using your distributions software installation tool (apt-get, yast, yum, rpm, etc).&lt;br /&gt;&lt;br /&gt;Copy the netlogon script to&lt;span style=&quot;font-weight: bold&quot;&gt; /usr/local/bin&lt;/span&gt; on your Samba server.&lt;br /&gt;Make sure the file is executable by the user Samba is running under. If in doubt just run: &lt;p class=&quot;codesnippet&quot;&gt;chmod a+x /usr/local/bin/netlogon&lt;/p&gt;  Copy the netlogon.conf configuration file to &lt;span style=&quot;font-weight: bold&quot;&gt;/etc/samba&lt;/span&gt; on your Samba server.&lt;br /&gt;Copy the netlogon-scripts directory to &lt;span style=&quot;font-weight: bold&quot;&gt;/etc/samba&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Edit the netlogon.conf file and change the configuration options to your needs. For example:  &lt;p class=&quot;codesnippet&quot;&gt; server EXAMPLESERVER&lt;br /&gt;scriptsdir /etc/samba/netlogon-scripts&lt;br /&gt;netlogondir /home/samba &lt;/p&gt; The netlogondir attribute should point to the location on your filesystem where the Netlogon share reads from. Your Samba server should be able to read and write to this location.&lt;br /&gt;&lt;br /&gt;Edit the &lt;span style=&quot;font-weight: bold&quot;&gt;/etc/samba/smb.conf&lt;/span&gt; file and look for the following two lines that begin with &quot;preexec&quot;  and &quot;logon script&quot;. Change (or if they do not exist add) these two lines to read:  &lt;p class=&quot;codesnippet&quot;&gt; preexec = /usr/local/bin/netlogon %U&lt;br /&gt;logon script = %U.bat&lt;br /&gt;&lt;/p&gt;  Once you have made the change restart the Samba smb service: &lt;p class=&quot;codesnippet&quot;&gt; /etc/init.d/smb restart&lt;br /&gt;&lt;/p&gt;  Go to the /etc/samba/netlogon-scripts directory. In this directory you will see a series of example text files. &lt;span style=&quot;font-weight: bold&quot;&gt;header.txt&lt;/span&gt; and &lt;span style=&quot;font-weight: bold&quot;&gt;footer.txt&lt;/span&gt; are added to the top and bottom of each batch file respectively. In these two files you should add common commands like time synchronization and common drive mappings. &lt;br /&gt;In these config files the keywords SERVER and USER are automatically replaced by the server name supplied in the netlogon.conf file and the username provided by Samba. This means you do not have to &#039;hard code&#039; a config file to a particular server or user which makes upkeep and troubleshooting a little easier.&lt;br /&gt;&lt;h4&gt;User specific declarations:&lt;/h4&gt;Files that begin with the prefix user- are entries exclusive to a specific user. In the example directory there is a file named &lt;span style=&quot;font-weight: bold&quot;&gt;user-david.txt&lt;/span&gt; which provides some drive mappings just for the user david on the system.&lt;br /&gt;&lt;h4&gt;Group specific declarations:&lt;/h4&gt;Files that begin with the prefix group- are entries included in the batch file for users of a specific group. For example in the example directory the file &lt;span style=&quot;font-weight: bold&quot;&gt;group-users.txt&lt;/span&gt; adds a series of drive mappings for anyone in the users group. &lt;br /&gt;&lt;br /&gt;Using these files an individually customised batch file is built for each specific user that logs on. If the user is added or removed from a group in the LDAP tree or /etc/groups file this change is automatically picked up the next time they perform a domain logon.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold&quot;&gt;NOTE:&lt;/span&gt; It does not matter whether you edit the /etc/samba/netlogon-scripts files in Unix or Windows as the batch file is passed through unix2dos to ensure line breaks conform to the Windows standard. &lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Code Listing for netlogon&lt;/h3&gt;Below is a listing of the netlogon file. It is a fairly simple shell script and requires no special interpreter to run. &lt;p class=&quot;codesnippet&quot;&gt; #!/bin/bash&lt;br /&gt; # In config text files the following two variables can be used:&lt;br /&gt; # SERVER = server name&lt;br /&gt; # USER = username&lt;br /&gt;&lt;br /&gt; # configure&lt;br /&gt; configdir=&quot;/Users/david/Desktop&quot;&lt;br /&gt;&lt;br /&gt; server=`awk &#039;/^server/{print $2}&#039; $configdir/config.conf`&lt;br /&gt; scriptsdir=`awk &#039;/^scriptsdir/{print $2}&#039; $configdir/config.conf`&lt;br /&gt; netlogondir=`awk &#039;/^netlogondir/{print $2}&#039; $configdir/config.conf`&lt;br /&gt;&lt;br /&gt; username=$1&lt;br /&gt;&lt;br /&gt; echo Server: $server&lt;br /&gt; echo Username: $username&lt;br /&gt;&lt;br /&gt; # Remove any existing batch file&lt;br /&gt; if [ -e $netlogondir/$username.bat ]&lt;br /&gt; then&lt;br /&gt;     echo Removing existing $username.bat file&lt;br /&gt;     rm $netlogondir/$username.bat&lt;br /&gt; fi&lt;br /&gt; # Add header file if it exists&lt;br /&gt; if [ -e $scriptsdir/header.txt ]&lt;br /&gt; then&lt;br /&gt;     echo Adding netlogin file header to $username.tmp&lt;br /&gt;     cat $scriptsdir/header.txt &amp;gt; $netlogondir/$username.tmp&lt;br /&gt; else&lt;br /&gt;     touch $netlogondir/$username.tmp&lt;br /&gt; fi&lt;br /&gt; # Add group directives&lt;br /&gt; for group in `groups $username`&lt;br /&gt; do&lt;br /&gt;     if [ -e $scriptsdir/group-$group.txt ]&lt;br /&gt;     then&lt;br /&gt;         echo Adding netlogin script group-$group.txt to $username.tmp&lt;br /&gt;         cat $scriptsdir/group-$group.txt &amp;gt;&amp;gt; $netlogondir/$username.tmp&lt;br /&gt;     fi&lt;br /&gt; done&lt;br /&gt; # Add specific user directives&lt;br /&gt; if [ -e $scriptsdir/user-$username.txt ]&lt;br /&gt; then&lt;br /&gt;     echo Adding netlogin script user-$username.txt to $username.tmp&lt;br /&gt;     cat $scriptsdir/user-$username.txt &amp;gt;&amp;gt; $netlogondir/$username.tmp&lt;br /&gt; fi&lt;br /&gt; # Add footer&lt;br /&gt; if [ -e $scriptsdir/footer.txt ]&lt;br /&gt; then&lt;br /&gt;     echo Adding netlogin file footer to $username.tmp&lt;br /&gt;     cat $scriptsdir/footer.txt &amp;gt;&amp;gt; $netlogondir/$username.tmp&lt;br /&gt; fi&lt;br /&gt; sed -e &quot;s/SERVER/$server/g&quot; $netlogondir/$username.tmp &amp;gt; $netlogondir/$username.tmp2 &lt;br /&gt; sed -e &quot;s/USER/$username/g&quot; $netlogondir/$username.tmp2 &amp;gt; $netlogondir/$username.bat &lt;br /&gt; # Clean up tmp files&lt;br /&gt; rm $netlogondir/$username.tmp*&lt;br /&gt;&lt;br /&gt; # Convert line breaks to Windows format (requires unix2dos utility)&lt;br /&gt; unix2dos $netlogondir/$username.bat&lt;br /&gt;&lt;br /&gt; exit&lt;br /&gt;&lt;/p&gt;  &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/linux&quot;&gt;linux&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tutorials&quot;&gt;software tutorials&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/samba&quot;&gt;samba&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Thu, 15 Sep 2005 00:52:55 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">132 at https://www.stress-free.co.nz</guid>
</item>
<item>
 <title>SuSE/OpenLDAP/Samba Added to Tutorials</title>
 <link>https://www.stress-free.co.nz/suse_openldap_samba_added_to_tutorials</link>
 <description>
  &lt;div class=&quot;field-body&quot;&gt;
    &lt;div class=&quot;image&quot;&gt;&lt;img src=&quot;/sites/default/files/images/news/suse.gif&quot; border=&quot;0&quot; alt=&quot;Novell SuSE&quot; hspace=&quot;0&quot; vspace=&quot;0&quot; width=&quot;160&quot; height=&quot;114&quot; /&gt;&lt;/div&gt; Today I finished a howto that goes through the steps to &lt;a href=&quot;/node/126/59/&quot;&gt;setup a Samba Primary Domain Controller (PDC) with an OpenLDAP backend on SuSE&lt;/a&gt;. The tutorial draws together a lot of the things I have learnt over the last few weeks working with Samba and OpenLDAP. If anyone reads it through and finds errors (both practical and grammatical) then please &lt;a href=&quot;https://www.stress-free.co.nz/contact/&quot;&gt;get in touch&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  &lt;/div&gt;

&lt;ul class=&quot;field-taxonomy-vocabulary-1&quot;&gt;

      &lt;li&gt;
      &lt;a href=&quot;/tech/linux&quot;&gt;linux&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/samba&quot;&gt;samba&lt;/a&gt;    &lt;/li&gt;
      &lt;li&gt;
      &lt;a href=&quot;/tech/ldap&quot;&gt;ldap&lt;/a&gt;    &lt;/li&gt;
  
&lt;/ul&gt;
</description>
 <pubDate>Mon, 12 Sep 2005 11:30:20 +0000</pubDate>
 <dc:creator>David</dc:creator>
 <guid isPermaLink="false">127 at https://www.stress-free.co.nz</guid>
</item>
</channel>
</rss>
