Date: December 17th 2006

Subject 01: AMIGA NETWORKING : Samba and SWAT

Entry 0017: Blogs: 1


SAMBA AND SWAT
Hi

In a recent post someone asked..

Ever wondered what SWAT stood for? Find out instantly:

http://www.acronymfinder.com

If you have your Amiga networked like I do you  really can`t 
avoid SWAT... Because in Amiga terms.. 

[ quote ]

SWAT: The acronym SWAT stands for Samba Web 
Administration Tool. It is used to provide a web interface 
to configuring smb.conf. It gives the flexibility of dynamically 
altering the configuration file to reflect changes in needs 
with respect to shares and printers. This is done from a 
remote location with the aid of a web browser.

[ end quote ]

There are a number of components that work together
in the SAMBA world of Amiga networking. 

Other components are...

SMBD.. The SMB server handles connections from clients, 
performing all the file, permission, and username authentication. 
NMBD The NetBIOS name server advertises Samba on the network, 
and helps clients locate servers. 
SMBCLIENT Client program on host. 
SMB.CONF Samba runtime configuration file. 

SMB means Session Message Block (Samba) Or does it ?
It also can mean Server Message Block.. In truth they are
the same thing. And it is the smb.conf file that is essential
to the SWAT side of things........

The smb.conf file is a configuration file for the Samba suite. 
smb.conf contains runtime configuration information for the 
Samba programs. The smb.conf file is designed to be configured 
and administered by the SWAT program. The complete description 
of the file format and possible parameters held within are here for 
reference purposes. 
 
And so to that Session Message Block ... means ?

A Session Message Block is a data packet sent by the SMB protocol 
to tell the client or server what to do. 

If you study the subject you discover also that SMB Protocol stands for 
Server Message Block, which is a protocol for sharing files, printers, 
serial ports, and communications abstractions such as named 
pipes and mail slots between computers. 

Session Message Block  or  Server Message Block .. ?
Are they the same...

Yes they are ....

SMB runs at a higher level on top of other network protocols 
such as TCP/IP, NetBEUI, or IPX. A new version of SMB, 
Common Internet File System or CIFS, has been developed 
by Microsoft for "open" use on the Internet. 

Also Known As: Server Message Block, Session Message Block, CIFS 

NMBD is more fascinating.. .This program simply listens for such 
requests, and if its own name is specified, it will respond with the 
IP address of the host on which it is running. Its "own name" is, 
by default, the name of the host on which it is running.

NMBD is part of the Samba Suite

nmbd -- NetBIOS name server to provide NetBIOS over IP naming services to clients

... Sounds complex... not really.

When running SAMBA on the Amiga you first need to fire up
a piece of software like Miami or Genesis, and simply initiate
the software and put the network adaptor online. Having done
this you run your NMBD script and like magic your Amiga will
appear on the Network. To instigate a network link you run
another script, which can be automatically activated when
you put your network device online. In each instance you
can create your own script to activate the ....

Example... I am on this Win98 machine which I call Regina..
I just tracked down the stairs and put the Amiga on line...
Having just looked in the RAM/T drawer on the Amiga from
this Win98 machine I find... ' samba.regina '

[2006/12/17 01:07:14, 1] smbd/service.c:(550)
regina (192.168.0.15) connect to service all as user pcguest (uid=586, gid=99) (pid
1463515272)

When I fired up the Amiga Network to look on the PC I used my 
own script which reads...

Wait 8
Run SMBFS Volume="DriveD" Workgroup=regina user=scuzz Service=//regina/D/Amiga

Strangely with the Amiga the name of the computer can also 
be used as the Workgroup, unlike the PC. I did struggle with
Workgroup until I used the actual PC computers name.

This finds the DriveD on my PC Network. and puts an icon on my 
Amiga Workbench so I can access the files on the PC. To see the
Amiga on the PC, however, I run my NMBD script from the Amiga
which puts the Amiga onto the network.

Wait 8
run >nil: samba:bin/nmbd -D
run >nil: Miami:MiamiSysCtl -w inetd.toomany=50

These are very small scripts which I save as such and then
leave out on the Workbench.

Olaf Barthel has a very good HELP file on Aminet... when
he explains the SMBFS program.

1. What is it?

This document briefly describes the SMBFS program, which 
implements an SMB file system for AmigaOS. This file system 
can be used to access files made available by file servers 
which implement the SMB  protocol, such as 'Microsoft Windows' 
or any other platform which supports the free 'Samba' product. 
These files can be accessed using shell commands such as 
'List', the Workbench or utilities such as 'Directory Opus' 
as if the file server were a local disk drive.

2. What do you need to get started?

You need a TCP/IP stack that supports the AmiTCP V3 API, 
such as 'Miami', the original free 'AmiTCP 3.0' release, 
'AmiTCP 4.x', 'Miami Deluxe' or 'AmiTCP Genesis' and 
the obligatory networking gear. All these items need to be in
good shape and properly configured.

Most important, you need a computer which exports 
file sharing services using
the SMB protocol.

It often helps to have 'Samba' installed on your Amiga, 
too, as this can aid in tracking down bugs and obtaining 
information which SMBFS cannot obtain all by itself.

Last but not least, you need to be proficient in configuring 
and using the TCP/IP stack; networking knowledge is 
definitely assumed.

SMBFS requires AmigaOS 2.04 or higher to work.

.... And how do you run the SMBFS... well as I say 
having initiated the interface through Miami or 
Genesis you just need to run this small script which 
in essence consists of...

   Run >NIL: SMBFS Workgroup=yourworkgroup User=You Service=//sourcery/all

This would cause a new device by the name of "SMBFS:" 
to be mounted, showing all files and directories 
the 'sourcery' server makes available for sharing.

If you understand the way the Amiga mounts devices then this
works in exactly the same way. The result being that you add a
network drive to the Amiga, just like your own drives and this is
accessed in exactly the same way as your own drives. 

Saying all that... You do need a network card.

The only tricky part is writing the SMB configuration file. There
are examples with the Samba software, so you can`t really go
that wrong. You do seem to have several goes at this. Also you
do need to configure the ethernet interface in certain ways to
work with the software, and again there are examples on how
to do this ... I will dig mine out and show how. Not difficult.

