Samba and SWAT

By Kevin Herring, published on December 28, 2005
Source: Tom's Guide US | Keywords: , , , ,

3. Samba and SWAT

The first thing we are going to set up is Samba, as this is what enables us to share the files in our big disk over our Windows network. SWAT (Samba Web Admin Tool) enables us to configure Samba over a nice web interface instead of digging through the samb.conf file that stores all the Samba settings. Have a quick read of the SWAT help files here.

To enable SWAT, we need to add it to our /etc/inetd.conf file, so type:

vi /etc/inetd.conf

At the bottom of the config file, there should be the following line:

swat stream tcp nowait.400 root/usr/sbin/tcpd /usr/sbin/swat

It might be in there, but commented out with '#'. Either way, make it's there and not commented out. Also, check for a lines referring to smbd and nmbd, but probably commented out. At any rate, before you close the file, make sure that you have the following lines at the bottom of your file:

netbios-ssn stream tcp nowait root /usr/sbin/smbd smbd
netbios-ns dgram udp wait root /usr/sbin/nmbd nmbd

Now restart your networking with:

/etc/init.d/inetd restart

This will enable Samba networking and the netbios IP naming. Once this is running, you will be able to refer to your Xbox with its DNS name (that you chose in the installation process, probably 'xbox') as well as its IP.

Now with your PC's web browser, go to http://ipaddress:901/ (again, using your own Xbox's IP address) and if all goes well, you should see an admin web page. Click on the Status button at the top and you should see that smbd and nmbd are running. If not, you probably did something wrong earlier, so go back and recheck the edits to the /etc/inetd.conf file.

Now click on Shares, type in a name (e.g 'samba_share'), and click Create Share. You will then be presented with a list of options about your new share. Change 'path' to the name of the directory that you mounted your hard drive into earlier, e.g. '/samba_share'. Now turn off read only, turn on guest ok and click Commit Changes. The result of all this created a share that is available as read and write for everyone. If you want to add specific privileges for users, then you'll need to add them to this page.

If you now go to your Windows PC and browse your workgroup, you should see an entry for your Xbox. Expand the icon and you should see your share, plus some other stuff like printers. For convenience, you can map the share to a drive letter (I chose 's') on each of your Windows machines.

Well done! You have completed the second step of your project!

Comments | Print | Send to a friend

Sponsored links

Comments

Anonymous 11/28/2007 6:20 PM
Hide
-0+





OK, so now when you boot into Linux and SSH to your Xbox you should have a folder called

How To: Convert your Xbox to a NAS - Part 2 : Read more

Anonymous 01/03/2008 1:14 PM
Hide
-0+

Hi, Just have one question, how do you create the database? Doesn't work with just typing "mysqladmin create torrentflux", it just says "access denied for user 'root'@'localhost'"
pls advice!
/Schatz

Anonymous 01/03/2008 1:16 PM
Hide
-0+

Sorted it myself.
mysql -u root -p

Anonymous 09/19/2008 9:45 AM
Hide
-0+

I think you are missing two very important software to install.

apt-get install libapache-mod-php4
apt-get install php4-mysql
otherwise it will not render php in apache and connect to the db

Comments are closed on this page.

Sponsored links