svn commit: samba-docs r1127 - in trunk: manpages-3 smbdotconf/misc

obnox at samba.org obnox at samba.org
Fri Jun 22 22:44:14 GMT 2007


Author: obnox
Date: 2007-06-22 22:44:13 +0000 (Fri, 22 Jun 2007)
New Revision: 1127

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=1127

Log:
Add an initial amount of documentation of registry based
configuration to smb.conf(5). This explains registry shares
and registry global options and mentions "net conf". 

This will be in 3.0.26, but Jerry told me to commit this
anyways. The plan is to branch the doc for 3.0.25b from r1126 (say).

I could not check the result since I could not get the
manpages built correctly on any system I tried. So the
output needs to be checked - sorry, I will fix my 
environment later...

Michael


Added:
   trunk/smbdotconf/misc/registryshares.xml
Modified:
   trunk/manpages-3/smb.conf.5.xml
   trunk/smbdotconf/misc/include.xml


Changeset:
Modified: trunk/manpages-3/smb.conf.5.xml
===================================================================
--- trunk/manpages-3/smb.conf.5.xml	2007-06-19 17:17:37 UTC (rev 1126)
+++ trunk/manpages-3/smb.conf.5.xml	2007-06-22 22:44:13 UTC (rev 1127)
@@ -712,6 +712,84 @@
 </refsect1>
 
 <refsect1>
+	<title>REGISTRY-BASED CONFIGURATION</title>
+
+	<para>
+		Starting with Samba version 3.0.26, the capability to
+		store Samba configuration in the registry is available. 
+		There are two levels of registry configuration. 
+	</para>
+
+	<orderedlist continuation="restarts" inheritnum="ignore" numeration="arabic">
+		<listitem><para>Share definitions stored in registry are used.
+		This is triggered by setting the global parameter
+		<parameter>registry shares</parameter> to
+		<term>yes</term> in <term>smb.conf</term>.
+		</para>
+		<para>Note: Shares defined in <term>smb.conf</term> always take priority over 
+		shares of the same name defined in registry.
+		</para></listitem>
+
+		<listitem><para>Global <term>smb.conf</term> options stored in
+		registry are used. This
+		is triggered by a new special meaning of the
+		parameter <parameter>include = registry</parameter> in
+		the [global] section of <term>smb.conf</term>. 
+		This reads the content of
+		the global configuration section from the regsitry
+		and includes the result with the same priorities as
+		an include of a text file. Activation of global
+		registry options automatically activates registry
+		shares.
+		</para></listitem>
+	</orderedlist>
+
+	<para>	
+		Even when global registry options are used, the initial source of
+		configuration is still the <term>smb.conf</term> file. 
+		It is this possible though, to produce a registry-only configuration 
+		with a minimal configuration file like this:
+<programlisting>
+	<smbconfsection name="[global]"/>
+	<smbconfoption name="include">registry</smbconfoption>
+</programlisting>
+		This is also currently the only supported configuration with global
+		registry options activated. More precisely, it is only supported to 
+		specify options in <term>smb.conf</term> <emph>before</emph> the
+		occurrence of <parameter>include = registry</parameter>.
+	</para>
+
+	<para>
+		Caveat: To make registry-based configurations foolprof at least to a
+		certain extent, the use of <parameter>lock directory</parameter>
+		and <parameter>include</parameter> inside the registry
+		configuration has been disabled. Especially, by changing the
+		<parameter>lock directory</parameter> inside the registry
+		configuration, one would create a broken setup where the daemons
+		do not see the configuration they loaded once it is active. This
+		phenomenon can of course also be triggered by specifying
+		<parameter>lock directory</parameter> after the
+		<parameter>include = registry</parameter> directive. This is why
+		this type of configuration is classified "unsupported" above.
+	</para>
+
+	<para>
+		The registry configuration can be accessed with
+		tools like <term>regedit</term> or <term>net rpc
+		registry</term> in the key
+		<term>HKLM\Software\Samba\smbconf</term>.
+
+		More conveniently, the <term>conf</term> subcommand of the
+		<citerefentry><refentrytitle>net</refentrytitle> 
+		<manvolnum>7</manvolnum></citerefentry> utility
+		offers a dedicated interface to read and write the
+		registry based configuration locally, i.e. directly
+		on the server. 
+	</para>
+
+</refsect1>
+
+<refsect1>
 	<title>EXPLANATION OF EACH PARAMETER</title>
 	
 	<samba:parameterlist>

Modified: trunk/smbdotconf/misc/include.xml
===================================================================
--- trunk/smbdotconf/misc/include.xml	2007-06-19 17:17:37 UTC (rev 1126)
+++ trunk/smbdotconf/misc/include.xml	2007-06-22 22:44:13 UTC (rev 1127)
@@ -1,6 +1,6 @@
 <samba:parameter name="include"
 	         context="G"
-			 type="string"
+		 type="string"
 		 hide="1"
 		 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
 <description>
@@ -13,6 +13,16 @@
 	It takes the standard substitutions, except <parameter moreinfo="none">%u</parameter>, 
 	<parameter moreinfo="none">%P</parameter> and <parameter moreinfo="none">%S</parameter>.
 	</para>
+	
+	<para>
+	The parameter <parameter>include = registry</parameter> has
+	a special meaning: It does <emphasis>not</emphasis> include
+	a file named <term>registry</term> from the current working
+	directory, but instead reads the global configuration options 
+	from the registry. See the section on registry-based
+	configuration for details. Note that this option
+	automatically activates registry shares.
+	</para>
 </description>
 
 <value type="default"></value>

Added: trunk/smbdotconf/misc/registryshares.xml
===================================================================
--- trunk/smbdotconf/misc/registryshares.xml	2007-06-19 17:17:37 UTC (rev 1126)
+++ trunk/smbdotconf/misc/registryshares.xml	2007-06-22 22:44:13 UTC (rev 1127)
@@ -0,0 +1,16 @@
+<samba:parameter name="config file"
+                 context="G"
+		 type="bool"
+		 advanced="1"
+                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+	<para>
+	This turns on or off support for share definitions read from
+	registry. Shares in defined in <term>smb.conf</term> take
+	precedence over shares with the same name defined in
+	registry. See the section on registry-based configuration
+	for details. 
+	</para>
+</description>
+<value type="example">/usr/local/samba/lib/smb.conf.%m</value>
+</samba:parameter>



More information about the samba-cvs mailing list