- merge from ronnie
authorAndrew Tridgell <tridge@samba.org>
Sun, 18 Nov 2007 04:14:54 +0000 (15:14 +1100)
committerAndrew Tridgell <tridge@samba.org>
Sun, 18 Nov 2007 04:14:54 +0000 (15:14 +1100)
- auto-detect CTDB_MANAGES_WINBIND from smb.conf if not set

1  2 
config/ctdb.sysconfig
config/events.d/50.samba
web/samba.html

index d290321b99b0553b4bf25ee1af6d0adbb85d52e8,bbb6f270b17cb16b7f7815673077a39cfbeedd8b..a4dac0afb13847871672ef3b78914d0726b6dff2
  # default is to not manage Samba
  # CTDB_MANAGES_SAMBA=yes
  
+ # should ctdb manage starting/stopping Winbind service?
++# if left comented out then it will be autodetected based on smb.conf
+ # CTDB_MANAGES_WINBIND=yes
  # you may wish to raise the file descriptor limit for ctdb
  # use a ulimit command here. ctdb needs one file descriptor per
  # connected client (ie. one per connected client in Samba)
index 5f9fa4faface098599007daf7fa3c404e4bc8e42,88d8e4e43893a091afe392d16f8d22fbf4c32234..bdb351f667996615a190b001925ee897fc10c11f
@@@ -16,6 -16,6 +16,20 @@@ shif
      SAMBA_CLEANUP_PERIOD=10
  }
  
++
++# autodetect use of winbind if not set in config file
++[ -z "$CTDB_MANAGES_WINBIND" ] && {
++    secmode=`testparm -s --parameter-name=security 2> /dev/null`
++    case $secmode in
++      ADS|DOMAIN)
++          CTDB_MANAGES_WINBIND="yes";
++          ;;
++      *)
++          CTDB_MANAGES_WINBIND="no";
++          ;;
++    esac
++}
++
  ###########################
  # periodic cleanup function
  periodic_cleanup() {
diff --cc web/samba.html
index 0b5be7f6bc1df8164f3d620e7e86e4b3dce61f64,08fc683ab8b75d16fbaaaea4be32c8f2b4e61253..b105b1d20a6050dd0a24a2e527dd3ed701a70afe
@@@ -77,5 -77,20 +77,21 @@@ Example
  
  It is strongly recommended that you set this parameter to "yes" if you intend to use clustered samba.
  
 -It is strongly recommended that you set this parameter to "yes" if you intend to use clustered samba.
+ <h3>CTDB_MANAGES_WINBIND</h3>
+ This is a parameter in /etc/sysconfig/ctdb<br><br>
+ When this parameter is set to "yes" CTDB will start/stop/restart the local winbind daemon as the cluster configuration changes.<br><br>
+ When this parameter is set you should also make sure that winbind is NOT started by default by the linux system when it boots:
+ <pre>
+   chkconfig winbind off
+ </pre>
+ Example:
+ <pre>
+   CTDB_MANAGES_WINBIND="yes"
+ </pre>
++It is strongly recommended that you set this parameter to "yes" if you
++intend to use clustered samba in DOMAIN or ADS security mode.
  <!--#include virtual="footer.html" -->