Defcon1-Header
Tool-BarfreeBSD ArticlesSearch Our SiteHOMEfreeBSD LinksContribute to FreeBSD HelpFreeBSD FilesFreeBSD Script Corner

File sharing between windows and FreeBSD - (SMB Protocol)

There are many people wondering how to make their FreeBSD computer appear in "Network Neighborhood" on a Windows computer. The way to do this is by using the Samba software in your ports collection.

Samba is very easy to setup, but is very feature packed so I will only cover the basics.

1.) Become root and then cd /usr/ports/net/samba ; make install ; make clean

2.) Make a directory for where you want to store all the files.

  Most likely you will want your files stored in /usr somewhere. I chose /usr/share to store all my   files.

3.) vi /etc/services and add:
swat      901/tcp

4.) vi /etc/inetd and add:
swat  stream tcp   nowait.400   root /usr/local/sbin/swat swat

5.) killall -HUP inetd

6.) open a broswer and goto the url: http://localhost:901
  a.) login as root with the root password.
  b.) click on Globals (Click on Advanced View)
a.) name your workgroup (has to be the same for all the client computers too)
    b.) netbios name should be what you want it to be shown under Network Neighborhood
    c.) interface should be the network card connected to the LAN which you want to share   files with.
d.) encrypt passwords should be selected as Yes
  c.) click on Shares
a.) type Share next to the button Create Share then click that button.
b.) the path should be /usr/share
c.) read only should be selected as NO.
d.) make sure browsable and available is selected as YES.
  d.) click on Password
a.) add a user you want to be able to access your Shared files.
  (the user is the computer name you want to let access the server)

  e.) click on Status
a.) start SMBD and NMBD

By now you should see the server under your Windows machines if you have the network setup properly and have the Workgroup correct. You can edit the Workgroup by going to control panel -> network -> identification. You will need to reboot after you change the workgroup (no surprise from M$). There are many things you can do with the Samba software. Printer sharing and private access to everyone's own /home directories can be done.

Trouble Shooting:

1.) Make sure workgroups are the same on your server and your client machines
2.) Always restart SMBD and NMBD when you change any fields in SWAT.
3.) If you can't see the computer in Network Neighboorhood try using start -> find computers
4.) Make sure you have Client for Microsoft Networks installed on your Windows machines.
5.) Primary Network Logon should be set to Client for Microsoft Networks if you want it to access the   server without asking for your password everytime your access it.
6.) The computer name should be set to what you chose in the Password portion of SWAT.

READ THE MANUALS IF YOU ARE STUCK! Remember SWAT, SMBD, and NMBD are located under /usr/local/sbin/ unlike what it says in the MAN pages!

-prophet

© 1997 - 20013 Defcon1, www.defcon1.org , Copyrights for all materials on this web site are held by the individual authors, artists, photographers or creators. Materials may not be reproduced or otherwise distributed without permission of www.defcon1.org and the content's original author.

Defcon1-Header2
Tool-Bar-2Defcon1  Webmail