Home Networking With HALNet ADSL
Home       Print this page
Sharing Files Between Windows and UN*X

     Samba gives UNIX like operating systems the ability to talk NetBIOS (the Windows network protocol), therefore allowing them to share files and printers as if they were Windows computers. The main purpose for most people to set up a Samba box is to allow Windows machines to store files in a safe and secure location and to have a central place from which to backup their files. What better way than somehing that's free.
     You can make a Client with only a few lines in the Samba config file (usually /usr/local/etc/smb.conf) as with "Shelac" (pII 333 running FreeBSD 4.7), my laptop:

[global]

server string = Shelac Laptop
log file = /var/log/log.%m
max log size = 50
security = share
socket options = TCP_NODELAY
     Or a Server like "Beastie" (p133 running FreeBSD 4.7), my backup server:
The first section defines the workgroup/domain that the machine belongs to, what it is pretending to be (NT, 95, etc), what hosts (in this case, network) to allow, and other general information about the purpose of the machine.

[global]

workgroup = mydomain      # Your workgroup name here
server string = Samba on Beastie
annouce as = NT Server      # See the smb.conf.default file for other options.
hostsallow = 192.168.1. 127.0.0.1      # Make sure your local network (entire 192.168.1.0-255 subnet) is all that can see your machine.
log file = /usr/local/samba/var/log.%m
max log size = 50
security = USER      # Set this to "SHARE" if you don't have a PDC on your network.
socket options = TCP_NODELAY
netbios name = beastie      # Your computer name here
domain admin group = @wheel
domain guest group = ipc$ nobody @guest
domain logons = no      # Only yes for a PDC
domain master = no      # Only yes for a PDC
preferred master = no      # Only yes for a PDC
local master = no      # Only yes for a PDC
os level = 64
dns proxy = no

This is still a part of the [global] section, but it's important enough to separate. This shows that there is a PDC and it's called "Sparky". If you don't have a PDC then you can set this to your own machine name.

## Passwords & Authentication

password server = sparky
encrypt passwords = yes

These are all of my filesystems that are shared to the Windows computers on my network. This is where you would define the users that have access to what shares and what they are used for. There is a download directory for.. you guessed it. The backup directory is a safe place to put files. They will automatically by copied to the jaz directory (external SCSI 1gb jaz disk) at 4am using cron(8). You can specify any path in your filesystem here to share, however beware of what you make available to others.

## Share Definitions
[download]
comment = Download on Beastie
browseable = yes
writeable = yes
valid users = root bishop steph      # Various users you want to allow access to your share.
path = /download

[backup]
comment = Backup on Beastie
browseable = yes
writeable = yes
valid users = root bishop steph
path = /backup

[jaz]
comment = Jaz on Beastie
browseable = yes
writeable = yes
valid users = root bishop steph
path = /jaz
     For more information on Samba, please visit www.samba.org and see my "PDC with Samba on UN*X" page.



Join HAL-PC
http://www.hal-pc.org
4543 Post Oak Place Dr. Suite 200
Houston, Tx 77027-3103
713/993-3300



This site is designed to be of some assistance, however is not meant to be your sole source of information. By following the suggestions given on this page you understand that you do these things at your own risk. The steps mentioned here may or may not work for your purposes. There is no warranty or support of any kind provided by HAL-PC for the topics discussed in this site. The only support for your home network that is given is by me personally, at my choosing, on my own time, and via email only.
I know... I hate disclaimers too.

[Powered by FreeBSD]