10.5pt fonts. Still needs some polishing..
# Docs to build
MAIN_DOCS = $(patsubst %/index.xml,%,$(wildcard */index.xml))
MANPAGES3 = $(wildcard $(MANPAGEDIR3)/*.?.xml)
+export TEXINPUTS=xslt/latex:.:
# Lists of files to process
LATEX_FIGURES = xslt/figures/caution.pdf xslt/figures/important.pdf xslt/figures/note.pdf xslt/figures/tip.pdf xslt/figures/warning.pdf
#
$(DOCBOOKDIR)/%.xml: %/index.xml xslt/expand-sambadoc.xsl
mkdir -p $(@D)
- $(XSLTPROC) --stringparam latex.imagebasedir "$*/" --stringparam noreference 1 --xinclude --output $@ xslt/expand-sambadoc.xsl $<
+ $(XSLTPROC) --stringparam noreference 1 --xinclude --output $@ xslt/expand-sambadoc.xsl $<
$(DOCBOOKDIR)/manpages-3/%.xml: $(MANPAGEDIR3)/%.xml xslt/expand-sambadoc.xsl
mkdir -p $(@D)
- $(XSLTPROC) --xinclude --stringparam latex.imagebasedir "$*/" --stringparam noreference 1 --output $@ xslt/expand-sambadoc.xsl $<
+ $(XSLTPROC) --xinclude --stringparam noreference 1 --output $@ xslt/expand-sambadoc.xsl $<
$(DOCBOOKDIR)/manpages-3/index.xml: $(MANPAGES3) xslt/manpage-summary.xsl
mkdir -p $(@D)
$(HTML2TEXT) -nobs -style pretty -o $@ $<
# Tex files
-%.tex: $(DOCBOOKDIR)/%.xml xslt/latex.xsl
+%.tex: %/index.xml xslt/latex.xsl
mkdir -p $(@D)
- $(XSLTPROC) --output $@ xslt/latex.xsl $<
+ $(XSLTPROC) --stringparam latex.imagebasedir "$*/" --xinclude --output $@ xslt/latex.xsl $<
latexfigures: $(LATEX_FIGURES)
PLUCKERBUILD = @PLUCKERBUILD@
COPY_IMAGES = ./scripts/copy-images.sh
THUMBPDF = @THUMBPDF@
-PDFLATEX = TEXINPUTS=xslt/latex:.: @PDFLATEX@ --file-line-error-style
-LATEX = TEXINPUTS=xslt/latex:.: @LATEX@ --file-line-error-style
+PDFLATEX = @PDFLATEX@ --file-line-error-style
+LATEX = @LATEX@ --file-line-error-style
FOP = @FOP@
RM = @RM@
PERL = @PERL@
</screen>
</example>
-<smbconfexample id="ch7-massmbconfA">
+<example id="ch7-massmbconfA">
<title>Primary Domain Controller &smb.conf; File &smbmdash; Part A</title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="unix charset">LOCALE</smbconfoption>
<smbconfoption name="idmap gid">10000-20000</smbconfoption>
<smbconfoption name="printer admin">root</smbconfoption>
<smbconfoption name="printing">cups</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
-<smbconfexample id="ch7-massmbconfB">
+<example id="ch7-massmbconfB">
<title>Primary Domain Controller &smb.conf; File &smbmdash; Part B</title>
+<smbconfblock>
<smbconfsection name="[IPC$]"/>
<smbconfoption name="path">/tmp</smbconfoption>
<smbconfoption name="guest ok">Yes</smbconfoption>
<smbconfoption name="printable">Yes</smbconfoption>
<smbconfoption name="browseable">No</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
-<smbconfexample id="ch7-massmbconfC">
+<example id="ch7-massmbconfC">
<title>Primary Domain Controller &smb.conf; File &smbmdash; Part C</title>
+<smbconfblock>
<smbconfsection name="[apps]"/>
<smbconfoption name="comment">Application Files</smbconfoption>
<smbconfoption name="path">/apps</smbconfoption>
<smbconfoption name="path">/var/lib/samba/drivers</smbconfoption>
<smbconfoption name="write list">root</smbconfoption>
<smbconfoption name="admin users">root, Administrator</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
-<smbconfexample id="ch7-slvsmbocnfA">
+<example id="ch7-slvsmbocnfA">
<title>Backup Domain Controller &smb.conf; File &smbmdash; Part A</title>
+<smbconfblock>
<smbconfcomment># Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="unix charset">LOCALE</smbconfoption>
<smbconfoption name="comment">Financial Services Files</smbconfoption>
<smbconfoption name="path">/data/service</smbconfoption>
<smbconfoption name="read only">No</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
-<smbconfexample id="ch7-slvsmbocnfB">
+<example id="ch7-slvsmbocnfB">
<title>Backup Domain Controller &smb.conf; File &smbmdash; Part B</title>
+<smbconfblock>
<smbconfsection name="[pidata]"/>
<smbconfoption name="comment">Property Insurance Files</smbconfoption>
<smbconfoption name="path">/data/pidata</smbconfoption>
<smbconfoption name="path">/var/lib/samba/profdata</smbconfoption>
<smbconfoption name="read only">No</smbconfoption>
<smbconfoption name="profile acls">Yes</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
<sect2>
<title>Key Points Learned</title>
</sect2>
<!-- One -->
-<smbconfexample id="ch5-massivesmb">
+<example id="ch5-massivesmb">
<title>Server: MASSIVE (PDC), File: <filename>/etc/samba/smb.conf</filename></title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">MEGANET</smbconfoption>
<smbconfoption name="comment">Property Insurance Files</smbconfoption>
<smbconfoption name="path">/data/pidata</smbconfoption>
<smbconfoption name="read only">No</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
<!-- Two -->
-<smbconfexample id="ch5-dc-common">
+<example id="ch5-dc-common">
<title>Server: MASSIVE (PDC), File: <filename>/etc/samba/dc-common.conf</filename></title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="shutdown script">/var/lib/samba/scripts/shutdown.sh</smbconfoption>
<smbconfoption name="path">/var/lib/samba/profiles</smbconfoption>
<smbconfoption name="read only">No</smbconfoption>
<smbconfoption name="profile acls">Yes</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
<!-- Three -->
-<smbconfexample id="ch5-commonsmb">
+<example id="ch5-commonsmb">
<title>Common Samba Configuration File: <filename>/etc/samba/common.conf</filename></title>
+<smbconfblock
<smbconfsection name="[global]"/>
<smbconfoption name="username map">/etc/samba/smbusers</smbconfoption>
<smbconfoption name="log level">1</smbconfoption>
<smbconfoption name="path">/apps</smbconfoption>
<smbconfoption name="admin users">bjordan</smbconfoption>
<smbconfoption name="read only">No</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
<!-- Four -->
-<smbconfexample id="ch5-bldg1-smb">
+<example id="ch5-bldg1-smb">
<title>Server: BLDG1 (Member), File: smb.conf</title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">MEGANET</smbconfoption>
<smbconfoption name="netbios name">BLDG1</smbconfoption>
<smbconfoption name="include">/etc/samba/dom-mem.conf</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
<!-- Five -->
-<smbconfexample id="ch5-bldg2-smb">
+<example id="ch5-bldg2-smb">
<title>Server: BLDG2 (Member), File: smb.conf</title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">MEGANET</smbconfoption>
<smbconfoption name="netbios name">BLDG2</smbconfoption>
<smbconfoption name="include">/etc/samba/dom-mem.conf</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
<!-- Six -->
-<smbconfexample id="ch5-dommem-smb">
+<example id="ch5-dommem-smb">
<title>Common Domain Member Include File: dom-mem.conf</title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="shutdown script">/var/lib/samba/scripts/shutdown.sh</smbconfoption>
<smbconfoption name="idmap uid">15000-20000</smbconfoption>
<smbconfoption name="idmap gid">15000-20000</smbconfoption>
<smbconfoption name="include">/etc/samba/common.conf</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
<!-- Seven -->
<example id="massive-dhcp">
</procedure>
-<smbconfexample id="ch9-sdmsdc">
+<example id="ch9-sdmsdc">
<title>Samba Domain Member in Samba Domain Using LDAP &smbmdash; &smb.conf; File</title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="unix charset">LOCALE</smbconfoption>
<smbconfoption name="path">/var/lib/samba/drivers</smbconfoption>
<smbconfoption name="admin users">root, Administrator</smbconfoption>
<smbconfoption name="write list">root</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
<example id="ch9-ldifadd">
<title>LDIF IDMAP Add-On Load File &smbmdash; File: /etc/openldap/idmap.LDIF</title>
</para></step>
</procedure>
-<smbconfexample id="ch0-NT4DSDM">
+<example id="ch0-NT4DSDM">
<title>Samba Domain Member Server Using Winbind &smb.conf; File for NT4 Domain</title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="unix charset">LOCALE</smbconfoption>
<smbconfoption name="path">/var/lib/samba/drivers</smbconfoption>
<smbconfoption name="admin users">root, Administrator</smbconfoption>
<smbconfoption name="write list">root</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
</sect2>
</para></step>
</procedure>
-<smbconfexample id="ch0-NT4DSCM">
+<example id="ch0-NT4DSCM">
<title>Samba Domain Member Server Using Local Accounts &smb.conf; File for NT4 Domain</title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="unix charset">LOCALE</smbconfoption>
<smbconfoption name="path">/var/lib/samba/drivers</smbconfoption>
<smbconfoption name="admin users">root, Administrator</smbconfoption>
<smbconfoption name="write list">root</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
</sect2>
<sect2 id="adssdm">
May this server serve well all who happen upon it.
</para>
-<smbconfexample id="ch9-adssdm">
+<example id="ch9-adssdm">
<title>Samba Domain Member &smb.conf; File for Active Directory Membership</title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="unix charset">LOCALE</smbconfoption>
<smbconfoption name="path">/var/lib/samba/drivers</smbconfoption>
<smbconfoption name="admin users">root, Administrator</smbconfoption>
<smbconfoption name="write list">root</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
<sect3>
<title>IDMAP_RID with Winbind</title>
An example &smb.conf; file for an ADS domain environment is shown in <link linkend="sbe-idmapridex"/>.
</para>
-<smbconfexample id="sbe-idmapridex">
+<example id="sbe-idmapridex">
<title>Example &smb.conf; File Using <constant>idmap_rid</constant></title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">KPAK</smbconfoption>
<smbconfoption name="winbind enum groups">No</smbconfoption>
<smbconfoption name="winbind nested groups">Yes</smbconfoption>
<smbconfoption name="printer admin">"KPAK\Domain Admins"</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
<para>
<indexterm><primary>large domain</primary></indexterm>
The example in <link linkend="sbeunxa"/> is for an ADS-style domain.
</para>
-<smbconfexample id="sbeunxa">
+<example id="sbeunxa">
<title>Typical ADS Style Domain &smb.conf; File</title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">SNOWSHOW</smbconfoption>
<smbconfoption name="idmap gid">150000-550000</smbconfoption>
<smbconfoption name="template shell">/bin/bash</smbconfoption>
<smbconfoption name="winbind use default domain">Yes</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
<para>
<indexterm><primary>realm</primary></indexterm>
An example &smb.conf; file is shown in <link linkend="sbewinbindex"/>.
</para>
-<smbconfexample id="sbewinbindex">
+<example id="sbewinbindex">
<title>ADS Membership Using RFC2307bis Identity Resolution &smb.conf; File</title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">BUBBAH</smbconfoption>
<smbconfoption name="winbind use default domain">Yes</smbconfoption>
<smbconfoption name="winbind trusted domains only">Yes</smbconfoption>
<smbconfoption name="winbind nested groups">Yes</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
<para>
<indexterm><primary>nss_ldap</primary></indexterm>
in <link linkend="ch10-etcnsscfg"/>.
</para>
-<smbconfexample id="ch10-smbconf">
+<example id="ch10-smbconf">
<title>Samba Configuration &smbmdash; File: <filename>/etc/samba/smb.conf</filename></title>
+<smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">LONDON</smbconfoption>
<smbconfoption name="netbios name">W2K3S</smbconfoption>
<smbconfoption name="winbind enum users">yes</smbconfoption>
<smbconfoption name="winbind enum groups">yes</smbconfoption>
<smbconfoption name="winbind user default domain">yes</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
<example id="ch10-etcnsscfg">
<title>NSS Configuration File Extract &smbmdash; File: <filename>/etc/nsswitch.conf</filename></title>
configuration of the LDAP server.
</para>
-<smbconfexample id="sbehap-massive-smbconfa">
+<example id="sbehap-massive-smbconfa">
<title>LDAP Based &smb.conf; File, Server: MASSIVE &smbmdash; global Section: Part A</title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="unix charset">LOCALE</smbconfoption>
<smbconfoption name="set primary group script">/opt/IDEALX/sbin/</smbconfoption>
<member><parameter>smbldap-usermod -g "%g" "%u"</parameter></member>
<smbconfoption name="add machine script">/opt/IDEALX/sbin/smbldap-useradd -w "%u"</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
-<smbconfexample id="sbehap-massive-smbconfb">
+<example id="sbehap-massive-smbconfb">
<title>LDAP Based &smb.conf; File, Server: MASSIVE &smbmdash; global Section: Part B</title>
+<smbconfblock>
<smbconfoption name="logon script">scripts\logon.bat</smbconfoption>
<smbconfoption name="logon path">\\%L\profiles\%U</smbconfoption>
<smbconfoption name="logon drive">X:</smbconfoption>
<smbconfoption name="map acl inherit">Yes</smbconfoption>
<smbconfoption name="printing">cups</smbconfoption>
<smbconfoption name="printer admin">root, chrisr</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
</sect2>
</procedure>
-<smbconfexample id="sbehap-bldg1-smbconf">
+<example id="sbehap-bldg1-smbconf">
<title>LDAP Based &smb.conf; File, Server: BLDG1</title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="unix charset">LOCALE</smbconfoption>
<smbconfoption name="idmap gid">10000-20000</smbconfoption>
<smbconfoption name="printing">cups</smbconfoption>
<smbconfoption name="printer admin">root, chrisr</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
-<smbconfexample id="sbehap-bldg2-smbconf">
+<example id="sbehap-bldg2-smbconf">
<title>LDAP Based &smb.conf; File, Server: BLDG2</title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="unix charset">LOCALE</smbconfoption>
<smbconfoption name="idmap gid">10000-20000</smbconfoption>
<smbconfoption name="printing">cups</smbconfoption>
<smbconfoption name="printer admin">root, chrisr</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
-<smbconfexample id="sbehap-shareconfa">
+<example id="sbehap-shareconfa">
<title>LDAP Based &smb.conf; File, Shares Section &smbmdash; Part A</title>
+<smbconfblock>
<smbconfsection name="[accounts]"/>
<smbconfoption name="comment">Accounting Files</smbconfoption>
<smbconfoption name="path">/data/accounts</smbconfoption>
<smbconfoption name="guest ok">Yes</smbconfoption>
<smbconfoption name="printable">Yes</smbconfoption>
<smbconfoption name="browseable">No</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
-<smbconfexample id="sbehap-shareconfb">
+<example id="sbehap-shareconfb">
<title>LDAP Based &smb.conf; File, Shares Section &smbmdash; Part B</title>
+<smbconfblock>
<smbconfsection name="[apps]"/>
<smbconfoption name="comment">Application Files</smbconfoption>
<smbconfoption name="path">/apps</smbconfoption>
<smbconfoption name="guest ok">no</smbconfoption>
<smbconfoption name="read only">yes</smbconfoption>
<smbconfoption name="write list">root, chrisr</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
<example id="sbehap-ldifadd">
<title>LDIF IDMAP Add-On Load File &smbmdash; File: /etc/openldap/idmap.LDIF</title>
no account information can be deleted.
</para></step>
-<smbconfexample id="sbent4smb">
+<example id="sbent4smb">
<title>NT4 Migration Samba-3 Server <filename>smb.conf</filename> &smbmdash; Part: A</title>
+<smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">DAMNATION</smbconfoption>
<smbconfoption name="netbios name">MERLIN</smbconfoption>
<smbconfoption name="winbind nested groups">Yes</smbconfoption>
<smbconfoption name="ea support">Yes</smbconfoption>
<smbconfoption name="map acl inherit">Yes</smbconfoption>
-</smbconfexample>
+ </smbconfblock>
+</example>
-<smbconfexample id="sbent4smb2">
+<example id="sbent4smb2">
<title>NT4 Migration Samba-3 Server <filename>smb.conf</filename> &smbmdash; Part: B</title>
+<smbconfblock>
<smbconfsection name="[apps]"/>
<smbconfoption name="comment">Application Data</smbconfoption>
<smbconfoption name="path">/data/home/apps</smbconfoption>
<smbconfsection name="[print$]"/>
<smbconfoption name="comment">Printer Drivers</smbconfoption>
<smbconfoption name="path">/var/lib/samba/drivers</smbconfoption>
-</smbconfexample>
+ </smbconfblock>
+</example>
<step><para>
<indexterm><primary>slapd.conf</primary></indexterm>
The Samba &smb.conf; file was configured as shown in <link linkend="ch8smbconf"/>.
</para>
-<smbconfexample id="ch8smbconf">
+<example id="ch8smbconf">
<title>Samba Configuration File &smbmdash; smb.conf Part A</title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">MEGANET2</smbconfoption>
<smbconfoption name="admin users">root, "@Domain Admins"</smbconfoption>
<smbconfoption name="printer admin">"@Domain Admins"</smbconfoption>
<smbconfoption name="force printername">Yes</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
-<smbconfexample id="ch8smbconf2">
+<example id="ch8smbconf2">
<title>Samba Configuration File &smbmdash; smb.conf Part B</title>
+<smbconfblock>
<smbconfsection name="[netlogon]"/>
<smbconfoption name="comment">Network logon service</smbconfoption>
<smbconfoption name="path">/data/samba/netlogon</smbconfoption>
<smbconfoption name="comment">Location of documents printed to PDFCreator printer</smbconfoption>
<smbconfoption name="path">/data/samba/shares/pdf</smbconfoption>
<smbconfoption name="guest ok">Yes</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
-<smbconfexample id="ch8smbconf3">
+<example id="ch8smbconf3">
<title>Samba Configuration File &smbmdash; smb.conf Part C</title>
+<smbconfblock>
<smbconfsection name="[EVERYTHING]"/>
<smbconfoption name="comment">All shares</smbconfoption>
<smbconfoption name="path">/data/samba</smbconfoption>
<smbconfoption name="printable">Yes</smbconfoption>
<smbconfoption name="use client driver">Yes</smbconfoption>
<smbconfoption name="copy">printers</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
-<smbconfexample id="ch8smbconf4">
+<example id="ch8smbconf4">
<title>Samba Configuration File &smbmdash; smb.conf Part D</title>
+<smbconfblock>
<smbconfsection name="[APPS]"/>
<smbconfoption name="path">/data/samba/shares/Apps</smbconfoption>
<smbconfoption name="force group">"Domain Users"</smbconfoption>
<smbconfoption name="read only">No</smbconfoption>
<smbconfoption name="create mask">0770</smbconfoption>
<smbconfoption name="copy">engr</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
-<smbconfexample id="ch8smbconf5">
+<example id="ch8smbconf5">
<title>Samba Configuration File &smbmdash; smb.conf Part E</title>
+<smbconfblock>
<smbconfsection name="[X]"/>
<smbconfoption name="path">/data/samba/shares/X</smbconfoption>
<smbconfoption name="valid users">@engr, @acct</smbconfoption>
<smbconfoption name="valid users">chad</smbconfoption>
<smbconfoption name="read only">No</smbconfoption>
<smbconfoption name="browseable">No</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
<para>
<indexterm><primary>Qbasic</primary></indexterm>
and <link linkend="promisnetsvcb"/>. Concatenate (join) all three files to make a single &smb.conf;
file. The final, fully qualified path for this file should be <filename>/etc/samba/smb.conf</filename>.
-<smbconfexample id="promisnet">
+<example id="promisnet">
<title>130 User Network with <emphasis>tdbsam</emphasis> &smbmdash; [globals] Section</title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">PROMISES</smbconfoption>
<smbconfoption name="cups options">Raw</smbconfoption>
<smbconfoption name="veto files">/*.eml/*.nws/*.{*}/</smbconfoption>
<smbconfoption name="veto oplock files">/*.doc/*.xls/*.mdb/</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
-<smbconfexample id="promisnetsvca">
+<example id="promisnetsvca">
<title>130 User Network with <emphasis>tdbsam</emphasis> &smbmdash; Services Section Part A</title>
+<smbconfblock>
<smbconfsection name="[homes]"/>
<smbconfoption name="comment">Home Directories</smbconfoption>
<smbconfoption name="valid users">%S</smbconfoption>
<smbconfoption name="comment">Accounting Files</smbconfoption>
<smbconfoption name="path">/data/accounts</smbconfoption>
<smbconfoption name="read only">No</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
-<smbconfexample id="promisnetsvcb">
+<example id="promisnetsvcb">
<title>130 User Network with <emphasis>tdbsam</emphasis> &smbmdash; Services Section Part B</title>
+<smbconfblock>
<smbconfsection name="[service]"/>
<smbconfoption name="comment">Financial Services Files</smbconfoption>
<smbconfoption name="path">/data/service</smbconfoption>
<smbconfoption name="path">/apps</smbconfoption>
<smbconfoption name="read only">Yes</smbconfoption>
<smbconfoption name="admin users">bjordan</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
</para></step>
<step><para>
Install the &smb.conf; file shown in <link linkend="draft-smbconf"/> in the
<filename>/etc/samba</filename> directory.
-<smbconfexample id="draft-smbconf">
+<example id="draft-smbconf">
<title>Drafting Office &smb.conf; File</title>
+<smbconfblock>
<smbconfcomment>Global Parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">MIDEARTH</smbconfoption>
<smbconfoption name="path">/plans</smbconfoption>
<smbconfoption name="read only">Yes</smbconfoption>
<smbconfoption name="guest ok">Yes</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
</para></step>
<step><para>
</procedure>
-<smbconfexample id="charity-smbconfnew">
+<example id="charity-smbconfnew">
<title>Charity Administration Office &smb.conf; New-style File</title>
+<smbconfblock>
<smbconfcomment>Global Parameters - Newer Configuration</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">MIDEARTH</smbconfoption>
<smbconfoption name="guest ok">Yes</smbconfoption>
<smbconfoption name="use client driver">Yes</smbconfoption>
<smbconfoption name="browseable">No</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
-<smbconfexample id="charity-smbconf">
+<example id="charity-smbconf">
<title>Charity Administration Office &smb.conf; Old-style File</title>
+<smbconfblock>
<smbconfcomment>Global Parameters - Older Style Configuration</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">MIDEARTH</smbconfoption>
<smbconfoption name="guest ok">Yes</smbconfoption>
<smbconfoption name="use client driver">Yes</smbconfoption>
<smbconfoption name="browseable">No</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
<procedure>
<title>Windows Client Configuration</title>
</procedure>
-<smbconfexample id="acctconf">
+<example id="acctconf">
<title>Accounting Office Network &smb.conf; Old Style Configuration File</title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">BILLMORE</smbconfoption>
<smbconfoption name="guest ok">Yes</smbconfoption>
<smbconfoption name="use client driver">Yes</smbconfoption>
<smbconfoption name="browseable">No</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
</sect3>
</sect2>
</procedure>
-<smbconfexample id="acct2conf">
+<example id="acct2conf">
<title>Accounting Office Network &smb.conf; File &smbmdash; [globals] Section</title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">BILLMORE</smbconfoption>
<smbconfoption name="preferred master">Yes</smbconfoption>
<smbconfoption name="wins support">Yes</smbconfoption>
<smbconfoption name="printing">CUPS</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
-<smbconfexample id="acct3conf">
+<example id="acct3conf">
<title>Accounting Office Network &smb.conf; File &smbmdash; Services and Shares Section</title>
+<smbconfblock>
<smbconfsection name="[homes]"/>
<smbconfoption name="comment">Home Directories</smbconfoption>
<smbconfoption name="valid users">%S</smbconfoption>
<smbconfoption name="path">/data/finsvcs</smbconfoption>
<smbconfoption name="valid users">%G</smbconfoption>
<smbconfoption name="read only">No</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
<sect2>
<title>Validation</title>
Refer to <link linkend="minimalPDC">following configuration</link> for an example of the minimum required settings.
</para>
-<para><smbconfexample id="minimalPDC">
+<example id="minimalPDC">
<title>Minimal smb.conf for a PDC in Use With a BDC &smbmdash; LDAP Server on PDC.</title>
+<smbconfblock>
<smbconfoption name="workgroup">&example.workgroup;</smbconfoption>
<smbconfoption name="passdb backend">ldapsam://localhost:389</smbconfoption>
<smbconfoption name="domain master">yes</smbconfoption>
<smbconfoption name="domain logons">yes</smbconfoption>
-</smbconfexample></para>
+</smbconfblock>
+</example>
<para>
Several other things like a <smbconfsection name="[homes]"/> and a
the secondary LDAP server in the &smb.conf; file as shown in <link linkend="mulitldapcfg">following example</link>.
</para>
-<para>
-<smbconfexample id="mulitldapcfg">
+<example id="mulitldapcfg">
<title>Multiple LDAP Servers in &smb.conf;</title>
+<smbconfblock>
<member>...</member>
<smbconfoption name="passdb backend"> </smbconfoption>
<member><parameter>ldapsam:"ldap://master.quenya.org ldap://slave.quenya.org"</parameter></member>
<member>...</member>
-</smbconfexample>
-</para>
+</smbconfblock>
+</example>
</sect2>
done by setting Samba as shown in <link linkend="minim-bdc">the next example</link>.
</para>
-<para><smbconfexample id="minim-bdc">
+<example id="minim-bdc">
<title>Minimal setup for being a BDC</title>
+<smbconfblock>
<smbconfoption name="workgroup">&example.workgroup;</smbconfoption>
<smbconfoption name="passdb backend">ldapsam:ldap://slave-ldap.quenya.org</smbconfoption>
<smbconfoption name="domain master">no</smbconfoption>
<smbconfoption name="domain logons">yes</smbconfoption>
<smbconfoption name="idmap backend">ldap:ldap://slave-ldap.quenya.org</smbconfoption>
-</smbconfexample></para>
+</smbconfblock>
+</example>
<para>
In the <smbconfsection name="[global]"/>-section of the &smb.conf; of the BDC. This makes the BDC
To summarize, <link linkend="cups-exam-simple">following example</link> shows simplest printing-related setup for &smb.conf; to enable basic CUPS support:
</para>
- <para><smbconfexample id="cups-exam-simple">
+ <example id="cups-exam-simple">
<title>Simplest printing-related smb.conf</title>
+ <smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="load printers">yes</smbconfoption>
<smbconfoption name="printing">cups</smbconfoption>
<smbconfoption name="printable">yes</smbconfoption>
<smbconfoption name="printer admin">root, @ntadmins</smbconfoption>
- </smbconfexample></para>
+ </smbconfblock>
+ </example>
<para>
This is all you need for basic printing setup for CUPS. It will print
up differently.
</para>
- <para><smbconfexample id="overridesettings">
+ <example id="overridesettings">
<title>Overriding global CUPS settings for one printer</title>
+ <smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="printing">cups</smbconfoption>
<smbconfoption name="printcap name">cups</smbconfoption>
<smbconfoption name="printer admin">kurt</smbconfoption>
<smbconfoption name="hosts deny">0.0.0.0</smbconfoption>
<smbconfoption name="hosts allow">turbo_xp, 10.160.50.23, 10.160.51.60</smbconfoption>
- </smbconfexample></para>
+ </smbconfblock>
+ </example>
<para>
This special share is only there for testing purposes. It does not write the print job to a file. It just logs the job parameters
&smb.conf; as shown in <link linkend="cupsadd-ex">the next example</link>:
</para>
-<para><smbconfexample id="cupsadd-ex">
+<example id="cupsadd-ex">
<title>smb.conf for cupsaddsmb usage</title>
+<smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="load printers">yes</smbconfoption>
<smbconfoption name="printing">cups</smbconfoption>
<smbconfoption name="guest ok">no</smbconfoption>
<smbconfoption name="read only">yes</smbconfoption>
<smbconfoption name="write list">root</smbconfoption>
-</smbconfexample></para>
+</smbconfblock>
+</example>
</sect2>
<sect2>
lines shown in <link linkend="tmpshare">the next example</link>.
</para>
-<para><smbconfexample id="tmpshare">
-<title>smb.conf with [tmp] share</title>
+<example id="tmpshare">
+ <title>smb.conf with [tmp] share</title>
+ <smbconfblock>
<smbconfsection name="[tmp]"/>
<smbconfoption name="comment">temporary files </smbconfoption>
<smbconfoption name="path">/tmp</smbconfoption>
<smbconfoption name="read only">yes</smbconfoption>
-</smbconfexample>
-</para>
+</smbconfblock>
+</example>
<note><para>
These tests assume version 3.0.0 or later of the Samba suite.
</para>
-<para>
-<smbconfexample id="modif1">
+<example id="modif1">
<title>Configuration for only allowing connections from a certain subnet</title>
+ <smbconfblock>
<smbconfsection name="[globals]"/>
-<member>...</member>
<smbconfoption name="hosts deny">ALL</smbconfoption>
<smbconfoption name="hosts allow">xxx.xxx.xxx.xxx/yy</smbconfoption>
<smbconfoption name="interfaces">eth0</smbconfoption>
<smbconfoption name="bind interfaces only">Yes</smbconfoption>
-<member>...</member>
-</smbconfexample>
-</para>
+</smbconfblock>
+</example>
<para>
In the above, no allowance has been made for any session requests that
To solve this problem, change these lines as shown in <link linkend="modif2">the following example</link>.
</para>
-<para>
-<smbconfexample id="modif2">
+<example id="modif2">
<title>Configuration for allowing connections from a certain subnet and localhost</title>
+ <smbconfblock>
<smbconfsection name="[globals]"/>
-<member>...</member>
<smbconfoption name="hosts deny">ALL</smbconfoption>
<smbconfoption name="hosts allow">xxx.xxx.xxx.xxx/yy 127.</smbconfoption>
<smbconfoption name="interfaces">eth0 lo</smbconfoption>
-<member>...</member>
-</smbconfexample>
-</para>
+</smbconfblock>
+</example>
<para>
<indexterm><primary>inetd</primary></indexterm>
<para>The configuration file is:</para>
- <para><smbconfexample id="anon-example">
+ <example id="anon-example">
<title>Anonymous Read-Only Server Configuration</title>
+ <smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">MIDEARTH</smbconfoption>
<smbconfoption name="path">/export</smbconfoption>
<smbconfoption name="read only">Yes</smbconfoption>
<smbconfoption name="guest ok">Yes</smbconfoption>
- </smbconfexample>
- </para>
+ </smbconfblock>
+ </example>
<itemizedlist>
<listitem><para>
The complete, modified &smb.conf; file is as shown in <link linkend="anon-rw"/>.
</para>
- <para>
-<smbconfexample id="anon-rw"><title>Modified Anonymous Read-Write smb.conf</title>
+<example id="anon-rw"><title>Modified Anonymous Read-Write smb.conf</title>
+ <smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">MIDEARTH</smbconfoption>
<smbconfoption name="force group">users</smbconfoption>
<smbconfoption name="read only">No</smbconfoption>
<smbconfoption name="guest ok">Yes</smbconfoption>
-</smbconfexample>
- </para>
+</smbconfblock>
+</example>
</sect3>
configuration. <link linkend="anon-print"></link> is the resulting &smb.conf; file.
</para>
- <para>
-<smbconfexample id="anon-print"><title>Anonymous Print Server smb.conf</title>
+<example id="anon-print"><title>Anonymous Print Server smb.conf</title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">MIDEARTH</smbconfoption>
<smbconfoption name="printable">Yes</smbconfoption>
<smbconfoption name="use client driver">Yes</smbconfoption>
<smbconfoption name="browseable">No</smbconfoption>
-</smbconfexample>
- </para>
+</smbconfblock>
+</example>
<para>
The above configuration is not ideal. It uses no smart features, and it deliberately
<step><para>
Configure the Samba &smb.conf; file as shown in <link linkend="OfficeServer"/>.
-<smbconfexample id="OfficeServer">
-<title>Secure Office Server smb.conf</title>
+ </para>
+<example id="OfficeServer">
+ <title>Secure Office Server smb.conf</title>
+ <smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">MIDEARTH</smbconfoption>
<smbconfoption name="printable">Yes</smbconfoption>
<smbconfoption name="use client driver">Yes</smbconfoption>
<smbconfoption name="browseable">No</smbconfoption>
- </smbconfexample>
- </para></step>
+ </smbconfblock>
+ </example></step>
<step><para>
Initialize the Microsoft Windows password database with the new users:
and <link linkend="fast-memberserver-shares"></link>.
</para>
- <para>
- <smbconfexample id="fast-member-server">
+ <example id="fast-member-server">
<title>Member server smb.conf (globals)</title>
+ <smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">MIDEARTH</smbconfoption>
<smbconfoption name="idmap gid">15000-20000</smbconfoption>
<smbconfoption name="winbind use default domain">Yes</smbconfoption>
<smbconfoption name="printing">cups</smbconfoption>
- </smbconfexample></para>
+ </smbconfblock></example>
- <para>
- <smbconfexample id="fast-memberserver-shares">
+ <example id="fast-memberserver-shares">
<title>Member server smb.conf (shares and services)</title>
+ <smbconfblock>
<smbconfsection name="[homes]"/>
<smbconfoption name="comment">Home Directories</smbconfoption>
<smbconfoption name="valid users">%S</smbconfoption>
<smbconfoption name="printable">Yes</smbconfoption>
<smbconfoption name="use client driver">Yes</smbconfoption>
<smbconfoption name="browseable">No</smbconfoption>
- </smbconfexample>
- </para></step>
+ </smbconfblock>
+ </example></step>
<step><para>
<para>
<indexterm><primary>pdbedit</primary></indexterm>
- <smbconfexample id="fast-engoffice-global">
+ <example id="fast-engoffice-global">
<title>Engineering Office smb.conf (globals)</title>
+ <smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">MIDEARTH</smbconfoption>
<smbconfoption name="netbios name">FRODO</smbconfoption>
<smbconfoption name="idmap uid">15000-20000</smbconfoption>
<smbconfoption name="idmap gid">15000-20000</smbconfoption>
<smbconfoption name="printing">cups</smbconfoption>
- </smbconfexample>
+ </smbconfblock>
+ </example>
+ </para>
- <smbconfexample id="fast-engoffice-shares">
+ <example id="fast-engoffice-shares">
<title>Engineering Office smb.conf (shares and services)</title>
+ <smbconfblock>
<smbconfsection name="[homes]"/>
<smbconfoption name="comment">Home Directories</smbconfoption>
<smbconfoption name="valid users">%S</smbconfoption>
<smbconfoption name="profile acls">Yes</smbconfoption>
<smbconfcomment>Other resource (share/printer) definitions would follow below.</smbconfcomment>
- </smbconfexample>
- </para></step>
+ </smbconfblock>
+ </example></step>
<step><para>
Create UNIX group accounts as needed using a suitable operating system tool:
The &smb.conf; file that drives this backend can be found in example <link linkend="fast-ldap"/>.
</para>
- <para>
-<smbconfexample id="fast-ldap">
+<example id="fast-ldap">
<title>LDAP backend smb.conf for PDC</title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">MIDEARTH</smbconfoption>
<smbconfoption name="idmap uid">15000-20000</smbconfoption>
<smbconfoption name="idmap gid">15000-20000</smbconfoption>
<smbconfoption name="printing">cups</smbconfoption>
-</smbconfexample>
- </para></step>
+</smbconfblock>
+ </example></step>
<step><para>
Add the LDAP password to the <filename>secrets.tdb</filename> file so Samba can update
Decide if the BDC should have its own LDAP server or not. If the BDC is to be
the LDAP server change the following &smb.conf; as indicated. The default
configuration in <link linkend="fast-bdc"/> uses a central LDAP server.
-<smbconfexample id="fast-bdc">
+ </para>
+<example id="fast-bdc">
<title>Remote LDAP BDC smb.conf</title>
+<smbconfblock>
<smbconfcomment>Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">MIDEARTH</smbconfoption>
<smbconfoption name="idmap uid">15000-20000</smbconfoption>
<smbconfoption name="idmap gid">15000-20000</smbconfoption>
<smbconfoption name="printing">cups</smbconfoption>
-</smbconfexample>
- </para></step>
+</smbconfblock>
+ </example></step>
<step><para>
Configure the NETLOGON and PROFILES directory as for the PDC in <link linkend="fast-bdc"/>.
<para>
The &smb.conf; entry for the above script would be something like that in <link linkend="smbgrpadd">the following example</link>.
-<smbconfexample id="smbgrpadd" fragment="1">
+<example id="smbgrpadd">
<title>Configuration of &smb.conf; for the add group script.</title>
+<smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="add group script">/path_to_tool/smbgrpadd.sh "%g"</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
</para>
</sect2>
<indexterm><primary>minimal configuration</primary></indexterm>
</para>
- <smbconfexample id="smbconfminimal">
+ <example id="smbconfminimal">
<title>A minimal smb.conf</title>
+ <smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">WKG</smbconfoption>
<smbconfsection name="[share2]"/>
<smbconfoption name="path">/my_shared_folder</smbconfoption>
<smbconfoption name="comment">Some random files</smbconfoption>
- </smbconfexample>
+ </smbconfblock>
+ </example>
</sect2>
<para>
<indexterm><primary>simple configuration</primary></indexterm>
- <smbconfexample id="simple-example">
+ <example id="simple-example">
<title>Another simple smb.conf File</title>
+ <smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">&example.workgroup;</smbconfoption>
<smbconfsection name="[homes]"/>
<smbconfoption name="guest ok">no</smbconfoption>
<smbconfoption name="read only">no</smbconfoption>
- </smbconfexample>
+ </smbconfblock>
+</example>
</para>
<para>
file as shown in <link linkend="dmbexample">the following example</link>:
</para>
-<para>
-<smbconfexample id="dmbexample">
+<example id="dmbexample">
<title>Domain Master Browser smb.conf</title>
+<smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="domain master">yes</smbconfoption>
<smbconfoption name="local master">yes</smbconfoption>
<smbconfoption name="preferred master">yes</smbconfoption>
<smbconfoption name="os level">65</smbconfoption>
-</smbconfexample>
-</para>
+</smbconfblock>
+</example>
<para>
The Domain Master Browser may be the same machine as the WINS server, if necessary.
shown in <link linkend="lmbexample">following example</link>:
</para>
-<para>
-<smbconfexample id="lmbexample">
+<example id="lmbexample">
<title>Local master browser smb.conf</title>
+<smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="domain master">no</smbconfoption>
<smbconfoption name="local master">yes</smbconfoption>
<smbconfoption name="preferred master">yes</smbconfoption>
<smbconfoption name="os level">65</smbconfoption>
-</smbconfexample>
-</para>
+</smbconfblock>
+</example>
<para>
Do not do this for more than one Samba server on each subnet, or they will war with
&smb.conf; file as shown in <link linkend="nombexample">following example</link>:
</para>
-<para>
-<smbconfexample id="nombexample">
+<example id="nombexample">
<title>smb.conf for not being a Master Browser</title>
+<smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="domain master">no</smbconfoption>
<smbconfoption name="local master">no</smbconfoption>
<smbconfoption name="preferred master">no</smbconfoption>
<smbconfoption name="os level">0</smbconfoption>
-</smbconfexample>
-</para>
+</smbconfblock>
+</example>
</sect2>
of the &smb.conf; file as shown in <link linkend="remsmb">following example</link>:
</para>
-<para>
-<smbconfexample id="remsmb">
+<example id="remsmb">
<title>Local Master Browser smb.conf</title>
+<smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="domain master">no</smbconfoption>
<smbconfoption name="local master">yes</smbconfoption>
<smbconfoption name="preferred master">yes</smbconfoption>
<smbconfoption name="os level">65</smbconfoption>
-</smbconfexample>
-</para>
+</smbconfblock>
+</example>
<para>
If you wish to have a Samba server fight the election with machines on the same subnet you
<smbconfsection name="[global]"/> section of the &smb.conf; file as shown in <link linkend="xremmb">next example</link>:
</para>
-<para>
-<smbconfexample id="xremmb">
+<example id="xremmb">
<title>&smb.conf; for not being a master browser</title>
+<smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="domain master">no</smbconfoption>
<smbconfoption name="local master">no</smbconfoption>
<smbconfoption name="preferred master">no</smbconfoption>
<smbconfoption name="os level">0</smbconfoption>
-</smbconfexample>
-</para>
+</smbconfblock>
+</example>
</sect2>
<link linkend="minimalprofile">Following example</link> provides a minimal profile share.
</para>
-<para><smbconfexample id="minimalprofile">
+<example id="minimalprofile">
<title>Minimal profile share</title>
+<smbconfblock>
<smbconfsection name="[profile]"/>
<smbconfoption name="path">/export/profile</smbconfoption>
<smbconfoption name="create mask">0600</smbconfoption>
<smbconfoption name="directory mask">0700</smbconfoption>
<smbconfoption name="nt acl support">no</smbconfoption>
<smbconfoption name="read only">no</smbconfoption>
-</smbconfexample></para>
+</smbconfblock>
+</example>
<para>
The reason for this bug is that the Windows 200x SP2 client copies
in &smb.conf;. An example &smb.conf; for acting as a PDC can be found in <link linkend="pdc-example">the next example</link>.
</para>
-<para>
-<smbconfexample id="pdc-example">
+<example id="pdc-example">
<title>smb.conf for being a PDC</title>
+<smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="netbios name"><replaceable>BELERIAND</replaceable></smbconfoption>
<smbconfoption name="workgroup"><replaceable>&example.workgroup;</replaceable></smbconfoption>
<smbconfoption name="read only">no</smbconfoption>
<smbconfoption name="create mask">0600</smbconfoption>
<smbconfoption name="directory mask">0700</smbconfoption>
-</smbconfexample>
-</para>
+</smbconfblock>
+</example>
<para>
The basic options shown in <link linkend="pdc-example">this example</link> are explained as follows:
<sect3>
<title>Example Configuration</title>
-<smbconfexample id="PDC-config">
+<example id="PDC-config">
<title>smb.conf for being a PDC</title>
+<smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="domain logons">Yes</smbconfoption>
<smbconfoption name="domain master">(Yes on PDC, No on BDCs)</smbconfoption>
<smbconfoption name="path">/var/lib/samba/netlogon</smbconfoption>
<smbconfoption name="guest ok">Yes</smbconfoption>
<smbconfoption name="browseable">No</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
</sect3>
<sect3>
<para>
<indexterm><primary>SAM backend</primary><secondary>ldapsam</secondary></indexterm>
-<smbconfexample id="idmapbackendexample">
+<example id="idmapbackendexample">
<title>Example configuration with the LDAP idmap backend</title>
+<smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="idmap backend">ldap:ldap://ldap-server.quenya.org:636</smbconfoption>
<smbconfcomment>Alternately, this could be specified as:</smbconfcomment>
<smbconfoption name="idmap backend">ldap:ldaps://ldap-server.quenya.org</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
</para>
<para>
use with an LDAP directory could appear as shown below.
</para>
-<para>
-<smbconfexample id="confldapex">
+<example id="confldapex">
<title>Configuration with LDAP</title>
+<smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="security">user</smbconfoption>
<smbconfoption name="encrypt passwords">yes</smbconfoption>
<smbconfcomment> generally the default ldap search filter is ok</smbconfcomment>
<smbconfoption name="ldap filter">(uid=%u)</smbconfoption>
-</smbconfexample>
-</para>
+</smbconfblock>
+</example>
</sect3>
<para><link linkend="mysqlsam">An example configuration</link> looks like:
</para>
- <smbconfexample id="mysqlsam">
+ <example id="mysqlsam">
<title>Example configuration for the MySQL passdb backend</title>
+ <smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="passdb backend">mysql:foo</smbconfoption>
<smbconfoption name="foo:mysql user">samba</smbconfoption>
<smbconfoption name="foo:nt pass column">nt_pass:</smbconfoption>
<smbconfcomment>The unknown 3 column is not stored</smbconfcomment>
<smbconfoption name="foo:unknown 3 column">NULL</smbconfoption>
- </smbconfexample>
+ </smbconfblock>
+ </example>
</sect3>
<sect3>
&smb.conf; file that enables all clients to print.
</para>
-<para>
-<smbconfexample id="simpleprc">
+<example id="simpleprc">
<title>Simple configuration with BSD printing</title>
+<smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="printing">bsd</smbconfoption>
<smbconfoption name="load printers">yes</smbconfoption>
<smbconfoption name="printable">yes</smbconfoption>
<smbconfoption name="public">yes</smbconfoption>
<smbconfoption name="writable">no</smbconfoption>
-</smbconfexample></para>
+</smbconfblock>
+</example>
<para>
This is only an example configuration. Samba assigns default values to
file to remove all parameters that are set at default.
</para>
-<para><smbconfexample id="extbsdpr">
+<example id="extbsdpr">
<title>Extended BSD Printing Configuration</title>
+ <smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="printing">bsd</smbconfoption>
<smbconfoption name="load printers">yes</smbconfoption>
<smbconfoption name="hosts allow">0.0.0.0</smbconfoption>
<smbconfoption name="hosts deny">turbo_xp, 10.160.50.23, 10.160.51.60</smbconfoption>
<smbconfoption name="guest ok">no</smbconfoption>
-</smbconfexample></para>
+</smbconfblock></example>
<para>
This is an example configuration. You may not find all the settings that are in
site). See <link linkend="prtdollar">next example</link>.
</para>
-<para>
-<smbconfexample id="prtdollar">
+<example id="prtdollar">
<title>[print\$] example</title>
+<smbconfblock>
<smbconfsection name="[global]"/>
<smbconfcomment>members of the ntadmin group should be able to add drivers and set</smbconfcomment>
<smbconfcomment>printer properties. root is implicitly always a 'printer admin'.</smbconfcomment>
<smbconfoption name="guest ok">yes</smbconfoption>
<smbconfoption name="read only">yes</smbconfoption>
<smbconfoption name="write list">@ntadmin, root</smbconfoption>
-</smbconfexample>
-</para>
+</smbconfblock>
+</example>
<para>
Of course, you also need to ensure that the directory named by the
UNIX system database. This is a simple system to administer.
</para>
-<smbconfexample id="simplynice">
+<example id="simplynice">
<title>smb.conf for Reference Documentation Server</title>
+<smbconfblock>
<smbconfcomment> Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">&example.workgroup;</smbconfoption>
<smbconfoption name="comment">Data</smbconfoption>
<smbconfoption name="path">/export</smbconfoption>
<smbconfoption name="guest only">Yes</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
<para>
In <link linkend="simplynice">the example</link> above, the machine name is set to &example.server.samba;, the workgroup is set to the name
The contents of the &smb.conf; file is shown in <link linkend="AnonPtrSvr">the next example</link>.
</para>
-<para>
-<smbconfexample id="AnonPtrSvr">
+<example id="AnonPtrSvr">
<title>&smb.conf; for Anonymous Printing</title>
+<smbconfblock>
<smbconfcomment> Global parameters</smbconfcomment>
<smbconfsection name="[global]"/>
<smbconfoption name="workgroup">&example.workgroup;</smbconfoption>
<smbconfoption name="printable">Yes</smbconfoption>
<smbconfoption name="use client driver">Yes</smbconfoption>
<smbconfoption name="browseable">No</smbconfoption>
-</smbconfexample>
-</para>
+</smbconfblock>
+</example>
<note><para>
as follows:
</para>
-<smbconfexample><title>VFS CAP</title>
+<example><title>VFS CAP</title>
+ <smbconfblock>
<smbconfsection name="[global]"/>
<smbconfcomment>the locale name "CP932" may be different</smbconfcomment>
<smbconfoption name="dos charset">CP932</smbconfoption>
<smbconfsection name="[cap-share]"/>
<smbconfoption name="vfs option">cap</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
<para>
You should set CP932 if using GNU libiconv for unix charset. Setting this,
you can list one or more VFS modules by name. For example, to log all access
to files and put deleted files in a recycle bin, see <link linkend="vfsrecyc">next configuration</link>:
-<smbconfexample id="vfsrecyc">
+<example id="vfsrecyc">
<title>smb.conf with VFS modules</title>
+ <smbconfblock>
<smbconfsection name="[audit]"/>
<smbconfoption name="comment">Audited /data directory</smbconfoption>
<smbconfoption name="path">/data</smbconfoption>
<smbconfoption name="vfs objects">audit recycle</smbconfoption>
<smbconfoption name="writeable">yes</smbconfoption>
<smbconfoption name="browseable">yes</smbconfoption>
- </smbconfexample>
+ </smbconfblock>
+</example>
</para>
<para>
Some modules can be used twice for the same share.
This can be done using a configuration similar to the one shown in <link linkend="multimodule">the following example</link>.
-<smbconfexample id="multimodule">
+<example id="multimodule">
<title>smb.conf with multiple VFS modules</title>
+ <smbconfblock>
<smbconfsection name="[test]"/>
<smbconfoption name="comment">VFS TEST</smbconfoption>
<smbconfoption name="path">/data</smbconfoption>
<smbconfoption name="example1: parameter">1</smbconfoption>
<smbconfoption name="example: parameter">5</smbconfoption>
<smbconfoption name="test: parameter">7</smbconfoption>
-</smbconfexample>
+</smbconfblock>
+</example>
</para>
</sect1>
standard. Here is our example of a share configured
with the shadow_copy VFS module:</para>
</formalpara>
- <para>
- <smbconfexample id="vfsshadow">
+ <example id="vfsshadow">
<title>Share With shadow_copy VFS</title>
+ <smbconfblock>
<smbconfsection name="[shadow_share]"/>
<smbconfoption name="comment">Shadow Copy Enabled Share</smbconfoption>
<smbconfoption name="path">/data/shadow_share</smbconfoption>
<smbconfoption name="vfs objects">shadow_copy</smbconfoption>
<smbconfoption name="writeable">yes</smbconfoption>
<smbconfoption name="browseable">yes</smbconfoption>
- </smbconfexample>
- </para>
+ </smbconfblock>
+ </example>
</listitem>
<listitem>
<formalpara>
linkend="winbindcfg">the next example</link>, was modified to include the necessary entries in the [global] section.
</para>
-<para>
-<smbconfexample id="winbindcfg" fragment="1">
+<example id="winbindcfg" fragment="1">
<title>smb.conf for Winbind set-up</title>
+ <smbconfblock>
<smbconfsection name="[global]"/>
<smbconfcomment> separate domain and username with '\', like DOMAIN\username</smbconfcomment>
<smbconfoption name="winbind separator">\</smbconfoption>
<smbconfcomment> give winbind users a real shell (only needed if they have telnet access)</smbconfcomment>
<smbconfoption name="template homedir">/home/winnt/%D/%U</smbconfoption>
<smbconfoption name="template shell">/bin/bash</smbconfoption>
-</smbconfexample></para>
+</smbconfblock>
+</example>
</sect3>
Click the <guibutton>WINS</guibutton> tab to add manual WINS server entries.
This step demonstrates an example system that uses manually configured WINS settings.
When finished making changes, click on <guibutton>OK</guibutton> to commit the settings.
- See <link linkend="w2kp005"></link>.
+ See <link linkend="w2kp005"/>.
<figure id="w2kp005"><title>WINS Configuration.</title><imagefile>w2kp005</imagefile></figure>
</para></step>
<procedure>
<step><para>
In the box labeled <guimenuitem>The following network components are installed:</guimenuitem>,
- click on <guimenu>Internet Protocol TCP/IP</guimenu>, now click on the <guibutton>Properties</guibutton> button. See <link linkend="WME001"></link>.
+ click on <guimenu>Internet Protocol TCP/IP</guimenu>, now click on the <guibutton>Properties</guibutton> button. See <link linkend="WME001"/>.
<figure id="WME001"><title>The Windows Me Network Configuration Panel.</title><imagefile>WME001</imagefile></figure>
</para></step>
<step><para>
Many network administrators will want to use DHCP to configure all client TCP/IP
protocol stack settings. (For information on how to configure the ISC DHCP server
- for Microsoft Windows client support see, <link linkend="DHCP"></link>.
+ for Microsoft Windows client support see, <link linkend="DHCP"/>.
The default setting on Microsoft Windows Me workstations is for DHCP enabled operation,
- i.e., <guimenu>Obtain IP address automatically</guimenu> is enabled. See <link linkend="WME002"></link>.
+ i.e., <guimenu>Obtain IP address automatically</guimenu> is enabled. See <link linkend="WME002"/>.
<figure id="WME002"><title>IP Address.</title><imagefile>WME002</imagefile></figure>
</para>
</para></step>
<step><para>
- The following example uses manually configured WINS settings. See <link linkend="WME005"></link>.
+ The following example uses manually configured WINS settings. See <link linkend="WME005"/>.
When finished making changes, click on <guibutton>OK</guibutton> to commit the settings.
<figure id="WME005"><title>DNS Configuration.</title><imagefile>WME005</imagefile></figure>
</para>
&smb.conf; file as shown in <link linkend="far1"/>.
</para>
-<para>
-<smbconfexample id="far1">
+<example id="far1">
<title>Share with some files oplocked</title>
+<smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="veto oplock files">/filename.htm/*.txt/</smbconfoption>
<smbconfsection name="[share_name]"/>
<smbconfoption name="veto oplock files">/*.exe/filename.ext/</smbconfoption>
-</smbconfexample>
-</para>
+</smbconfblock>
+</example>
<para>
<smbconfoption name="oplock break wait time"/> is an &smb.conf; parameter
the entire server, in the &smb.conf; file as shown in <link linkend="far3"/>.
</para>
-<para>
-<smbconfexample id="far3">
+<example id="far3">
<title>Configuration with oplock break contention limit</title>
+ <smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="oplock break contention limit"> 2 (default)</smbconfoption>
<smbconfsection name="[share_name]"/>
<smbconfoption name="oplock break contention limit"> 2 (default)</smbconfoption>
-</smbconfexample>
-</para>
+</smbconfblock>
+</example>
</sect3>
</sect2>
</screen>
</para>
-<para>
-<smbconfexample id="dfscfg">
+<example id="dfscfg">
<title>smb.conf with DFS configured</title>
+<smbconfblock>
<smbconfsection name="[global]"/>
<smbconfoption name="netbios name">&example.server.samba;</smbconfoption>
<smbconfoption name="host msdfs ">yes</smbconfoption>
<smbconfsection name="[dfs]"/>
<smbconfoption name="path">/export/dfsroot</smbconfoption>
<smbconfoption name="msdfs root">yes</smbconfoption>
-</smbconfexample>
-</para>
+</smbconfblock>
+</example>
<para>You should set up the permissions and ownership of
the directory acting as the DFS root so that only designated
[ --with-papersize Specify papersize (a4paper,letter) ],
[ test "$withval" && PAPERSIZE="$withval" ])
-FONTSIZE="10.5"
-
-AC_ARG_WITH(fontsize,
-[ --with-fontsize Specify the fontsize in points (default: 10.5) ],
-[ test "$withval" && FONTSIZE="$withval" ])
-
AC_ARG_ENABLE(printable,
[ --enable-printable Printable output (expand ulinks, etc)],
[ if test "$enableval"; then
AC_SUBST(PAPERSIZE)
AC_SUBST(ULINK_IN_FOOTNOTE)
AC_SUBST(ULINK_SHOW)
-AC_SUBST(FONTSIZE)
AC_SUBST(DOCROP)
AC_SUBST(SAMBASOURCEDIR)
The user has write access to the path <filename moreinfo="none">/home/bar</filename>.
The share is accessed via the share name <quote>foo</quote>:</para>
-<smbconfexample>
+<smbconfblock>
<smbconfsection name="[foo]"/>
<smbconfoption name="path">/home/bar</smbconfoption>
<smbconfoption name="read only">read only = no</smbconfoption>
-</smbconfexample>
+</smbconfblock>
<para>The following sample section defines a printable share.
The share is read-only, but printable. That is, the only write
access will be permitted as the default guest user (specified
elsewhere):</para>
-<smbconfexample>
+<smbconfblock>
<smbconfsection name="[aprinter]"/>
<smbconfoption name="path">/usr/spool/public</smbconfoption>
<smbconfoption name="read only">yes</smbconfoption>
<smbconfoption name="printable">yes</smbconfoption>
<smbconfoption name="guest ok">yes</smbconfoption>
-</smbconfexample>
+</smbconfblock>
</refsect1>
<refsect1>
than others. The following is a typical and suitable [homes]
section:</para>
- <smbconfexample>
+ <smbconfblock>
<smbconfsection name="[homes]"/>
<smbconfoption name="read only">no</smbconfoption>
- </smbconfexample>
+ </smbconfblock>
<para>An important point is that if guest access is specified
in the [homes] section, all home directories will be
it. A typical [printers] entry looks like
this:</para>
- <smbconfexample>
+ <smbconfblock>
<smbconfsection name="[printers]"/>
<smbconfoption name="path">/usr/spool/public</smbconfoption>
<smbconfoption name="guest ok">yes</smbconfoption>
<smbconfoption name="printable">yes</smbconfoption>
- </smbconfexample>
+ </smbconfblock>
<para>All aliases given for a printer in the printcap file
are legitimate printer names as far as the server is concerned.
<xsl:param name="docrop"><xsl:text>@DOCROP@</xsl:text></xsl:param>
<xsl:param name="ulink.footnotes"><xsl:text>@ULINK_IN_FOOTNOTE@</xsl:text></xsl:param>
<xsl:param name="ulink.show"><xsl:text>@ULINK_SHOW@</xsl:text></xsl:param>
-<xsl:param name="fontsize"><xsl:text>@FONTSIZE@</xsl:text></xsl:param>
</xsl:stylesheet>
</xsl:copy>
</xsl:template>
- <xsl:template match="smbconfexample/smbconfoption|smbconfblock/smbconfoption">
+ <xsl:template match="smbconfblock/smbconfoption">
<xsl:element name="member">
<xsl:element name="indexterm">
</xsl:element>
</xsl:element>
<xsl:element name="parameter">
- <xsl:text disable-output-escaping="yes">
- <?latex \hspace{1cm} ?>
- </xsl:text>
<xsl:value-of select="@name"/>
<xsl:choose>
<xsl:when test="text() != ''">
</xsl:element>
</xsl:template>
- <xsl:template match="smbconfexample/smbconfcomment|smbconfblock/smbconfcomment">
- <xsl:text disable-output-escaping="yes">
- <?latex \hspace{1cm} ?>
- </xsl:text>
+ <xsl:template match="smbconfblock/smbconfcomment">
<xsl:element name="member">
<xsl:text># </xsl:text>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
- <xsl:template match="smbconfexample/smbconfsection|smbconfblock/smbconfsection">
+ <xsl:template match="smbconfblock/smbconfsection">
<xsl:element name="member">
<xsl:text> </xsl:text>
</xsl:element>
</xsl:choose>
</xsl:template>
- <xsl:template match="smbconfexample">
- <xsl:choose>
- <xsl:when test="title = ''">
- <xsl:message>
- <xsl:text>Warning: smbconfexample does not have title!</xsl:text>
- </xsl:message>
- </xsl:when>
- </xsl:choose>
- <xsl:element name="example">
- <xsl:choose>
- <xsl:when test="@id != ''">
- <xsl:attribute name="id">
- <xsl:value-of select="@id"/>
- </xsl:attribute>
- </xsl:when>
- </xsl:choose>
-
- <xsl:element name="title">
- <xsl:value-of select="title"/>
- </xsl:element>
- <xsl:element name="simplelist">
- <xsl:apply-templates/>
- </xsl:element>
- </xsl:element>
- </xsl:template>
-
- <xsl:template match="smbconfexample/title">
- </xsl:template>
-
<xsl:template match="smbconfblock">
<xsl:element name="simplelist">
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
- <xsl:template match="smbconfcomment">
- <xsl:text># </xsl:text>
- <xsl:apply-templates/>
- </xsl:template>
-
<xsl:template match="imagefile">
<xsl:element name="mediaobject">
- <xsl:element name="imageobject">
- <xsl:attribute name="role"><xsl:text>latex</xsl:text></xsl:attribute>
- <xsl:element name="imagedata">
- <xsl:attribute name="fileref">
- <xsl:value-of select="$latex.imagebasedir"/><xsl:text>images/</xsl:text><xsl:value-of select="text()"/></xsl:attribute>
- <xsl:attribute name="scale">
- <xsl:choose>
- <xsl:when test="@scale != ''">
- <xsl:value-of select="@scale"/>
- </xsl:when>
-
- <xsl:otherwise>
- <xsl:text>50</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- <xsl:attribute name="scalefit"><xsl:text>1</xsl:text></xsl:attribute>
- </xsl:element>
- </xsl:element>
<xsl:element name="imageobject">
<xsl:attribute name="role"><xsl:text>html</xsl:text></xsl:attribute>
<xsl:element name="imagedata">
<xsl:template name="latex.thead.row.entry">
<xsl:text>{\bfseries </xsl:text><xsl:apply-templates/><xsl:text>}</xsl:text>
</xsl:template>
-<xsl:param name="latex.documentclass">xslt/latex/sambadoc</xsl:param>
-<xsl:param name="latex.documentclass.book"><xsl:value-of select="$fontsize"/>pt,openright,twoside</xsl:param>
+<xsl:param name="latex.documentclass">sambadoc</xsl:param>
+<xsl:param name="latex.documentclass.book">openright,twoside</xsl:param>
<xsl:param name="latex.babel.language">english</xsl:param>
+<xsl:template match="smbconfblock/smbconfoption">
+ <xsl:value-of select="@name"/>
+ <xsl:if test="text() != ''">
+ <xsl:text> = </xsl:text>
+ <xsl:value-of select="text()"/>
+ </xsl:if>
+ <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="smbconfblock/smbconfcomment">
+ <xsl:text># </xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="smbconfblock/smbconfsection">
+ <xsl:value-of select="@name"/>
+ <xsl:text> </xsl:text>
+</xsl:template>
+
+<xsl:template match="smbconfoption">
+ <xsl:text>\smbconfoption{</xsl:text>
+ <xsl:value-of select="@name"/>
+ <xsl:text>}</xsl:text>
+
+ <xsl:choose>
+ <xsl:when test="text() != ''">
+ <xsl:text> = </xsl:text>
+ <xsl:value-of select="text()"/>
+ </xsl:when>
+ </xsl:choose>
+</xsl:template>
+
+<xsl:template match="smbconfblock">
+ <xsl:text> \begin{lstlisting}[language=smbconf] </xsl:text>
+ <xsl:apply-templates/>
+ <xsl:text>\end{lstlisting} </xsl:text>
+</xsl:template>
+
+<xsl:template match="smbconfsection">
+ <xsl:text>\smbconfsection{</xsl:text>
+ <xsl:value-of select="translate(@name, '$','x')"/>
+ <xsl:text>}</xsl:text>
+</xsl:template>
+
+<xsl:template match="imagefile">
+ <xsl:text>\includegraphics[scale=.</xsl:text>
+ <xsl:choose>
+ <xsl:when test="@scale != ''"><xsl:value-of select="@scale"/></xsl:when>
+
+ <xsl:otherwise><xsl:text>50</xsl:text></xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>]{</xsl:text>
+ <xsl:value-of select="$latex.imagebasedir"/><xsl:text>images/</xsl:text>
+ <xsl:value-of select="text()"/>
+ <xsl:text>} </xsl:text>
+</xsl:template>
+
</xsl:stylesheet>
\plainfootrulewidth 0pt %---- no foot rule for chapter page
\footrulewidth 0pt %---- no rule for foot
+
+%10.5pt fonts
+\usepackage{type1cm}
+\renewcommand\normalsize{%
+ \@setfontsize\normalsize{10.5pt}{12pt}
+ \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
+ \abovedisplayshortskip \z@ \@plus3\p@
+ \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
+ \belowdisplayskip \abovedisplayskip
+\let\@listi\@listI}
+\normalsize
+%
+
%--- Redefine Headers
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
%
\renewcommand{\topfraction}{1.0}
\renewcommand{\bottomfraction}{1.0}
-\usepackage[twoside,dvips]{geometry}
+\usepackage[twoside]{geometry}
\geometry{%
paperwidth=7in,
footskip=.025in}
\setlength{\headwidth}{\textwidth}
+
+% smb.conf syntax highlighting
+\usepackage{listings}
+\usepackage{xcolor}
+
+\lstdefinelanguage{smbconf}{
+ morecomment=[l]{\#},
+}
+
+\lstset{backgroundcolor=\color{lightgray},frame=single,}
+\newcommand{\smbconfsection}[1]{\emph{#1}}
+\newcommand{\smbconfoption}[1]{\index{#1}\emph{#1}}
<xsl:strip-space elements="smbconfoption smbconfsection"/>
- <xsl:template match="smbconfexample/smbconfsection|smbconfblock/smbconfsection">
+ <xsl:template match="smbconfblock/smbconfsection">
<xsl:text> </xsl:text>
<xsl:value-of select="."/><xsl:text> </xsl:text>
</xsl:template>
- <xsl:template match="smbconfexample/smbconfoption|smbconfblock/smbconfoption">
+ <xsl:template match="smbconfblock/smbconfoption">
<xsl:text> </xsl:text><xsl:value-of select="@name"/><xsl:text> = </xsl:text><xsl:value-of select="text()"/><xsl:text> </xsl:text>
</xsl:template>
- <xsl:template match="smbconfexample">
- <listing>
- <xsl:call-template name="transform.id.attribute"/>
- <xsl:if test="title != ''">
- <description><xsl:value-of select="title"/></description>
- </xsl:if>
- <listingcode>
- <xsl:for-each select="smbconfoption|smbconfsection|smbconfcomment">
- <xsl:apply-templates select="."/>
- </xsl:for-each>
- </listingcode>
- </listing>
- </xsl:template>
-
<xsl:template match="smbconfblock">
<xsl:call-template name="transform.id.attribute"/>
<listingcode>
</figure>
</xsl:template>
- <xsl:template match="smbconfexample/smbconfcomment|smbconfblock/smbconfcomment">
+ <xsl:template match="smbconfblock/smbconfcomment">
<xsl:text># </xsl:text><xsl:value-of select="text()"/><xsl:text> </xsl:text>
</xsl:template>
- <xsl:template match="smbconfexample/member|smbconfblock/member">
+ <xsl:template match="smbconfblock/member">
<xsl:value-of select="text()"/><xsl:text> </xsl:text>
- <xsl:message><xsl:text>Encountered <member> element inside of smbconfexample/smbconfblock!</xsl:text></xsl:message>
+ <xsl:message><xsl:text>Encountered <member> element inside of smbconfblock!</xsl:text></xsl:message>
</xsl:template>
<xsl:template match="filterline">