tkSamba 0.2a
============

1. What is it?
2. Preconditions
3. Installation
4. Operation
5. Etc.


1. What is it?

This tck/tk program offers a graphical interface to some of the
facilities offered by samba and smbfs.  It is intended for people who 
run Linux, but need to talk to NT servers (etc.) on a network.
The graphical interface allows you to "browse", connect to, and
mount shares in a manner not too different from MS Windows.  


2. Preconditions

You need a functioning Samba (I have 1.9.15 p8), with smbclient and 
nmblookup available.  Also a functioning tk (I have tcl 7.4 and 
tk 4.0).  And if you want to mount shares, you need [k]smbfs.  
Note that smbfs support is (optionally) built into Linux kernel
2.0.0.  The smbmount and smbumount programs can be found in the
package smbfs-0.4.tgz (on Sunsite and mirrors).  


3. Installation

Not much to it.  Hopefully, just edit some lines near the top of
tkSamba.

Editing tkSamba:  This should be fairly self-explanatory if you look
at the section headed "User-configurable variables".  You need to
supply username and password...

  Security note: since tkSamba will contain your password, it must be
  private.  "Privatize" it manually, or run the script secure.sh.
  I guess encryption would be better, but I don't know how to do
  that %-).

...and the names of one or two servers to start from.  

You are asked for both a "global" and a "local" server.  You don't have 
to fill in both.  At my university, for instance, there is one machine 
at University level that offers a bunch of shares, and I have this 
machine as my "global" entry.  I'm also a member of a departmental 
workgroup, and I put a server that knows about that in as my "local" 
entry.  

You have the option of supplying a couple of pre-defined "special" 
commands.  I use these as means of connecting to a couple of network 
printers (using the -P option with smbclient).  For instance, in
place of "shell_script.1" I have "exec xterm -e hpIIp", where the
shell script hpIIp reads thus:

  #!/bin/sh
  ipaddr=`nmblookup ecnprint | grep ecnprint | sed /ecnprint/s///`
  # Can't rely on constancy of IP numbers around here.
  echo $ipaddr
  smbclient "\\\\ecnprint\\ecnlaser" -I $ipaddr -P -Uuser%passwd

Next come a couple of items having to do with smbfs.  If you
choose to mount a share (via the mouse -- smbmount is invoked),
tkSamba will create a mount-point on the fly: you need to supply
a 'base' directory for this.  The default is /mnt.  You may also
want/need an additional command string to be passed to smbmount.
An example is found in tkSamba.  Read the manpage for smbmount for
details.  

Then there's an option for setting the type of terminal you want
to invoke for smbclient or smbfs connection.  The default is
color_xterm.

Also note that if wish does not reside in /usr/bin you may have to 
edit the first line of tkSamba.  The most likely other place is 
/usr/local/bin.


4. Operation

Should be self-explanatory.  Choose "global" versus "local" with
the radio buttons; click on "Shares" to get a listing of the shares
available on the chosen machine.  

The shares window should contain one or two lists.  The first is
a listing of shared resources (directories, printers) on the
given machine.  The second (if applicable) is the machine's
"browse list" -- that is, a listing of further machines that (may)
also offer shared resources.  

The elements of both of these lists should be "hot".  If you move 
the mouse-pointer over the names in the left-hand column they will
display in red.  With a name thus highlighted, you can:

  1. Press mouse button 1.  This will start an smbclient session
     with connection to the given resource, if the resource is a
     share, OR will open a new shares window, if the highlighted
     element is a member of the browse list.

  2. Press mouse button 3.  This will invoke smbmount to mount
     the given resource (smbfs).  Note that this will work only
     for actual shares, and not for elements of the browse list
     (if any).  Creation of a mount-point is done on the fly.
     A base directory is supplied in the user-configurable section
     of tkSamba (see above) -- the default mount-point adds the
     name of the machine and resource.  For instance, if I accept
     the default base of /mnt, and I'm mounting a directory called
     "common" on a machine named "bigserv", then the default mount-
     point will be /mnt/bigserv/common.  You get the option of
     changing this on pressing button 3.  You also get the option
     of opening an xterm pointing at the mounted share.  


5. Etc.

Rights and all that: GNU rules.  

This is a prototype, and could be more sophisticated (though
it serves my present purposes quite well).  One extension is
fairly obvious, and I might get around to it sometime.
At present, the smbclient connection is not automatically responsive 
to the type of the share.  That is, the program won't detect if the
share is a printer and use the -P option.  That could be fixed.

I have not tested tkSamba on any system other than my own, at this
point.  I hope it is reasonably portable.  I should perhaps
mention one point that could cause dificulty: this relates to 
name lookup.  At my university, the "global" Samba server is a
unix box, and doing an nmblookup on it will fail.  On the other
hand, it is also unnecessary, since the server's address is stable and
known to my machine.  In tkSamba, therefore, it is assumed that the 
address of the "global" server is known, and nmblookup should not
be performed.  But the IP numbers of machines "below" this server are 
looked up on the fly.  With regard to the mounting of shares, I
presume that machines holding resources that you are able to
mount will be sufficiently well known to your machine that a name
lookup is not required.  


Allin Cottrell
Wake Forest University
cottrell@wfu.edu

17 July, 1996.


