Updated on 12/16/96
Overview
Samba is basically a free implementation of the smb (Server Message Block)
networking protcols that are in Windows for Workgroups, Windows 95, and Windows
NT. Loading "samba services" allows a non-Microsoft operating system
to serve files and printers to Microsoft operating systems without loading any
special clients. See http://lake.canbera.edu.au/pub/samba/
for thorough information on Samba in general. There is also the
comp.protocols.smb newsgroup which is
helpful.
Samba grew up freely on the net and is available for a wide range of unix
operating systems. A version is now also available (without source) for NetWare
4.1 servers. The NetWare 4.1 version of samba (samba.nlm, naturally) is
currently in "beta" and is being put out by Novell Consulting
Services. This document gives thorough infomation (more so than Novell) on
setting up Samba services on a NetWare 4.1 server.
Novell Consulting Services (NCS) is responsible for the port of Samba to
NetWare 4.10 servers. NCS is responsible for those extra utilities and docs
that are somewhat outside of the normal NetWare product line. The main NCS
homepage is at http://www.novell.com/corp/programs/ncs/
and has other useful tools in addition to the recently added Samba port. Since
NCS activities are outside the usual Novell stuff, they request that you email
ncs_toolkit@novell.com with Migration
Tools in the subject line for any issues connected with the Samba NLM.
The samba.nlm stuff comes under the category of "migration tools"
and can be found at
http://www.novell.com/corp/programs/ncs/toolkit/migqt.html.
The Migration toolkit is a humongous archive of client software (in addition to
Samba) for migrating PC clients from NT servers to NetWare servers. The sheer
size (around 12Mb compressed) and the poor Samba documentation are the primary
reasons I've created this page and packaged up the Samba stuff into a small
archive.
Additionally, the migration toolkit documentation is in Envoy (*.evy files
as opposed to the *.pdf files for Acrobat) format. It is most easily viewed
with the Envoy plug-in for Netscape. Envoy plug-ins are available from
Tumbleweed Software at http://www.tumbleweed.com/
and versions are available for various flavors of Windows and Mac. (NT users,
such as myself, should use the Windows 95 version. The Netscape plug-in is also
the only way to view *.evy documents under NT without hanging your system up.)
Samba.nlm Cautions
I highly recommend running the Samba nlms on a test server so that you can
test it out first. Though samba.nlm works, if you unload it, you will get lots
of lost memory allocations (memory leak) such as this console capture shows:
SAMBA: terminating -
6-05-96 12:44:52 pm: SERVER-4.10-2715
Module did not release 178768 resources
Module: Samba - SMB Server
Resource: Small memory allocations
Description: Alloc Memory (Bytes)
Module SAMBA.NLM unloaded
6-05-96 12:44:53 pm: SERVER-4.10-2715
Module did not release 2 resources
Module: NBNS - NetBIOS Name Service
Resource: CLib BSD Socket
Description: CLib BSD Sockets
6-05-96 12:44:53 pm: SERVER-4.10-2715
Module did not release 1744 resources
Module: NBNS - NetBIOS Name Service
Resource: Small memory allocations
Description: Alloc Memory (Bytes)
Module NBNS.NLM unloaded
Module NWGLUE.NLM unloaded
As long as you don't unload it, which you need to do when you reconfigure
it, it appears that things are ok. On the application level, file sharing
appears to work; I haven't tried the printing stuff. Also, though I am running
it in debug mode, on a test server :-), I haven't checked to into minimizing
traffic or looking into whether it is doing the smb stuff right. (By this, I am
referring to samba.nlm 9.15h, nbns.nlm 9.14a, and nwglue.nlm 1.01a.)
Samba on NetWare PreRequisites
There are a few basic, minimum requirements that your NetWare server must
meet before you comtemplate setting up samba services on it. Namely:
- NetWare 4.1
- Thankfully, samba.nlm is only for NetWare 4 (hopefully only 4.1x and above
as well). If you are running anything below 4.10, go away, upgrade, then come
back. On NetWare 4.1, use the version command at the server console to verify
your revision of NetWare:
version
- Bindery Emultation
- The 4.1 server on which you will be loading samba.nlm must have its default
context listed first in the bindery context. At the server console, do:
config
- domain.nlm
- If you boot your NetWare 4.1 server with "load domain.nlm" as the
first non-comment line in your startup.ncf, you have access to the rings in the
Intel processor and a little protection from abends. (To fully benefit from
domain.nlm though, I've tested and found that running the latest static and
dynamic patches is necessary. Do it!)
- Latest Patches
- Running the latest patches from Novell is very important. Unlike NetWare
3.x and below, you can load all of them instead of having to experiment to see
which ones will blow up your server.
- At a minimum, you should be running the 4.1 patches from the archives
libup8.exe, 41nds6.exe, 410pt3.exe, 41rtr3.exe, landr5.exe, ps4x03.exe,
pu4x03.exe, smsup4.exe, strtl4.exe, tcp41b.exe. Use the modules and
patches command at the console to see what you are running.
- You should also look into the other numerous patches, but these are the
core patches from Novell that you should be running.
- TCP/IP
- By now you should be running IP on your NetWare server so that you can at
least ping it! I've only tested Samba over IP (I think that is all that is
supported right now also). In Microsoft terms, this is referred to "netbios
over ip." If need be, configure IP on your server with:
load inetcfg.nlm
- Once you are done configuring your IP stack, do a reinitialize system
to start the services. Use the ping.nlm to ping a machine not on the same
subnet to make sure everything works.
Detailed Installation Instructions
Here are the detailed instructions for downloading the Samba NLM support and
installing it.
- Download ALL of the Required Files In One Shot.
- I extracted relevant 5 relevant files from Novells hundreds of files in
their migration toolkit and added a couple *.ncf files that are useful.
Download NetWare Samba (about 190k) and install it
according to the following directions. (I put a link for each file below in
case you only want an updated version of a single file and not the whole pile
again.)
- Download Samba files for install in sys:system
- You will need the following files in sys:system:
File | bytes |
File Date | Version | Description |
nwglue.nlm | 18,692 | 05/06/96 | 1.01a April 8, 1996 | API layer for samba on NetWare. |
nbns.nlm | 57,269 | 03/01/96 | March 1, 1996 | Netbios
Name Service. |
samba.nlm |
200,097 | 05/06/96 | May
6, 1996 | The actual Samba NLM that does file and printer
sharing. |
samba.ncf | ? | ? | ? | File to start Samba Services. |
smbon.ncf |
? | ? | n.a. | My file for turning on Samba. |
smboff.ncf |
? | ? | n.a. | My file for turning off Samba. |
- Download Samba files for install in sys:samba
- The following files are needed in the sys:samba directory:
File | bytes |
File Date | Version | Description |
smb.cfg | ? | ? | n.a. | Config file for samba. |
- Tweak the sys:etc\hosts file.
- Make sure that you have the loopback node and your server's IP address in
your hosts file. It should look something like this:
# Mappings of host names and host aliases to IP address.
#
127.0.0.1 loopback lb localhost # normal loopback address
a.b.c.d your_netware_server_name # use YOUR IP ADDRESS for a.b.c.d
- WARNING! A number of Novell's files in sys:etc are whitespace sensitive.
ALWAYS use a tab to separate non-comment entries. (i.e., use tabs between the
IP address and host name in sys:etc\hosts, NOT spaces.)
- Tweak the sys:etc\services file.
- Whenever adding new IP services, I always like to update the services file
to reflect this fact. Two entries are relevevant to netbios over IP:
#
# Netbios/Samba Support
#
netbios-ns 137/tcp # NETBIOS Name Service
netbios-dgm 138/udp # NETBIOS Datagram Service
- Create a sys:samba directory.
- Hard coded into the Samba NLMs is a need for a sys:samba directory into
which it places log files. Not having this directory means the Samba NLMs are
quarantined when you load them (if you are running the latest patches and
domain.nlm) or your server abends.
- Create a sys:samba\locks directory.
- Also mandatory. The Samba NLMs put some scratch files here connected with,
I guess, file locking.
- Create empty samba log files.
- With Windows notepad (or whatever plain text edittor you like), create two
empty files called sys:samba\log.nmb and sys:samba\log.smb. Then do a "flag
sys:samba\log.* sh rw" so that they are shareable and read/writable.
By doing this, you will be able to view the log files while samba is running.
- Tweak the sys:samba\lmhosts file.
- This is the smb version of the hosts file. My test server is not using
NetWare NFS 2.1 (configured as a DNS and NIS client) as my production servers
are, so I've used an lmhosts file. Here's an example:
a.b.c.d your_netware_server
a1.b1.c1.d1 your_nt_pdc
a2.b2.c2.d2 your_unix_samb_server
- Looks like a sys:etc\hosts, doesn't it. (Note that this isn't true on
Windows NT or such because of the extensions like #PRE and #DOM, etc. These of
course don't matter on NetWare.)
- Samba.ncf or Smbon.ncf/Smboff.ncf?
- Novell's Samba distribution has a file called samba.ncf which you place in
the sys:system directory. It contains just two entries:
load nbns -G NTDOMAIN
load samba
- At the very least, you need to edit this file and replace NTDOMAIN with the
name of the Windows NT Domain whose browse list you want the server to appear
in. The samba.ncf file is then run at the server console to load the samba
services.
- In general, however, I always create two files for every "service":
a fooon.ncf which is used to turn on the service and a foooff.ncf
which is used to turn off the service. I do this since unloading NLMs in the
wrong order sometimes will cause an abend, because it is annoying to remember
which NLMs are involved, and also to log any messages that appear on the
console.
- In case you want to use them, my smbon.ncf looks like:
# Save old Samba console messages in console.old.
# New ones go in console.smb
unload conlog
load conlog file=sys:\samba\console.smb save=sys:\samba\console.old
# Start Samba
load nwglue
load sys:system\nbns -H sys:samba\lmhosts -G NTDOMAIN
load sys:system\samba
# Turn off console logging.
unload conlog
- My smboff.ncf looks like:
unload samba
unload nbns
unload nwglue
Starting Samba
Before you load Samba, a few configuration details need to be taken care of.
- Create Directory Map Objects in the NDS
- If you want to configure Samba shares quickly, create Directory Map objects
in the default bindery context of the server on which you are going to load
Samba Services.
- Create Print Queue Aliases in the NDS
- I haven't tried sharing print queues with NDS objects, but if you want to
do so the documentaion makes mention of creating NDS alias objects for the print
queues.
- Configure smb.cfg?
- If you wish, you can also edit the sys:samba\smb.cfg file (which Novell has
populated with examples and comments) instead of configuring NDS objects. This
is necessary if you want comments to appear in the browse list.
- Undocumented Parameters
- The samba nlms have some undocumented parameters. You can discover them by
purposely trying to load the NLMs with wrong parameters or, as I usually do,
start Windows write.exe (yes, yes, I know I should be using a hex edittor) and
pull in the NLM and select "No Conversion"; paging down towards the
bottom of an NLM, you will see error strings, parameters, etc. It is also
useful to search for volume names and such to discover defaults.
- Playing this game with nbns.nlm, you will discover:
Usage: SYS:SYSTEM\NBNS.NLM [-n name] [-B bcast address] [-D] [-p port] [-d debug
level] [-l log basename]
Version 1.9.14p1
-D become a daemon
-P passive only. don't respond
-R only reply to queries, don't actively send claims
-p port listen on the specified port
-d debuglevel set the debuglevel
-l log basename. Basename for log/debug files
-n netbiosname. the netbios name to advertise for this host
-B broadcast address the address to use for broadcasts
-N netmask the netmask to use for subnet determination
-L name lookup this netbios name then exit
-S serve queries via DNS if not on the same subnet
-H hosts file load a netbios hosts file
-G group name add a group name to be part of
-b toggles browsing support (defaults to on)
-M group name searches for a master browser for the given group
-T interval sets the browse announcement interval in seconds
-C comment sets the machine comment that appears in browse lis
ts
- I'm using the -d 4 switch in my smbon.ncf because I wanted a log
file to analyze. Beware that in a couple days I had a 25mb file to look at.
Really, all you need is the -G switch, -N (because I'm paranoid) and maybe -T.
Anyway, I'm still playing with this stuff. Don't have it optimized yet.
- Upon Loading, You Should See . . .
- Once you have loaded Samba with smbon.ncf, you should see something
like the following appear on the console:
NWGLUE.NLM
NWGlue - Support Library
Version 1.01a April 8, 1996
(C) Copyright 1994-6 Novell, Inc. All Rights Reserved.
NBNS.NLM
NBNS - NetBIOS Name Service
Version 9.14a March 1, 1996
(C) Copyright 1992-4 Andrew Tridgell
Portions (C) Copyright 1995 Novell, Inc. All Rights Reserved.
SAMBA.NLM
Samba - SMB Server
Version 9.15h May 6, 1996
(C) Copyright 1992-4 Andrew Tridgell
Portions (C) Copyright 1995-6 Novell, Inc. All Rights Reserved.
- Use It!
- Assuming you have Microsoft TCP/IP (available free) on Workgroups (or a
stack such as FTP software which supports Netbios over IP) or IP loaded on
Windows 95 (yuck) or Windows NT (yeah), pop open file manager and try connecting
to a drive.
Administration Details
Advantages/Disadvantages of Samba
If you need additional help (with the NetWare 4.10 server component
only!) or want to make suggestions/corrections to this web page, drop me a
note at merchant@parc.xerox.com
(Last Updated, June 6, 1996.)
Gurdon E. Merchant, Jr.