# SMB.CONF 1.00 # Amazon Computer Consulting, Toronto, Ont. # teddymills@hotmail.com # Global parameters [global] workgroup = Workgroup netbios name = pirahna domain master = no os level = 15 # wins server = 192.168.0.1 # domain logons = yes # domain controller = starfire # hosts allow = 192.168.0. 127. # wins support = yes server string = Pirahna Samba Server 2.07 interfaces = 10.10.10.1/24 encrypt passwords = yes security = user guest ok = yes password server = 10.10.10.1 smb passwd file = /etc/smbpasswd log file = /var/log/samba/log.%m max log size = 50 printcap name = /etc/printcap load printers = yes getwd cache = yes socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 logon script = /scripts/logon.bat [system] comment = Pirahna root valid users = root tmills Administrator writeable = yes create mask = 0774 path = / [tmp] comment = Pirahna Tmp directory path = /tmp writeable = Yes guest ok = Yes [cdrom] comment = Pirahna cdrom path = /cdrom guest ok = Yes [home] comment = Pirahna home folders path = /home writeable = Yes create mask = 0774 # If you already have a WINS server comment out the WINS SUPPORT # and enable WINS SERVER with the ip of your current wins server. # WINS SERVER makes Samba a client of your current WINS server. # If you do not have a WINS server then leave WINS SUPPORT=YES because # WINS is cool. Enable it and tell all your Windows boxes that the # WINS server is your Linux server 192.168.0.10.(TCPIP properties>WINS tab) # Then browsing on the entire Windows network is much faster. # Any Windows network over 10 pcs, should have a WINS server anyway. # Keep the Linux(DNS) Hostname the same as the NETBIOS name above. # Samba by default will make the Netbios name the name of # your linux server. I include Netbios name option just to be sure. # It is possible to set Samba to a different Netbios (windows) # computer name than your linux (DNS) name, by why bother? KISS! # If you already have a Domain Controller, then I would comment out # the DOMAIN MASTER and OS LEVEL options. # Wheather you have a domain, or a workgroup, that is the workgroup name. # ONLY IF you have a domain, don't forget to add the NETBIOS computer name # of the Linux Samba server to NT Servers >Administrative Tools>Server Manager. # Computer>Add to Domain>WindowsNT or Workstation and enter your # Linux boxes NETBIOS name. You must do this before Samba will work in your domain. # Don't forget to SYNC the Domain if you have to. # I authenticate using my Linux box (you can authenticate using an NT server, just # set password server=x.x.x.x to your NT server. Authentication means checking your # username and password with some server. # If you have a Windows Workgroup (Win95/98/ME workgroup etc.) no worries mate # just change the workgroup name # The whole gist of everything here is to make # Windows, Servers,LINUX PASSWD and SMBPASSWD all use the same USERNAME and password. # If you have a domain, make sure to add this Linux box # As a normal security measure, I RENAMED my Administrator # account (NT) to "root". NT like unix provides the superuser # access based on the SID(NT) and UID=0 GID=0 for Unix. The names # "root" and "Administrator" is not what provides the superuser # access. I did this because it makes NT more secure, and my # Linux box and NT now are using the same superuser account. # Now I can create and delete folders/files from Samba. # I find that I usually have to make an empty file to create my # /etc/smbpasswd file. cd /etc then cat >smbpasswd, press return a few times, # then control -c. # passwd username (set the password for the username # smbpasswd -a (set the samba password -a adds the account if not there # make sure the smbpasswd is the same as unix passwd. # Lastly make sure that your Windows or NT server is using USERNAME and # the same password. # "Network not found" some things to try # 0) Use this script as your smb.conf and restart. # 1) Set encrypt passwords=yes # 2) make password server=192.168.0.10 (my Linux server) # I used to authenticate on a NT server, but like a good # teacher once said, keep it simple. Now I auth using Linux # 3) Delete and recreate your smbpasswd file # 4) passwd username, then smbpasswd -a username, # 5) Reboot the Linux and the Windows boxes. # 6) Add the Linux server to /etc/hosts on the Linux server # 7) Add the Linux server to LMHOSTS file on each Windows box. # 8) Enable Linux WINS, then enabling WINS on each Windows box. # 9) Try enabling Wins via DNS on the Windows boxes # please don't forget to restart your SAMBA after a change~ # /etc/init.d/smb stop # /etc/init.d/smb start # another dumb one I do often is forgetting to mount the cdrom on Linux # before using it in Samba. (I wish this could be automated, automountd??) # I often have to DISCONNECT the cdrom drive mapping to eject the cdrom. # It says it is busy. So I wrote a logins.bat and saved it on my desktop. # login.bat # net use x: \\192.168.0.10\system # net use y: \\192.168.0.10\cdrom # net use z: \\192.168.0.10\home # When umounting a filesystem or other media, no one not even root, can be # in that media otherwise it cannot umount that filesystem or cdrom. # I use fuser ie..fuser /cdrom to see who is using it. # Lastly, # Remember you cannot add directory shares to SMB.CONF unless # these directories actually exist. # and remember to use CHMOD on your samba files/directories to get # and set the permissions. # The UNIX PERMISSIONS OVERRIDE the SMB.CONF PERMISSIONS. # Email # teddymills.hotmail.com # Amazon Computer Consulting # with corrections, constructive comments or kudos if this has # helped you out.