summaryrefslogtreecommitdiff
path: root/packaging/Solaris
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/Solaris')
-rw-r--r--packaging/Solaris/README15
-rw-r--r--packaging/Solaris/copyright1
-rw-r--r--packaging/Solaris/i.swat44
-rw-r--r--packaging/Solaris/inetd.conf.master1
-rw-r--r--packaging/Solaris/makepkg.sh239
-rw-r--r--packaging/Solaris/pkginfo.master14
-rw-r--r--packaging/Solaris/postinstall15
-rw-r--r--packaging/Solaris/preremove12
-rw-r--r--packaging/Solaris/prototype.master46
-rw-r--r--packaging/Solaris/r.swat16
-rw-r--r--packaging/Solaris/request17
-rwxr-xr-xpackaging/Solaris/samba.init.master53
-rw-r--r--packaging/Solaris/services1
-rw-r--r--packaging/Solaris/smb.conf.default271
14 files changed, 745 insertions, 0 deletions
diff --git a/packaging/Solaris/README b/packaging/Solaris/README
new file mode 100644
index 0000000000..b8d0b2c458
--- /dev/null
+++ b/packaging/Solaris/README
@@ -0,0 +1,15 @@
+
+INSTRUCTIONS: Preparing Samba packages for Solaris
+
+To produce a package:
+
+* Type sh makepkg.sh
+
+The package will be created in the /tmp directory.
+
+By default, the package will be built to install samba in /usr/local
+To change the default, modify the INSTALL_BASE variable in makepkg.sh
+This is after you have configured samba with a --prefix option of the
+alternate samba location and then created the binaries.
+
+
diff --git a/packaging/Solaris/copyright b/packaging/Solaris/copyright
new file mode 100644
index 0000000000..1792668d17
--- /dev/null
+++ b/packaging/Solaris/copyright
@@ -0,0 +1 @@
+Copyright (C) 2001 Samba Team
diff --git a/packaging/Solaris/i.swat b/packaging/Solaris/i.swat
new file mode 100644
index 0000000000..d07d2798d8
--- /dev/null
+++ b/packaging/Solaris/i.swat
@@ -0,0 +1,44 @@
+while read src dest
+do
+ sed -e '/^swat.*swat$/d' $dest >/tmp/$$swat || exit 2
+ cat $src >>/tmp/$$swat || exit 2
+
+ # Use cp;rm instead of mv because $dest might be a symlink
+ cp -f /tmp/$$swat $dest || exit 2
+ rm -f /tmp/$$swat
+done
+
+if [ "$1" = ENDOFCLASS ]
+then
+
+ # If local install, restart inetd
+ if [ -z "${PKG_INSTALL_ROOT}" ]
+ then
+ TARGET=`hostname`
+ kill -HUP `ps -e -o pid,comm | grep inetd | awk '{print $1}'`
+ else
+ TARGET="<servername>"
+ fi
+
+ cat <<EOF
+The Samba Web Administration Tool (SWAT) has been installed on your system.
+You can connect to it from a web browser on TCP port 901 at
+http://${TARGET}:901/.
+
+If you use NIS/NIS+, check the ${PKG_INSTALL_ROOT}/etc/nsswitch.conf file
+to verify that the local services file is being used as a backend for the
+services database, or you won't be able to connect to the Samba Admin Tool.
+
+EOF
+
+ if [ ! -z "$PKG_INSTALL_ROOT" ]
+ then
+ cat <<EOF
+The SWAT settings will not take effect till you send a hangup (HUP) signal
+to inetd on the target system.
+
+EOF
+ fi
+
+fi
+
diff --git a/packaging/Solaris/inetd.conf.master b/packaging/Solaris/inetd.conf.master
new file mode 100644
index 0000000000..b11fb7c3db
--- /dev/null
+++ b/packaging/Solaris/inetd.conf.master
@@ -0,0 +1 @@
+swat stream tcp nowait.400 root __BASEDIR__/samba/bin/swat swat
diff --git a/packaging/Solaris/makepkg.sh b/packaging/Solaris/makepkg.sh
new file mode 100644
index 0000000000..f038d32699
--- /dev/null
+++ b/packaging/Solaris/makepkg.sh
@@ -0,0 +1,239 @@
+#!/bin/sh
+#
+# Copyright (C) Shirish A Kalele 2000
+# Copyright (C) Gerald Carter 2004
+#
+# script for build solaris Samba package
+#
+
+INSTALL_BASE=/opt/samba
+
+SBINPROGS="smbd nmbd winbindd swat"
+BINPROGS="findsmb nmblookup eventlogadm pdbedit rpcclient smbclient smbcquotas smbspool smbtar tdbbackup testparm wbinfo net ntlm_auth profiles smbcacls smbcontrol smbpasswd smbstatus smbtree tdbdump"
+MSGFILES="de.msg en.msg fi.msg fr.msg it.msg ja.msg nl.msg pl.msg tr.msg"
+VFSLIBS="audit.so default_quota.so extd_audit.so full_audit.so readonly.so shadow_copy.so cap.so expand_msdfs.so fake_perms.so netatalk.so recycle.so"
+DATFILES="lowcase.dat upcase.dat valid.dat"
+CHARSETLIBS="CP437.so CP850.so"
+AUTHLIBS="script.so"
+
+add_dynamic_entries()
+{
+ # Add the binaries, docs and SWAT files
+ cd $TMPINSTALLDIR/$INSTALL_BASE
+
+ echo "#\n# Server Binaries \n#"
+ for file in $SBINPROGS; do
+ echo f none sbin/$file 0755 root other
+ done
+
+ echo "#\n# User Binaries \n#"
+ for file in $BINPROGS; do
+ echo f none bin/$file 0755 root other
+ done
+
+ echo "#\n# Libraries\n#"
+ for file in $MSGFILES; do
+ echo f none lib/$file 0644 root other
+ done
+ for file in $DATFILES; do
+ echo f none lib/$file 0644 root other
+ done
+ for file in $VFSLIBS; do
+ echo f none lib/vfs/$file 0755 root other
+ done
+ for file in $CHARSETLIBS; do
+ echo f none lib/charset/$file 0755 root other
+ done
+ for file in $AUTHLIBS; do
+ echo f none lib/auth/$file 0755 root other
+ done
+
+ echo "#\n# libsmbclient\n#"
+ echo f none lib/libsmbclient.so 0755 root other
+ echo f none lib/libsmbclient.a 0755 root other
+ echo f none include/libsmbclient.h 0644 root other
+
+ echo "#\n# libmsrpc\n#"
+ echo f none lib/libmsrpc.so 0755 root other
+ echo f none lib/libmsrpc.a 0755 root other
+ echo f none include/libmsrpc.h 0644 root other
+
+ if [ -f lib/smbwrapper.so -a -f bin/smbsh ]; then
+ echo "#\n# smbwrapper\n#"
+ echo f none lib/smbwrapper.so 0755 root other
+ echo f none bin/smbsh 0755 root other
+ fi
+
+ echo "#\n# nss_winbind.so and nss_wins.so\n#"
+ echo f none /lib/nss_winbind.so.1=lib/nss_winbind.so.1 0755 root other
+ echo f none /lib/nss_wins.so.1=lib/nss_wins.so.1 0755 root other
+ # echo s none /lib/nss_winbind.so.1=/usr/lib/nss_winbind.so.1 0755 root other
+ # echo s none /lib/nss_wins.so.1=/usr/lib/nss_wins.so.1 0755 root other
+ if [ -f lib/pam_winbind.so ]; then
+ echo f none /usr/lib/security/pam_winbind.so=lib/pam_winbind.so 0755 root other
+ fi
+
+ echo "#\n# man pages \n#"
+
+ # Create directories for man page sections if nonexistent
+ cd man
+ for i in 1 2 3 4 5 6 7 8 9; do
+ manpages=`ls man$i 2>/dev/null`
+ if [ $? -eq 0 ]; then
+ echo d none man/man${i} ? ? ?
+ for manpage in $manpages; do
+ echo f none man/man${i}/${manpage} 0644 root other
+ done
+ fi
+ done
+ cd ..
+
+ echo "#\n# SWAT \n#"
+ list=`find swat -type d | grep -v "/.svn$"`
+ for dir in $list; do
+ if [ -d $dir ]; then
+ echo d none $dir 0755 root other
+ fi
+ done
+
+ list=`find swat -type f | grep -v /.svn/`
+ for file in $list; do
+ if [ -f $file ]; then
+ echo f none $file 0644 root other
+ fi
+ done
+
+ # Create entries for docs for the beginner
+ echo 's none docs/using_samba=$BASEDIR/swat/using_samba'
+ for file in docs/*pdf; do
+ echo f none $file 0644 root other
+ done
+}
+
+#####################################################################
+## BEGIN MAIN
+#####################################################################
+
+# Try to guess the distribution base..
+DISTR_BASE=`dirname \`pwd\` |sed -e 's@/packaging$@@'`
+echo "Distribution base: $DISTR_BASE"
+
+TMPINSTALLDIR="/tmp/`basename $DISTR_BASE`-build"
+echo "Temp install dir: $TMPINSTALLDIR"
+echo "Install directory: $INSTALL_BASE"
+
+##
+## first build the source
+##
+
+cd $DISTR_BASE/source
+
+if test "x$1" = "xbuild" ]; then
+ ./configure --prefix=$INSTALL_BASE \
+ --localstatedir=/var/lib/samba \
+ --with-piddir=/var/run \
+ --with-logfilebase=/var/log/samba \
+ --with-privatedir=/etc/samba/private \
+ --with-configdir=/etc/samba \
+ --with-lockdir=/var/lib/samba \
+ --with-pam --with-acl-support \
+ --with-quotas --with-included-popt \
+ && make
+
+ if [ $? -ne 0 ]; then
+ echo "Build failed! Exiting...."
+ exit 1
+ fi
+fi
+
+mkdir $TMPINSTALLDIR
+make DESTDIR=$TMPINSTALLDIR install
+
+## clear out *.old
+find $TMPINSTALLDIR -name \*.old |while read x; do rm -rf "$x"; done
+
+##
+## Now get the install locations
+##
+SBINDIR=`bin/smbd -b | grep SBINDIR | awk '{print $2}'`
+BINDIR=`bin/smbd -b | grep BINDIR | grep -v SBINDIR | awk '{print $2}'`
+SWATDIR=`bin/smbd -b | grep SWATDIR | awk '{print $2}'`
+CONFIGFILE=`bin/smbd -b | grep CONFIGFILE | awk '{print $2}'`
+LOCKDIR=`bin/smbd -b | grep LOCKDIR | awk '{print $2}'`
+CONFIGDIR=`dirname $CONFIGFILE`
+LOGFILEBASE=`bin/smbd -b | grep LOGFILEBASE | awk '{print $2}'`
+LIBDIR=`bin/smbd -b | grep LIBDIR | awk '{print $2}'`
+PIDDIR=`bin/smbd -b | grep PIDDIR | awk '{print $2}'`
+PRIVATE_DIR=`bin/smbd -b | grep PRIVATE_DIR | awk '{print $2}'`
+DOCDIR=$INSTALL_BASE/docs
+
+##
+## copy some misc files that are not done as part of 'make install'
+##
+cp -fp nsswitch/libnss_wins.so $TMPINSTALLDIR/$LIBDIR/nss_wins.so.1
+cp -fp nsswitch/libnss_winbind.so $TMPINSTALLDIR/$LIBDIR/nss_winbind.so.1
+if [ -f bin/pam_winbind.so ]; then
+ cp -fp bin/pam_winbind.so $TMPINSTALLDIR/$LIBDIR/pam_winbind.so
+fi
+if [ -f bin/smbwrapper.so ]; then
+ cp -fp bin/smbwrapper.so $TMPINSTALLDIR/$INSTALL_BASE/lib
+fi
+if [ -f bin/smbsh ]; then
+ cp -fp bin/smbsh $TMPINSTALLDIR/$INSTALL_BASE/bin
+fi
+
+mkdir -p $TMPINSTALLDIR/$INSTALL_BASE/docs
+cp -p ../docs/*pdf $TMPINSTALLDIR/$INSTALL_BASE/docs
+
+
+cd $DISTR_BASE/packaging/Solaris
+
+##
+## Main driver
+##
+
+# Setup version from smbd -V
+
+VERSION=`$TMPINSTALLDIR/$SBINDIR/smbd -V | awk '{print $2}'`
+sed -e "s|__VERSION__|$VERSION|" -e "s|__ARCH__|`uname -p`|" -e "s|__BASEDIR__|$INSTALL_BASE|g" pkginfo.master > pkginfo
+
+sed -e "s|__BASEDIR__|$INSTALL_BASE|g" inetd.conf.master > inetd.conf
+sed -e "s|__BASEDIR__|$INSTALL_BASE|g" samba.init.master > samba.init
+
+##
+## copy over some scripts need for packagaing
+##
+mkdir -p $TMPINSTALLDIR/$INSTALL_BASE/scripts
+for i in inetd.conf samba.init smb.conf.default services; do
+ cp -fp $i $TMPINSTALLDIR/$INSTALL_BASE/scripts
+done
+
+##
+## Start building the prototype file
+##
+echo "CONFIGDIR=$CONFIGDIR" >> pkginfo
+echo "LOGFILEBASE=$LOGFILEBASE" >> pkginfo
+echo "LOCKDIR=$LOCKDIR" >> pkginfo
+echo "PIDDIR=$PIDDIR" >> pkginfo
+echo "PRIVATE_DIR=$PRIVATE_DIR" >> pkginfo
+
+cp prototype.master prototype
+
+# Add the dynamic part to the prototype file
+(add_dynamic_entries >> prototype)
+
+##
+## copy packaging files
+##
+for i in prototype pkginfo copyright preremove postinstall request i.swat r.swat; do
+ cp $i $TMPINSTALLDIR/$INSTALL_BASE
+done
+
+# Create the package
+pkgmk -o -d /tmp -b $TMPINSTALLDIR/$INSTALL_BASE -f prototype
+
+if [ $? = 0 ]; then
+ pkgtrans /tmp samba.pkg samba
+fi
+
+echo The samba package is in /tmp
diff --git a/packaging/Solaris/pkginfo.master b/packaging/Solaris/pkginfo.master
new file mode 100644
index 0000000000..a40c76e60f
--- /dev/null
+++ b/packaging/Solaris/pkginfo.master
@@ -0,0 +1,14 @@
+PKG=samba
+NAME=CIFS File and Print server
+ARCH=__ARCH__
+VERSION=__VERSION__
+CATEGORY=system
+VENDOR=Gerald (Jerry) Carter, Samba Team
+DESC=File and printer sharing for Windows workstations
+HOTLINE=Please contact your local UNIX support group
+EMAIL=jerry@samba.org
+CLASSES=none
+INTONLY=1
+ISTATES="S s 1 2 3"
+RSTATES="S s 1 2 3"
+BASEDIR=__BASEDIR__
diff --git a/packaging/Solaris/postinstall b/packaging/Solaris/postinstall
new file mode 100644
index 0000000000..3586d9bc9e
--- /dev/null
+++ b/packaging/Solaris/postinstall
@@ -0,0 +1,15 @@
+cat <<EOF
+___________________________________________________________________________
+
+INSTALLATION COMPLETE.
+
+All files comprising the Samba Server have been installed.
+
+You can configure Samba by creating a configuration file at
+${CONFIGDIR}/smb.conf. For details on configuration,
+refer to the Samba man pages under ${BASEDIR}/man
+and the documentation at ${BASEDIR}/samba/docs.
+___________________________________________________________________________
+
+EOF
+
diff --git a/packaging/Solaris/preremove b/packaging/Solaris/preremove
new file mode 100644
index 0000000000..7313b0074f
--- /dev/null
+++ b/packaging/Solaris/preremove
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+# If this is a local deinstall, stop samba
+if [ -z "$PKG_INSTALL_ROOT" ]
+then
+ SMBD=`ps -e -o pid,comm | grep smbd | awk '{print $1}'`
+ NMBD=`ps -e -o pid,comm | grep nmbd | awk '{print $1}'`
+ [ ! -z "$SMBD" ] && kill -TERM $SMBD
+ [ ! -z "$NMBD" ] && kill -TERM $NMBD
+ sleep 2
+fi
+
diff --git a/packaging/Solaris/prototype.master b/packaging/Solaris/prototype.master
new file mode 100644
index 0000000000..6cf1cc717d
--- /dev/null
+++ b/packaging/Solaris/prototype.master
@@ -0,0 +1,46 @@
+#
+# Information files.
+#
+i pkginfo=./pkginfo
+i copyright=./copyright
+# i request=./request
+i preremove=./preremove
+i postinstall=./postinstall
+i i.swat=./i.swat
+i r.swat=./r.swat
+#
+# Stuff that goes into the system areas of the filesystem.
+#
+d none $CONFIGDIR ? ? ?
+d initscript /etc/init.d ? ? ?
+f initscript /etc/init.d/samba=scripts/samba.init 0744 root sys
+d initscript /etc/rc3.d ? ? ?
+f initscript /sbin/samba=scripts/samba.init 0750 root root
+#
+# Stuff to set up SWAT
+#
+d swat /etc/inet ? ? ?
+e swat /etc/inet/services=scripts/services ? ? ?
+e swat /etc/inet/inetd.conf=scripts/inetd.conf ? ? ?
+#
+# Create the samba subtree.
+#
+d none docs 755 root other
+d none man 755 root other
+d none $CONFIGDIR 755 root sys
+d none $LOCKDIR 755 root other
+d none $PRIVATE_DIR 700 root sys
+d none sbin 0755 root other
+d none bin 0755 root other
+d none lib 0755 root other
+d none lib/charset 0755 root other
+d none lib/vfs 0755 root other
+d none include 0755 root other
+d none swat 0755 root other
+d none $LOGFILEBASE 0755 root other
+d none $PIDDIR 0755 root other
+#
+#
+f none $CONFIGDIR/smb.conf.default=scripts/smb.conf.default 0644 root other
+#
+#
diff --git a/packaging/Solaris/r.swat b/packaging/Solaris/r.swat
new file mode 100644
index 0000000000..11c776646d
--- /dev/null
+++ b/packaging/Solaris/r.swat
@@ -0,0 +1,16 @@
+while read dest
+do
+ sed -e '/^swat.*swat$/d' $dest >/tmp/$$swat || exit 2
+ # Use cp;rm; instead of mv because $dest might be a symlink
+ cp -f /tmp/$$swat $dest || exit 2
+ rm -f /tmp/$$swat
+done
+
+if [ "$1" = ENDOFCLASS ]
+then
+ if [ -z "$PKG_INSTALL_ROOT" ]
+ then
+ kill -HUP `ps -e -o pid,comm | grep inetd | awk '{print $1}'`
+ fi
+fi
+
diff --git a/packaging/Solaris/request b/packaging/Solaris/request
new file mode 100644
index 0000000000..59cdd0ab22
--- /dev/null
+++ b/packaging/Solaris/request
@@ -0,0 +1,17 @@
+trap 'exit 3' 15
+
+VALSTR=/usr/sadm/bin/valstr
+
+resp=`ckyorn -d y -p "Do you wish to have Samba start whenever the system boots up? (default:y) " -Q`
+$VALSTR -r "^[yY]" $resp
+[ $? -eq 0 ] && CLASSES="$CLASSES initscript"
+
+resp=`ckyorn -d y -p "Do you wish to set up the Samba Web Admin Tool (SWAT)? (default:y) " -Q`
+$VALSTR -r "^[yY]" $resp
+[ $? -eq 0 ] && CLASSES="$CLASSES swat"
+
+cat >$1 <<!
+CLASSES=$CLASSES
+!
+exit 0
+
diff --git a/packaging/Solaris/samba.init.master b/packaging/Solaris/samba.init.master
new file mode 100755
index 0000000000..61e222bd20
--- /dev/null
+++ b/packaging/Solaris/samba.init.master
@@ -0,0 +1,53 @@
+#!/bin/sh
+#ident "@(#)samba.server 1.0 96/06/19 TK" /* SVr4.0 1.1.13.1*/
+#
+# Please send info on modifications to knuutila@cs.utu.fi
+#
+# This file should have uid root, gid sys and chmod 744
+#
+if [ ! -d /usr/bin ]
+then # /usr not mounted
+ exit
+fi
+
+killproc() { # kill the named process(es)
+ pid=`/usr/bin/ps -e |
+ /usr/bin/grep -w $1 |
+ /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
+ [ "$pid" != "" ] && kill $pid
+}
+
+# Start/stop processes required for samba server
+
+case "$1" in
+
+'start')
+#
+# Edit these lines to suit your installation (paths, workgroup, host)
+# Add the following parameters to nmbd, smbd, winbindd if needed
+# (this may be needed for custom file locations)
+# -D -s$BASE/lib/smb.conf
+#
+ BASE=__BASEDIR__
+ $BASE/sbin/nmbd
+ $BASE/sbin/smbd
+ $BASE/sbin/winbindd
+ ;;
+'stop')
+ killproc nmbd
+ killproc smbd
+ ;;
+
+'restart')
+ killproc nmbd
+ killproc smbd
+ BASE=__BASEDIR__
+ $BASE/sbin/nmbd
+ $BASE/sbin/smbd
+ $BASE/sbin/winbindd
+ ;;
+
+*)
+ echo "Usage: /etc/init.d/samba { start | stop | restart }"
+ ;;
+esac
diff --git a/packaging/Solaris/services b/packaging/Solaris/services
new file mode 100644
index 0000000000..fc691200c8
--- /dev/null
+++ b/packaging/Solaris/services
@@ -0,0 +1 @@
+swat 901/tcp # Samba Web Admin Tool - swat
diff --git a/packaging/Solaris/smb.conf.default b/packaging/Solaris/smb.conf.default
new file mode 100644
index 0000000000..971ca19c83
--- /dev/null
+++ b/packaging/Solaris/smb.conf.default
@@ -0,0 +1,271 @@
+# This is the main Samba configuration file. You should read the
+# smb.conf(5) manual page in order to understand the options listed
+# here. Samba has a huge number of configurable options (perhaps too
+# many!) most of which are not shown in this example
+#
+# For a step to step guide on installing, configuring and using samba,
+# read the Samba-HOWTO-Collection. This may be obtained from:
+# http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
+#
+# Many working examples of smb.conf files can be found in the
+# Samba-Guide which is generated daily and can be downloaded from:
+# http://www.samba.org/samba/docs/Samba-Guide.pdf
+#
+# Any line which starts with a ; (semi-colon) or a # (hash)
+# is a comment and is ignored. In this example we will use a #
+# for commentry and a ; for parts of the config file that you
+# may wish to enable
+#
+# NOTE: Whenever you modify this file you should run the command "testparm"
+# to check that you have not made any basic syntactic errors.
+#
+#======================= Global Settings =====================================
+[global]
+
+# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
+ workgroup = MYGROUP
+
+# server string is the equivalent of the NT Description field
+ server string = Samba Server
+
+# Security mode. Defines in which mode Samba will operate. Possible
+# values are share, user, server, domain and ads. Most people will want
+# user level security. See the Samba-HOWTO-Collection for details.
+ security = user
+
+# This option is important for security. It allows you to restrict
+# connections to machines which are on your local network. The
+# following example restricts access to two C class networks and
+# the "loopback" interface. For more examples of the syntax see
+# the smb.conf man page
+; hosts allow = 192.168.1. 192.168.2. 127.
+
+# If you want to automatically load your printer list rather
+# than setting them up individually then you'll need this
+ load printers = yes
+
+# you may wish to override the location of the printcap file
+; printcap name = /etc/printcap
+
+# on SystemV system setting printcap name to lpstat should allow
+# you to automatically obtain a printer list from the SystemV spool
+# system
+; printcap name = lpstat
+
+# It should not be necessary to specify the print system type unless
+# it is non-standard. Currently supported print systems include:
+# bsd, cups, sysv, plp, lprng, aix, hpux, qnx
+; printing = cups
+
+# Uncomment this if you want a guest account, you must add this to /etc/passwd
+# otherwise the user "nobody" is used
+; guest account = pcguest
+
+# this tells Samba to use a separate log file for each machine
+# that connects
+ log file = /usr/local/samba/var/log.%m
+
+# Put a capping on the size of the log files (in Kb).
+ max log size = 50
+
+# Use password server option only with security = server
+# The argument list may include:
+# password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
+# or to auto-locate the domain controller/s
+# password server = *
+; password server = <NT-Server-Name>
+
+# Use the realm option only with security = ads
+# Specifies the Active Directory realm the host is part of
+; realm = MY_REALM
+
+# Backend to store user information in. New installations should
+# use either tdbsam or ldapsam. smbpasswd is available for backwards
+# compatibility. tdbsam requires no further configuration.
+; passdb backend = tdbsam
+
+# Using the following line enables you to customise your configuration
+# on a per machine basis. The %m gets replaced with the netbios name
+# of the machine that is connecting.
+# Note: Consider carefully the location in the configuration file of
+# this line. The included file is read at that point.
+; include = /usr/local/samba/lib/smb.conf.%m
+
+# Configure Samba to use multiple interfaces
+# If you have multiple network interfaces then you must list them
+# here. See the man page for details.
+; interfaces = 192.168.12.2/24 192.168.13.2/24
+
+# Browser Control Options:
+# set local master to no if you don't want Samba to become a master
+# browser on your network. Otherwise the normal election rules apply
+; local master = no
+
+# OS Level determines the precedence of this server in master browser
+# elections. The default value should be reasonable
+; os level = 33
+
+# Domain Master specifies Samba to be the Domain Master Browser. This
+# allows Samba to collate browse lists between subnets. Don't use this
+# if you already have a Windows NT domain controller doing this job
+; domain master = yes
+
+# Preferred Master causes Samba to force a local browser election on startup
+# and gives it a slightly higher chance of winning the election
+; preferred master = yes
+
+# Enable this if you want Samba to be a domain logon server for
+# Windows95 workstations.
+; domain logons = yes
+
+# if you enable domain logons then you may want a per-machine or
+# per user logon script
+# run a specific logon batch file per workstation (machine)
+; logon script = %m.bat
+# run a specific logon batch file per username
+; logon script = %U.bat
+
+# Where to store roving profiles (only for Win95 and WinNT)
+# %L substitutes for this servers netbios name, %U is username
+# You must uncomment the [Profiles] share below
+; logon path = \\%L\Profiles\%U
+
+# Windows Internet Name Serving Support Section:
+# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
+; wins support = yes
+
+# WINS Server - Tells the NMBD components of Samba to be a WINS Client
+# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
+; wins server = w.x.y.z
+
+# WINS Proxy - Tells Samba to answer name resolution queries on
+# behalf of a non WINS capable client, for this to work there must be
+# at least one WINS Server on the network. The default is NO.
+; wins proxy = yes
+
+# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
+# via DNS nslookups. The default is NO.
+ dns proxy = no
+
+# These scripts are used on a domain controller or stand-alone
+# machine to add or delete corresponding unix accounts
+; add user script = /usr/sbin/useradd %u
+; add group script = /usr/sbin/groupadd %g
+; add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
+; delete user script = /usr/sbin/userdel %u
+; delete user from group script = /usr/sbin/deluser %u %g
+; delete group script = /usr/sbin/groupdel %g
+
+
+#============================ Share Definitions ==============================
+[homes]
+ comment = Home Directories
+ browseable = no
+ writable = yes
+
+# Un-comment the following and create the netlogon directory for Domain Logons
+; [netlogon]
+; comment = Network Logon Service
+; path = /usr/local/samba/lib/netlogon
+; guest ok = yes
+; writable = no
+; share modes = no
+
+
+# Un-comment the following to provide a specific roving profile share
+# the default is to use the user's home directory
+;[Profiles]
+; path = /usr/local/samba/profiles
+; browseable = no
+; guest ok = yes
+
+
+# NOTE: If you have a BSD-style print system there is no need to
+# specifically define each individual printer
+[printers]
+ comment = All Printers
+ path = /usr/spool/samba
+ browseable = no
+# Set public = yes to allow user 'guest account' to print
+ guest ok = no
+ writable = no
+ printable = yes
+
+# This one is useful for people to share files
+;[tmp]
+; comment = Temporary file space
+; path = /tmp
+; read only = no
+; public = yes
+
+# A publicly accessible directory, but read only, except for people in
+# the "staff" group
+;[public]
+; comment = Public Stuff
+; path = /home/samba
+; public = yes
+; writable = yes
+; printable = no
+; write list = @staff
+
+# Other examples.
+#
+# A private printer, usable only by fred. Spool data will be placed in fred's
+# home directory. Note that fred must have write access to the spool directory,
+# wherever it is.
+;[fredsprn]
+; comment = Fred's Printer
+; valid users = fred
+; path = /homes/fred
+; printer = freds_printer
+; public = no
+; writable = no
+; printable = yes
+
+# A private directory, usable only by fred. Note that fred requires write
+# access to the directory.
+;[fredsdir]
+; comment = Fred's Service
+; path = /usr/somewhere/private
+; valid users = fred
+; public = no
+; writable = yes
+; printable = no
+
+# a service which has a different directory for each machine that connects
+# this allows you to tailor configurations to incoming machines. You could
+# also use the %U option to tailor it by user name.
+# The %m gets replaced with the machine name that is connecting.
+;[pchome]
+; comment = PC Directories
+; path = /usr/pc/%m
+; public = no
+; writable = yes
+
+# A publicly accessible directory, read/write to all users. Note that all files
+# created in the directory by users will be owned by the default user, so
+# any user with access can delete any other user's files. Obviously this
+# directory must be writable by the default user. Another user could of course
+# be specified, in which case all files would be owned by that user instead.
+;[public]
+; path = /usr/somewhere/else/public
+; public = yes
+; only guest = yes
+; writable = yes
+; printable = no
+
+# The following two entries demonstrate how to share a directory so that two
+# users can place files there that will be owned by the specific users. In this
+# setup, the directory should be writable by both users and should have the
+# sticky bit set on it to prevent abuse. Obviously this could be extended to
+# as many users as required.
+;[myshare]
+; comment = Mary's and Fred's stuff
+; path = /usr/somewhere/shared
+; valid users = mary fred
+; public = no
+; writable = yes
+; printable = no
+; create mask = 0765
+
+