Windows Networking (WON)
Easily the most anticipated addition to BeOS R4.5 is its Windows networking
support. Actually, I use the term "support" lightly since this feature is
in the /optional/experimental folder. In future versions of BeOS,
Windows networking services will be integrated into the Network preferences
panel. For now, however, you'll have to set up a few things on your own,
and you may or may not be successful at accessing shared volumes on your
local network. In all likelihood, you'll find that things work out nicely
on Windows 95/98 networks, but you may encounter problems on Windows NT
networks, where security is tighter.
Be's implementation of Windows networking is called "World O' Networking,"
or WON for short. As described in The BeOS Bible, WON is based on
CIFS, or Common Internet File System, which is a superset of SMB (Server
Message Block). SMB is built into every copy of Windows, so you won't need
to do anything special on the Windows side. The Linux/FreeBSD
implementation of SMB is known as Samba; BeOS should be integrated into
Linux networks running the Samba server as well.
In a nutshell, WON in R4.5 works like this: Launch
/optional/experimental/WON/WONSetup. Select the File and Printer
Sharing box and (optionally) the Show hidden mounts box. This last option
exists because in many networks, there are a number of shared volumes that
are available to users but not shown by default. Enter the name of your
workgroup (NT users, use the name of your domain). If you don't know the
name of your workgroup, look at a Windows machine on the same network,
right-click Networking, choose Properties, and select the Identification
tab. Without this workgroup name, you won't be able to access anything. If
you're unsure, just enter WORKGROUP. Then enter your username and, if
available, your password. Click Done, restart networking, and a World O'
Networking icon will appear on the Desktop.
You can now browse your network just as if it were any other mounted disk
volume. Network shares will be available from the Open/Save panels in all
of your applications. And because the BeOS print layer is now
network-aware, you'll be able to print to printers on the local network as
well. Just select a shared printer from the WON folder, and the BeOS
Printer preferences panel will appear.
For the vast majority of Windows 95/98 networks, this should be all you
need to know. Happy browsing! If you're not able to mount remote shares,
Mounting Shared Volumes Individually
If for some reason you're not able to browse the network (for
password-authentication or other reasons), you may have better luck
mounting specific volumes, via the cifsmount or ezmount
commands. The network browsing functions in R4.5's WON implementation are
not well tested, so you may have better luck by simply mounting the volumes
you need rather than trying to access the entire network.
cifsmount and ezmount are essentially identical in
function, but ezmount makes things a little easier by not
requiring you to manually establish a mount point beforehand.
cifsmount's syntax is
cifsmount \\\\SOMESERVER\\ASHARE USERNAME PASSWORD LOCALMOUNT
where LOCALMOUNT is the name of a pre-established directory in the
root of your file system into which you want the remote share mounted. For
example, let's say you want the remote share to appear on the Desktop as
volume named "Louise." You're connecting to a server named "Homer," and on
this server is a share named "Marge." Your username is "Gomer" and your
password is "Pyle." You would use cifsmount by creating a
directory in the root of your file system called "Louise," and then typing:
cifsmount \\\\Homer\\Marge Gomer Pyle /Louise
Note: Because Windows does funky things with filename cases, you may
need to experiment with the above command, using HOMER instead of Homer,
Once you've got that down, you can make things easier on yourself by using
the ezmount command, which creates the mount point in the root of
the file system for you, naming it after the shared volume.
ezmount doesn't require all the tedious backslashing, either. For
ezmount HOMER MARGE GOMER PYLE
should have the same effect, but you'll find the shared volume mounted at
/MARGE. However, you can't use ezmount to mount multiple
remote shares. If you need to mount only a single remote share, it's fine.
If you need to mount several of them, use cifsmount. Once you've
got cifsmount dialed in to do what you want it to do, add your
cifsmount commands to ~/config/boot/UserBootScript so it
will run automatically at boot time.
To unmount a shared volume, just use the standard unmount command,
as you would with any other disk volume (e.g. unmount MARGE), or
right-click the volume on the Desktop and choose Unmount from the context
Accessing Your BeOS Machine from the Network
It's a two-way street, of course, and you may want to access shared folders
on your BeOS machine from Windows or Linux machines as well. To do this,
you'll need to walk a few extra feet and install the Samba server for BeOS
(again, this is officially unsupported and should become much easier in a
future release of BeOS).
Note: The version of Samba included on the BeOS R4.5 CD is not
complete, and many users have been unable to get it to run properly or
consistently (this author included). Be intends to make updates available,
so keep your eye on the BeOS news sites and on www.be.com for more
information. Unfortunately, the authors of The BeOS Bible cannot
offer support for this unsupported BeOS software. Your best source of
assistance will probably be other BeOS users in online forums such as the
Usenet group comp.sys.be.help and the beusertalk mailing list. Concrete
suggestions on improving this documentation are very much welcome.
Samba for BeOS is a port of freely available source code from the Unix/Linux world, and is protected by the GNU public license. You'll need to
compile and configure it yourself to get up and running. Don't look for it
in the WON folder though; it isn't there. Instead, insert the BeOS
installation CD and mount its Windows partition (called "BeOS Tools").
Navigate to the GNU folder and drag the file samba-1.9.18p7.tgz to
your Desktop or anywhere in the Tracker. Set its filetype to
application/x-tgz, double-click it, and let Expand-o-Matic
decompress the archive.
Inside, you'll find several folders and a file called
make-samba-for-beos. Open a Terminal, cd to this folder,
and run this script. Your machine will crunch away merrily for quite a
while as the Samba server is compiled. When complete, you'll see the lines
Password not set
Samba has been installed
Now to configure your server. Use the Tracker to open
/boot/beos/system/servers, and you'll find a new folder called
samba, and inside this, a directory tree. Of interest to you here
is a file called smb.conf living in the lib directory.
Open /boot/beos/system/servers/samba/lib/smb.conf in a text editor
and have a look.
smb.conf comprises a lengthy listing of configuration options that
let you define what on your machine is to be shared and with whom you're
willing to share. It lets you define workgroup names, allowable host
addresses, home directories, read/write permissions, and more. The file is
heavily commented (commented lines begin with a semicolon) and contains
tons of explanatory notes and samples you can copy and paste to build your
own custom configuration. The file is divided into sections called [global]
(for settings that affect everyone and everything), [printers] (for sharing
printers, probably not much of an issue for BeOS users just yet), [Space]
(for creating sharable file spaces), and several more obscure options.
Before you get anywhere with Samba, however, you'll need to make sure your
machine is identifiable on the network, so that Windows' Network
Neighborhood will be able to see you. If your network has a DNS server, you
can add your machine's IP address to the DNS tables. This isn't an ideal
solution, however. A much better tactic is to enter your machine's hostname
into the BeOS hosts file (/boot/beos/etc/hosts), as
described on pp. 480-481 of The BeOS Bible. Without this
information, the nmbd (name binding) daemon will fail at startup,
even if you have a hostname specified in the Network preferences panel.
Once you've got that business taken care of, create entries in
smb.conf that define shares for your machine. For example, you may
want to uncomment, edit, or type in lines to create a file looking
something like this:
log file = /boot/beos/system/servers/samba/log.%m
server string = BeOS
preserve case = yes
case sensitive = yes
; the following machine should be the IP address of your own machine
interfaces = 192.168.0.4
comment = File space
path = /boot/home
public = yes
writable = yes
allow hosts = 192.168.0.3
Restart networking, and you should be able to access your home
folder from the machine on the network at the address 192.168.0.3. If you
leave the "allow hosts" line out, your home folder should be accessible to
all machines on the network.
Warning: You must take security seriously here. If you choose not to
use the "allow hosts" line, all the machines on the network will have
access to the specified folder. If you have real, fixed IP addresses on
your network, i.e., those outside the 192.168.X.X range, the contents of
that folder may be accessible to the entire Internet. Be cautious!
Samba is a large and complex service, with many options and possibilities.
If you want to learn more about it, search the Internet for "Samba" or pick
up a book such as O'Reilly's excellent guide