summaryrefslogtreecommitdiff
path: root/docs/Samba-HOWTO-Collection
diff options
context:
space:
mode:
authorJohn Terpstra <jht@samba.org>2005-05-03 10:22:56 +0000
committerGerald W. Carter <jerry@samba.org>2008-04-23 08:46:33 -0500
commitd3c3ad9a128f020c2787716aee183526ca152448 (patch)
treec61cfac7600bcc43595bcb47aceb558f856013cc /docs/Samba-HOWTO-Collection
parented9ad631cc84bb6e7f6084f783004f7c782a2947 (diff)
downloadsamba-d3c3ad9a128f020c2787716aee183526ca152448.tar.gz
samba-d3c3ad9a128f020c2787716aee183526ca152448.tar.bz2
samba-d3c3ad9a128f020c2787716aee183526ca152448.zip
adding feedback.
(This used to be commit 0a9ff0144cccf414c15b67d5a576679fef6055ee)
Diffstat (limited to 'docs/Samba-HOWTO-Collection')
-rw-r--r--docs/Samba-HOWTO-Collection/TOSHARG-AdvancedNetworkAdmin.xml49
-rw-r--r--docs/Samba-HOWTO-Collection/TOSHARG-Bugs.xml22
2 files changed, 71 insertions, 0 deletions
diff --git a/docs/Samba-HOWTO-Collection/TOSHARG-AdvancedNetworkAdmin.xml b/docs/Samba-HOWTO-Collection/TOSHARG-AdvancedNetworkAdmin.xml
index 72892f3806..37df6fecc9 100644
--- a/docs/Samba-HOWTO-Collection/TOSHARG-AdvancedNetworkAdmin.xml
+++ b/docs/Samba-HOWTO-Collection/TOSHARG-AdvancedNetworkAdmin.xml
@@ -347,6 +347,55 @@ See the documentation in the <ulink url="http://support.microsoft.com/default.as
</para>
</sect2>
+<sect2>
+ <title>Limiting Logon Connections</title>
+
+ <para>
+ Sometimes it is necessary to limit the number of concurrent connections to a
+ Samba shared resource. For example, a site may wish to permit only one network
+ logon per user.
+ </para>
+
+ <para>
+ The Samba <parameter>preexec script</parameter> parameter can be used to permit only one
+ connection per user. Though this method is not fool-proof, and may have side-effects
+ the following contributed method may inspire someone to provide a better solution.
+ </para>
+
+ <para>
+ This is not a perfect solution because Windows clients can drop idle connections
+ with an auto-reconnect capability that could result in the appearance that a share
+ is no longer in use, while actually it is. Even so, it demonstrates the principle
+ of use of the <parameter>preexec script</parameter> parameter.
+ </para>
+
+ <para>
+ The following share configuration demonstrates use of the script shown in <link linkend="Tpees"/>:
+ <programlisting>
+[myshare]
+ ...
+ preexec script = /sbin/PermitSingleLogon.sh
+ preexec close = Yes
+ ...
+ </programlisting>
+ </para>
+
+<example id="Tpees">
+ <title>Script to Enforce Single Resource Logon</title>
+<screen>
+#!/bin/bash
+
+IFS="-"
+RESULT=$(smbstatus -S -u $1 2> /dev/null | awk 'NF > 6 {print $1}' | sort | uniq -d)
+
+if [ "X${RESULT}" == X ]; then
+ exit 0
+else
+ exit 1
+fi
+</screen>
+</example>
+
</sect1>
</chapter>
diff --git a/docs/Samba-HOWTO-Collection/TOSHARG-Bugs.xml b/docs/Samba-HOWTO-Collection/TOSHARG-Bugs.xml
index ae4354f5d6..2bd14a681d 100644
--- a/docs/Samba-HOWTO-Collection/TOSHARG-Bugs.xml
+++ b/docs/Samba-HOWTO-Collection/TOSHARG-Bugs.xml
@@ -235,6 +235,28 @@ using the client. The debugger should catch the fault and tell you
where it occurred.
</para>
+<para>
+Sometimes it is necessary to build a Samba binary files that have debugging
+symbols so as to make it possible to capture enough information from a crashed
+operation to permit the Samba Team to fix the problem.
+</para>
+
+<para>
+Compile with <constant>-g</constant> to ensure you have symbols in place.
+Add the following line to the &smb.conf; file global section:
+</screen>
+panic action = "/bin/sleep 90000"
+</screen>
+to catch any panics. If <command>smbd</command> seems to be frozen look for any sleep
+processes. If it is not, and appears to be spinning, find the process id
+of the spinning process and type:
+<screen>
+gdb /usr/local/samba/sbin/smbd
+</screen>
+then <quote>attach 'pid'</quote> (of the spinning process), then type <quote>bt</quote> to
+get a backtrace to see where the smbd is in the call path.
+</para>
+
</sect1>
<sect1>