[SLUG] smb.conf

From: steve (steve@itcom.net)
Date: Wed Nov 21 2001 - 17:46:28 EST


As promised (though a day late) here's my samba config file, and a script to
add users.

This conf files makes my linux box act as the PDC.
All accounts have been added (withour pw) to linux.
Then added to samba with 'smb adduser'. Though I have a script to does it.
(Your setup may add a home dir for you, I have user names that don't have a
home so mine does not add it automatically, thus I do it in this script.)
---------------------------------------------------------
#!/bin/sh
# museradd
# Script to add users to both unix and samba.
Param1=$1
if test $Param1 != "" ; then
  echo
else
  echo "Need a name to add!"
  exit 1
fi
echo "Adding $Param1 to Unix"
useradd $Param1
echo "Adding $Param1 to Samba"
/usr/bin/smbadduser $Param1:$Param1
echo "Creating $Param1 home dir..."
mkdir /home/$Param1
cp /home/admin/netlogon.bat /home/$Param1
chown $Param1: /home/$Param1 -R
chmod 770 $Param1
vdir /home
----------------------------------------------------------
# smb.conf
# Global parameters
[global]
        workgroup = MOM
        netbios name = M10
        #netbios aliases = Util
        server string = NT4.%v on %L
        #log level = 10
        log file = /var/log/samba/log.%m
        debug level = 2
        interfaces = eth0
        bind interfaces only = yes
        hosts allow = 10.125.64.
        security = domain
        encrypt passwords = Yes
        update encrypted = Yes
        min passwd length = 8
        domain logons = Yes
        logon script = netlogon.bat
        logon path = \home\%U
        #logon drive = U:
        name resolve order = host lmhosts bcast
        keepalive = 30
        domain master = True
        preferred master = True
        os level = 70
        kernel oplocks = No
        ;include = smb.conf.%u

; necessary share for domain controller
[netlogon]
        path = /home/%u
        writeable = no
        write list = steve, admin
        browseable = no

[homes]
        comment = home-directory
        read only = No
        create mask = 0750
        browseable = No

[pgms]
        comment = Pgms
        path = /usr/share/pgms
        read only = yes
        browseable = yes

[shared]
        comment = Shared
        path = /home/shared
        read only = No
        create mask = 0660

-- 
 
Steve Szmidt
V.P. Information
Video Group Distributors, Inc.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:40:41 EDT