diff options
author | Gerald Carter <jerry@samba.org> | 2004-10-31 02:32:35 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:05 -0500 |
commit | 2712b8854b4eb01ba5b79141d001d53c043d1413 (patch) | |
tree | 6035955aa30fc1e40605e6e2c5b63f5cb1ea1e82 /packaging | |
parent | 2d4725cfa6f93c5cf9e355b3b1ad199e7518b531 (diff) | |
download | samba-2712b8854b4eb01ba5b79141d001d53c043d1413.tar.gz samba-2712b8854b4eb01ba5b79141d001d53c043d1413.tar.bz2 samba-2712b8854b4eb01ba5b79141d001d53c043d1413.zip |
r3398: fixing up solaris packaging for 3.0.x
(This used to be commit 7b66980f4fbeac66ea8c3e9c32f1543df923a4a5)
Diffstat (limited to 'packaging')
-rw-r--r-- | packaging/Solaris/makepkg.sh | 219 | ||||
-rwxr-xr-x | packaging/Solaris/makepkg.sh.tmpl | 182 | ||||
-rw-r--r-- | packaging/Solaris/pkg-specs/pkginfo | 12 | ||||
-rw-r--r-- | packaging/Solaris/pkginfo.master | 6 | ||||
-rw-r--r-- | packaging/Solaris/postinstall | 6 | ||||
-rw-r--r-- | packaging/Solaris/preremove | 4 | ||||
-rw-r--r-- | packaging/Solaris/prototype.master | 47 | ||||
-rwxr-xr-x | packaging/Solaris/samba.init.master (renamed from packaging/Solaris/samba.server.master) | 0 | ||||
-rw-r--r-- | packaging/Solaris/smb.conf.default | 288 |
9 files changed, 530 insertions, 234 deletions
diff --git a/packaging/Solaris/makepkg.sh b/packaging/Solaris/makepkg.sh new file mode 100644 index 0000000000..598dd641fe --- /dev/null +++ b/packaging/Solaris/makepkg.sh @@ -0,0 +1,219 @@ +#!/bin/sh +# +# Copyright (C) Shirish A Kalele 2000 +# Copyright (C) Gerald Carter 2004 +# +# script for build solaris Samba package +# + +SBINPROS="smbd nmbd winbindd swat" +BINPROGS="findsmb nmblookup pdbedit rpcclient smbclient smbcquotas smbspool smbtar tdbbackup testparm wbinfo net ntlm_auth profiles smbcacls smbcontrol smbpasswd smbstatus smbtree tdbdump testprns" +MSGFILES="de.msg en.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" + +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 $VFSLIBS; do + echo f none lib/vfs/$file 0755 root other + done + for file in $DATFILES; do + echo f none lib/$file 0644 root other + done + for file in $CHARSETLIBS; do + echo f none lib/charset/$file 0755 root other + done + + echo "#\n# libsmbclient\n#" + echo f none lib/libsmbclient.so 0755 root other + echo f none include/libsmbclient.h 0644 root other + + echo "#\n# nss_winbind.so\n#" + echo f none /usr/lib/nss_winbind.so.1=lib/libnss_winbind.so 0755 root other + echo s none /lib/nss_winbind.so.1=/usr/lib/nss_winbind.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 + + # Add the manpages + echo "#\n# man pages \n#" + echo d none /usr ? ? ? + echo d none /usr/share ? ? ? + echo d none /usr/share/man ? ? ? + + # 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 *.$i 2>/dev/null` + if [ $? -eq 0 ]; then + echo d none /usr/share/man/man$i ? ? ? + for manpage in $manpages; do + echo f none /usr/share/man/man${i}/${manpage}=docs/manpages/$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=swat/help/using_samba + for file in docs/*pdf; do + echo f none $file 0644 root other + done +} + +##################################################################### +## BEGIN MAIN +##################################################################### + +TMPINSTALLDIR=$HOME/build + +# Try to guess the distribution base.. +CURR_DIR=`pwd` +DISTR_BASE=`echo $CURR_DIR | sed 's|\(.*\)/packaging.*|\1|'` +echo "Assuming Samba distribution is rooted at $DISTR_BASE.." + +## +## first build the source +## + +cd $DISTR_BASE/source + +if [ "x$1" != "xnobuild" ]; then + ./configure --prefix=/opt/samba \ + --with-acl-support \ + --with-included-popt \ + --localstatedir=/var/lib/samba \ + --with-piddir=/var/run \ + --with-logfilebase=/var/log/samba \ + --with-privatedir=/etc/samba/private \ + --with-configdir=/etc/samba \ + && make + + if [ $? -ne 0 ]; then + echo "Build failed! Exiting...." + exit 1 + fi +fi + +make DESTDIR=$TMPINSTALLDIR install + +## clear out *.old +( cd $TMPINSTALLDIR; du -a | grep \.old$ | awk '{print "rm -rf "$2}' | sh ) + + +## +## 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}'` +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}'` +INSTALL_BASE=`dirname $BINDIR` +DOCDIR=$INSTALL_BASE/docs + +## +## copy some misc files that are ont done as part of 'make install' +## +cp -fp nsswitch/libnss_winbind.so $TMPINSTALLDIR/$LIBDIR/libnss_winbind.so +if [ -f nsswitch/pam_winbind.so ]; then + cp -fp nsswitch/pam_winbind.so $TMPINSTALLDIR/$LIBDIR/pam_winbind.so +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 "!SBINDIR=$SBINDIR" > prototype +echo "!BINDIR=$BINDIR" >> prototype +echo "!SWATDIR=$SWATDIR" >> prototype +echo "!CONFIGDIR=$CONFIGDIR" >> prototype +echo "!LOGFILEBASE=$LOGFILEBASE" >> prototype +echo "!LIBDIR=$LIBDIR" >> prototype +echo "!PIDDIR=$PIDDIR" >> prototype +echo "!DOCDIR=$DOCDIR" >> prototype +echo "!PRIVATE_DIR=$PRIVATE_DIR" >> prototype +echo "!INSTALL_BASE=$INSTALL_BASE" >> prototype + +cat 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/makepkg.sh.tmpl b/packaging/Solaris/makepkg.sh.tmpl deleted file mode 100755 index 0d4dc02d1c..0000000000 --- a/packaging/Solaris/makepkg.sh.tmpl +++ /dev/null @@ -1,182 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Shirish A Kalele 2000 -# -# Builds a Samba package from the samba distribution. -# By default, the package will be built to install samba in /usr/local -# Change the INSTALL_BASE variable to change this: will modify the pkginfo -# and samba.server files to point to the new INSTALL_BASE -# -INSTALL_BASE=/usr/local - -add_dynamic_entries() -{ - # Add the binaries, docs and SWAT files - - echo "#\n# Binaries \n#" - cd $DISTR_BASE/source/bin - for binfile in * - do - if [ -f $binfile ]; then - case $file in - CP*.so) - echo echo f none samba/lib/charset/$binfile=source/bin/$binfile 0755 root other - ;; - *) - echo f none samba/bin/$binfile=source/bin/$binfile 0755 root other - ;; - esac - fi - done - - # Add the scripts to bin/ - echo "#\n# Scripts \n#" - cd $DISTR_BASE/source/script - for shfile in * - do - if [ -f $shfile ]; then - echo f none samba/bin/$shfile=source/script/$shfile 0755 root other - fi - done - - # add libraries to /lib for winbind - echo "#\n# Libraries \n#" - if [ -f $DISTR_BASE/source/nsswitch/libnss_winbind.so ] ; then - echo f none /usr/lib/libnss_winbind.so=source/nsswitch/libnss_winbind.so 0755 root other - echo s none /usr/lib/libnss_winbind.so.1=/usr/lib/libnss_winbind.so 0755 root other - echo s none /usr/lib/libnss_winbind.so.2=/usr/lib/libnss_winbind.so 0755 root other - echo s none /usr/lib/nss_winbind.so.1=/usr/lib/libnss_winbind.so 0755 root other - echo s none /usr/lib/nss_winbind.so.2=/usr/lib/libnss_winbind.so 0755 root other - fi - - # add pam_winbind module to /usr/lib/security - if [ -f $DISTR_BASE/source/nsswitch/pam_winbind.so ] ; then - echo f none /usr/lib/security/pam_winbind.so.1=source/nsswitch/pam_winbind.so 0755 root bin - echo s none /usr/lib/security/pam_winbind.so=/usr/lib/security/pam_winbind.so.1 0777 root root - fi - - # add the .dat codepages - echo "#\n# Codepages \n#" - for file in $DISTR_BASE/source/codepages/*.dat ; do - bfile=`basename $file` - echo f none /usr/local/samba/lib/$bfile=source/codepages/$bfile - done - - # Add the manpages - echo "#\n# man pages \n#" - echo d none /usr ? ? ? - echo d none /usr/share ? ? ? - echo d none /usr/share/man ? ? ? - - # Create directories for man page sections if nonexistent - cd $DISTR_BASE/docs/manpages - for i in 1 2 3 4 5 6 7 8 9 - do - manpages=`ls *.$i 2>/dev/null` - if [ $? -eq 0 ] - then - echo d none /usr/share/man/man$i ? ? ? - for manpage in $manpages - do - echo f none /usr/share/man/man${i}/${manpage}=docs/manpages/$manpage 0644 root other - done - fi - done - - echo "#\n# HTML documentation \n#" - cd $DISTR_BASE - list=`find docs/htmldocs -type d | grep -v "/CVS$"` - for docdir in $list - do - if [ -d $docdir ]; then - echo d none samba/$docdir 0755 root other - fi - done - - list=`find docs/htmldocs -type f | grep -v /CVS/` - for htmldoc in $list - do - if [ -f $htmldoc ]; then - echo f none samba/$htmldoc=$htmldoc 0644 root other - fi - done - - # Create a symbolic link to the Samba book in docs/ for beginners - echo 's none samba/docs/samba_book=htmldocs/using_samba' - - echo "#\n# SWAT \n#" - cd $DISTR_BASE - list=`find swat -type d | grep -v "/CVS$"` - for i in $list - do - echo "d none samba/$i 0755 root other" - done - list=`find swat -type f | grep -v /CVS/` - for i in $list - do - echo "f none samba/$i=$i 0644 root other" - done - # add the .msg files for SWAT - echo "#\n# msg files \n#" - for file in $DISTR_BASE/source/po/*.msg ; do - bfile=`basename $file` - echo f none /usr/local/samba/lib/$bfile=source/po/$bfile - done - - echo "#\n# HTML documentation for SWAT\n#" - cd $DISTR_BASE/docs/htmldocs - for htmldoc in * - do - if [ -f $htmldoc ]; then - echo f none samba/swat/help/$htmldoc=docs/htmldocs/$htmldoc 0644 root other - fi - done - - echo "#\n# Using Samba Book files for SWAT\n#" - cd $DISTR_BASE/docs/htmldocs - -# set up a symbolic link instead of duplicating the book tree - echo 's none samba/swat/using_samba=../docs/htmldocs/using_samba' - -} - -if [ $# = 0 ] -then - # Try to guess the distribution base.. - CURR_DIR=`pwd` - DISTR_BASE=`echo $CURR_DIR | sed 's|\(.*\)/packaging.*|\1|'` - echo "Assuming Samba distribution is rooted at $DISTR_BASE.." -else - DISTR_BASE=$1 -fi - -# -if [ ! -d $DISTR_BASE ]; then - echo "Source build directory $DISTR_BASE does not exist." - exit 1 -fi - -# Set up the prototype file from prototype.master -if [ -f prototype ]; then - rm prototype -fi - -# Setup version from version.h -VERSION=PVERSION -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.server.master >samba.server - -cp prototype.master prototype - -# Add the dynamic part to the prototype file -(add_dynamic_entries >> prototype) - -# Create the package -pkgmk -o -d /tmp -b $DISTR_BASE -f prototype -if [ $? = 0 ] -then - pkgtrans /tmp samba.pkg samba -fi -echo The samba package is in /tmp diff --git a/packaging/Solaris/pkg-specs/pkginfo b/packaging/Solaris/pkg-specs/pkginfo deleted file mode 100644 index d24ecaefe8..0000000000 --- a/packaging/Solaris/pkg-specs/pkginfo +++ /dev/null @@ -1,12 +0,0 @@ -PKG=samba -NAME=SMB based file/printer sharing -ARCH=sparc -VERSION=3.0.0beta3 -CATEGORY=system -VENDOR=Samba Group -DESC=File and printer sharing for NT workstations -HOTLINE=Please contact your local UNIX support group -EMAIL=samba@samba.org -CLASSES=none -BASEDIR=/usr/local -INTONLY=1 diff --git a/packaging/Solaris/pkginfo.master b/packaging/Solaris/pkginfo.master index 33e7cdb471..2ab201dae9 100644 --- a/packaging/Solaris/pkginfo.master +++ b/packaging/Solaris/pkginfo.master @@ -1,12 +1,12 @@ PKG=samba -NAME=SMB based file/printer sharing +NAME=CIFS File and Print server ARCH=__ARCH__ VERSION=__VERSION__ CATEGORY=system -VENDOR=Samba Team +VENDOR=Gerald (Jerry) Carter, Samba Team DESC=File and printer sharing for Windows workstations HOTLINE=Please contact your local UNIX support group -EMAIL=samba@samba.org +EMAIL=jerry@samba.org CLASSES=none BASEDIR=__BASEDIR__ INTONLY=1 diff --git a/packaging/Solaris/postinstall b/packaging/Solaris/postinstall index 0b7f40a85d..9a21ae659c 100644 --- a/packaging/Solaris/postinstall +++ b/packaging/Solaris/postinstall @@ -9,12 +9,6 @@ You can configure Samba by creating a configuration file at ${BASEDIR}/samba/lib/smb.conf. For details on configuration, refer to the Samba man pages under ${PKG_INSTALL_ROOT}/usr/share/man and the documentation at ${BASEDIR}/samba/docs. - -BEGINNERS: -Beginners can also refer to the excellent "Using Samba" book published -by O'Reilly and Associates and officially supported by the Samba Team. -This book is supplied with this package and can be accessed at -${BASEDIR}/samba/docs/samba_book/index.html ___________________________________________________________________________ EOF diff --git a/packaging/Solaris/preremove b/packaging/Solaris/preremove index 28e8d75c29..7313b0074f 100644 --- a/packaging/Solaris/preremove +++ b/packaging/Solaris/preremove @@ -5,8 +5,8 @@ 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 $SMBD - [ ! -z "$NMBD" ] && kill $NMBD + [ ! -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 index 0863e158c3..7ae0ca06f5 100644 --- a/packaging/Solaris/prototype.master +++ b/packaging/Solaris/prototype.master @@ -1,8 +1,4 @@ # -# The static master prototype file for the Samba package. -# For files that can't be dynamically added to the prototype file at -# package build time -# # Information files. # i pkginfo=./pkginfo @@ -15,40 +11,33 @@ i r.swat=./r.swat # # Stuff that goes into the system areas of the filesystem. # -d none /etc ? ? ? +d none $CONFIGDIR ? ? ? d initscript /etc/init.d ? ? ? -f initscript /etc/init.d/samba.server=packaging/Solaris/samba.server 0744 root sys +f initscript /etc/init.d/samba=scripts/samba.init 0744 root sys d initscript /etc/rc3.d ? ? ? -s initscript /etc/rc3.d/S99samba.server=../init.d/samba.server # # Stuff to set up SWAT # d swat /etc/inet ? ? ? -e swat /etc/inet/services=packaging/Solaris/services ? ? ? -e swat /etc/inet/inetd.conf=packaging/Solaris/inetd.conf ? ? ? -# -# Create the samba subtree. (Usually /usr/local/samba ) +e swat /etc/inet/services=scripts/services ? ? ? +e swat /etc/inet/inetd.conf=scripts/inetd.conf ? ? ? # -d none samba 0755 root other -d none samba/var 0755 root other -d none samba/bin 0755 root other -d none samba/lib 0755 root other -d none samba/docs 0755 root other +# Create the samba subtree. # -# Stuff that goes into lib +d none $INSTALL_BASE 755 root sys +d none $DOCDIR 755 root other +d none $CONFIGDIR 755 root sys +d none $PRIVATE_DIR 700 root sys +d none $SBINDIR 0755 root other +d none $BINDIR 0755 root other +d none $LIBDIR 0755 root other +d none $LIBDIR/charset 0755 root other +d none $LIBDIR/vfs 0755 root other +d none $SWATDIR 0755 root other +d none $LOGFILEBASE 0755 root other +d none $PIDDIR 0755 root other # -d none samba/lib/charset 0755 root other -f none samba/lib/smb.conf.example=examples/smb.conf.default 0644 root other -d none samba/lib/regeditscripts 0755 root other -f none samba/lib/regeditscripts/NT4_PlainPassword.reg=docs/registry/NT4_PlainPassword.reg 0444 root other -f none samba/lib/regeditscripts/Win95_PlainPassword.reg=docs/registry/Win95_PlainPassword.reg 0444 root other -f none samba/lib/regeditscripts/Win98_PlainPassword.reg=docs/registry/Win98_PlainPassword.reg 0444 root other -f none samba/lib/regeditscripts/WinME_PlainPassword.reg=docs/registry/WinME_PlainPassword.reg 0444 root other -f none samba/lib/regeditscripts/Win2000_PlainPassword.reg=docs/registry/Win2000_PlainPassword.reg 0444 root other -f none samba/lib/regeditscripts/WinXP_PlainPassword.reg=docs/registry/WinXP_PlainPassword.reg 0444 root other # -# Random files -f none samba/docs/Samba-HOWTO-Collection.pdf=docs/Samba-HOWTO-Collection.pdf 0644 root other +f none $CONFIGDIR/smb.conf.default=scripts/smb.conf.default 0644 root other # -# Static part of prototype file ends. # diff --git a/packaging/Solaris/samba.server.master b/packaging/Solaris/samba.init.master index d8bea2421c..d8bea2421c 100755 --- a/packaging/Solaris/samba.server.master +++ b/packaging/Solaris/samba.init.master diff --git a/packaging/Solaris/smb.conf.default b/packaging/Solaris/smb.conf.default new file mode 100644 index 0000000000..5c06c445b3 --- /dev/null +++ b/packaging/Solaris/smb.conf.default @@ -0,0 +1,288 @@ +# 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 +# +# 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 + workgroup = MYGROUP + +# server string is the equivalent of the NT Description field + server string = Samba Server + +# 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 + printcap name = /etc/printcap + load printers = yes + +# It should not be necessary to spell out the print system type unless +# yours is non-standard. Currently supported print systems include: +# bsd, sysv, plp, lprng, aix, hpux, qnx +; printing = bsd + +# 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 = /var/log/samba/log.%m +# all information in one file + log file = /var/log/samba/log.smbd + +# Put a capping on the size of the log files (in Kb). + max log size = 50 + +# Security mode. Most people will want user level security. See +# security_level.txt for details. + security = user +# Use password server option only with security = server +; password server = <NT-Server-Name> + +# Password Level allows matching of _n_ characters of the password for +# all combinations of upper and lower case. +; password level = 8 +; username level = 8 + +# You may wish to use password encryption. Please read +# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation. +# Do not enable this option unless you have read those documents +; encrypt passwords = yes +; smb passwd file = /etc/samba/smbpasswd + +# The following are needed to allow password changing from Windows to +# update the Linux system password also. +# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above. +# NOTE2: You do NOT need these to allow workstations to change only +# the encrypted SMB passwords. They allow the Unix password +# to be kept in sync with the SMB password. +; unix password sync = Yes +; passwd program = /usr/bin/passwd %u +; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully* + +# Unix users can map to different SMB User names +; username map = /etc/samba/smbusers + +# 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 +; include = /etc/samba/smb.conf.%m + +# Most people will find that this option gives better performance. +# See speed.txt and the manual pages for details + socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 + +# 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 + +# Configure remote browse list synchronisation here +# request announcement to, or browse list sync from: +# a specific host or from / to a whole subnet (see below) +; remote browse sync = 192.168.3.25 192.168.5.255 +# Cause this host to announce itself to local subnets here +; remote announce = 192.168.1.255 192.168.2.44 + +# 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 + +# All NetBIOS names must be resolved to IP Addresses +# 'Name Resolve Order' allows the named resolution mechanism to be specified +# the default order is "host lmhosts wins bcast". "host" means use the unix +# system gethostbyname() function call that will use either /etc/hosts OR +# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf +# and the /etc/resolv.conf file. "host" therefore is system configuration +# dependant. This parameter is most often of use to prevent DNS lookups +# in order to resolve NetBIOS names to IP Addresses. Use with care! +# The example below excludes use of name resolution for machines that are NOT +# on the local network segment +# - OR - are not deliberately to be known via lmhosts or via WINS. +; name resolve order = wins lmhosts bcast + +# 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 built-in default for versions 1.9.17 is yes, +# this has been changed in version 1.9.18 to no. + dns proxy = no + +# Case Preservation can be handy - system default is _no_ +# NOTE: These can be set on a per share basis +; preserve case = no +; short preserve case = no +# Default case is normally upper case for all DOS files +; default case = lower +# Be very careful with case sensitivity - it can break things! +; case sensitive = no + +#============================ 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 = /home/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 = /home/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 = /var/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 +; read only = yes +; 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 + + |