And so , back to where we started... And to SWAT....

Name
swat -- Samba Web Administration Tool
Synopsis
swat [-s ] [-a]

DESCRIPTION
This tool is part of the Samba suite.

swat allows a Samba administrator to configure the complex 
smb.conf file via a Web browser. In addition, a swat configuration 
page has help links to all the configurable options in the 
smb.conf file allowing an administrator to easily look up the 
effects of any change. 

swat is run from inetd 

You do have to be careful because....

swat will rewrite your smb.conf file. It will rearrange the entries 
and delete all comments, include= and copy=" options. If you 
have a carefully crafted smb.conf then back it up or don't use swat! 

There you go... 

The original Samba software and related utilities were created by 
Andrew Tridgell. Samba is now developed by the Samba Team as 
an Open Source project similar to the way the Linux kernel is developed.

Fun with Amiga Networking 

scuzz
http://www.commodore-amiga-retro.com


DOMAIN PURCHASED scuzzblog
Hi

Having lost out to the obviously more popular ' scuzz '
rock channel, I decided today to check for owners of
the name ' scuzzblog '. Amazingly the very clever people
at scuzz hadn't thought to get the more common domain
names. I'm sure in time they will want to start a blog
even if they already haven't. And so it was today that
I purchased the two domains...

scuzzblog.co.uk and scuzzblog.com

When they start tickling up Google no doubt scuzz will 
take note. Infact if you Google scuzzblog today you will 
find these pages. Amazing really...... Whoo hoo !!!

scuzz
http://www.commodore-amiga-retro.com


scuzz site

If you can only see this CONTENT window
then click the image above for the full site

Last updated 16th December 2006

Chandraise Kingdom