There are two packages available that allow Linux to provide the functions of a Novell Fileserver. They both allow you to share files on your linux machine with users using Novell NetWare client software. Users can attach and map filesystems to appear as local drives on their machines just as they would to a real Novell fileserver. You may want to try both to see which best serves your intended purpose.
Martin Stover <mstover@freeway.de>
developed mars_nwe
to enable linux to provide both file and print services for Netware clients.
mars_nwe is Martin Stovers Netware Emulator.
mars_nwe implements a subset of the full Novell NCP for file services, disk based bindery and also print services. It is likely to contain bugs.
You can obtain mars_nwe from
linux01.gwdg.de. The
current version at the time of writing was: mars_nwe-0.96.pl2.tgz
.
In the 1.2.13
version kernel you need only ensure that you have answered Y
to the
question: 'The IPX protocol
' as illustrated:
... ... Assume subnets are local (CONFIG_INET_SNARL) [y] Disable NAGLE algorithm (normally enabled) (CONFIG_TCP_NAGLE_OFF) [n] The IPX protocol (CONFIG_IPX) [n] y * * SCSI support ... ...In newer kernels a similar process is adopted by the actual text of the prompt may have changed slightly.
You will also need to ensure that you include an appopriate driver for your ethernet card. If you do not know how to do this then you should read the Ethernet-HOWTO.
You can then proceed to build your kernel. Make sure you remember to run lilo to install it when you have finished.
# cd /usr/src
# tar xvfz mars_nwe-0.96.pl2.tgz
To make the package is very simple. First
you should look at and edit the config.h
file if necessary. It
allows you to configure items such as the installation directories that will
be used and the maximum number of sessions and volumes that the server will
support. When this is done:
# make
# make install
will build the servers and install them in the appopriate directory. The
installation script also installs the configuration file
/etc/nwserv.conf
.
Configuration is fairly simple. You need to
edit the /etc/nwserv.conf
file. The format of this file may at first
look a little cryptic, but it is fairly straightforward. The file contains a
number of single line configuration items. Each line is whitespace delimited
and begins with a number that indicates the contents of the line. All
characters following a '#
' character are considered a comment and
ignored. Martin supplies an example configuration file in the package,
but I'll present what I consider to be a simplified example to offer an
alternative for you.
# VOLUMES (max. 5)
# Only the SYS volume is compulsory. The directory containing the SYS
# volume must contain the directories: LOGIN, PUBLIC, SYSTEM, MAIL.
# The 'k' option converts all filenames in NCP requests to lowercase.
# The default is upper case.
# Syntax:
# 1 <Volumename> <Volumepath> <Options>
1 SYS /home/netware/SYS/ # SYS
1 DATA /home/netware/DATA/ k # DATA
# SERVER NAME
# If not set then the linux hostname will be converted to upper case
# and used.
# Syntax:
# 2 <Servername>
2 LINUX_FS01
# INTERNAL NETWORK NUMBER (not yet implemented)
# Syntax:
# 3 <Internal Network Address> [<Node Number>]
# NETWORK DEVICE(S)
# This entry configures your IPX network. If you already have your
# IPX network configured then you do not need this.
# Syntax:
# 4 <IPX Network Number> <device_name> <frametype> [<ticks>]
# Frame types: ethernet_ii, 802.2, 802.3, SNAP
4 0x39a01010 eth0 802.3 1
# SAVE IPX ROUTES AFTER SERVER IS DOWNED
# Syntax:
# 5 <flag>
# 0 = don't save routes, 1 = do save routes
5 0
# NETWARE VERSION
# Syntax:
# 6 <version>
# 0 = 2.15, 1 = 3.11
6 0
# MINIMAL GID UID rights
# permissions used for attachments with no login.
# Syntax:
# 10 <gid>
# 11 <uid>
# <gid> <uid> are from /etc/passwd, /etc/groups
10 200
11 201
# SUPERVISOR password
# May be removed after the server is started once. The server will
# encrypt this information into the bindery file after it is run.
# Syntax:
# 12 <Supervisor-Login> <Unix username> [<password>]
12 SUPERVISOR root secret
# USER ACCOUNTS
# This associates netware logins with unix accounts. Password are
# optional.
# Syntax:
13 <User Login> <Unix Username> [<password>]
13 TERRY terry
13 MAR mar
# PRINT QUEUES
# This associates Netware printers with unix printers. The queue
# directories must be created manually before printing is attempted.
# Syntax:
# 21 <queue_name> <queue_directory> <unix_print_cmd>
21 EPSON SYS:/PRINT/EPSON lpr -h
21 LASER SYS:/PRINT/LASER lpr -Plaser
# DEBUG FLAGS
# Syntax:
# <debug_item> <debug_flag>
#
# 100 = IPX KERNEL
# 101 = NWSERV
# 102 = NCPSERV
# 103 = NWCONN
# 104 = use NWCLIENT
# 0 = disable debug, 1 = enable debug
100 0
101 0
102 0
103 0
104 0
# RUN NWSERV IN BACKGROUP AND USE LOGFILE
# Syntax:
# 200 <flag>
# 0 = run NWSEV in foreground and don't use logfile
# 1 = run NWSERV in background and use logfile
200 1
# LOGFILE NAME
# Syntax:
# 201 <logfile>
201 /tmp/nw.log
# APPEND LOG OR OVERWRITE
# Syntax:
# 202 <flag>
# 0 = append to existing logfile
# 1 = overwrite existing logfile
202 1
# SERVER DOWN TIME
# This item sets the time after a SERVER DOWN is issued that the
# server really goes down.
# Syntax:
# 210 <time>
# in seconds. (defaults 10)
210 10
To start the server you need only issue the command:
# nwserv
To test the server you should first try to attach
and login from a Netware client on your network. You then set a
CAPTURE
from the client and attempt a print. If both of these are
successful then the server is working.
Ales Dryak <A.Dryak@sh.cvut.cz>
developed lwared to allow
Linux to function as an NCP based fileserver.
Ales has called the package lwared, an abbreviation for LinWare Daemon.
The lwared server is capable of providing a subset of the full function of the Novell NCP. It incorporates messaging but it does not provide any printing facilities at all. It does not currently work very well with either Windows95 or Windows NT clients. The lwared server relies on external programs to build and update the IPX routing and SAP tables. Misbehaving clients can cause the server to crash. Importantly, filename translation facilities have not been included.
The server does work for NETX and VLM NetWare shells.
The lwared package can be built for any kernel newer than
1.2.0
, I recommend you use version 1.2.13
as no kernel
patches are required if you do. Some of the IPX functionality has changed
with the version 1.3.*
kernels and this means that patches are
now required to make it work properly. Appropriate patches are included for
the new kernels, so if you must use an alpha kernel you should still be able
to get lwared to work properly for you.
You can obtain the lwared package by anonymous ftp from: klokan.sh.cvut.cz
or from:
sunsite.unc.edu
or mirror sites. The current version at the time of writing was:
lwared-0.95.tar.gz
Something like:
# cd /usr/src # tar xvpfz lwared-0.95.tar.gz
If you are using an alpha 1.3.*
kernel then you should try and use
kernel version 1.3.17
or newer because the supplied patches were built
against it. 1.3.*
kernels older than 1.3.17
will require
hand patching to install. (some information on how to do this is included
in the INSTALL
file in the package.). To install the patches
against a 1.3.17
kernel or newer you should try:
# make patch
After applying the patches if necessary, the next thing you need to do is
ensure that your kernel has been built with IPX support enabled. In the
1.2.13
version kernel you need only ensure that you have answered
Y
to the question: 'The IPX protocol
' as
illustrated:
... ... Assume subnets are local (CONFIG_INET_SNARL) [y] Disable NAGLE algorithm (normally enabled) (CONFIG_TCP_NAGLE_OFF) [n] The IPX protocol (CONFIG_IPX) [n] y * * SCSI support ... ...In newer kernels a similar process is adopted by the actual text of the prompt may have changed slightly.
You will also need to ensure that you include an appopriate driver for your ethernet card. If you do not know how to do this then you should read the Ethernet-HOWTO.
You can then proceed to build your kernel. Make sure you remember to run lilo to install it when you have finished.
To compile lwared you
should first check, edit if necessary, the server/config.h
file. This
file contains various settings that will govern the way your server will
behave when it is running. The defaults are reasonable, though you might want
to check that the directories specified for the log files and configuration
files suit your system.
# make depend # make # make installI found that the '
make depend
' complained about not finding the
float.h
file on my system but appeared to work anyway.
I also found that when I tried compiling with gcc 2.6.3
I found
I had to change the line:
#include <net/route.h>to
#include <net/if_route.h>in
lib/ipxkern.c
as this file changed name sometime.
The 'make install
' will attempt to install the server and routing
daemon programs into your /usr/sbin
directory, the lwpasswd
program into your /usr/bin
directory, the IPX utility programs will
be installed into your /sbin
directory and last but not least the
manual pages will go into the /usr/man
directory structure. If any
of these locations are not suitable for your system then you should edit
the relevant Makefile
and change the target directories to suit.
Now the fun bit!
The first thing you must do is configure
your ethernet interfaces to support the IPX networks your server will support.
To do this you will need to know the IPX network addresses for each of your
lan segments, which ethernet device (eth0
, eth1
etc.) is
on which segment, what frame type (802.3
, EtherII
etc.) each
lan segment uses and what Internal Network address your server should use
(this is really needed if your server will service more than one lan segment).
A configuration for a server that is on two dis-similar segments with IPX
network addresses 23a91300
and 23a91301
and internal network
address bdefaced
might look like:
# ipx_internal_net add BDEFACED 1 # ipx_interface add eth0 802.3 23a91300 # ipx_interface add eth1 etherii 23a91301
The kernel software itself actually does the IPX packet forwarding as it does for IP, but the kernel requires additional programs to manage the routing table updates. In the case of IPX two daemons are needed and both are supplied with lwared: ipxripd manages the IPX routing information and ipxsapd manages the SAP information. To start the daemons you need only specify the location of where they should write their log messages:
# ipxripd /var/adm/ipxrip # ipxsapd /var/adm/ipxsap
There are two files that you must manually configure to allow user login to your lwared server. They are:
/etc/lwpasswd
This is where LinWare user account
information is kept. The lwpasswd program is to keep it up to date.
In its simplest form the /etc/lwpasswd
file looks like:
ales: terryd: guest:Its format is a simple list of login id followed by a ':' character and then the encrypted version of the login passwd. A couple of important caveats here: No encrypted password means no password, LinWare users must have Linux accounts, that is any user you place in
/etc/lwpasswd
must also
appear in /etc/passwd
and root
is the only account that can
change the password of another LinWare user. If you are logged in as
root
you can change the password of a LinWare user as this transcript
demonstrates:
# lwpasswd rodg Changing password for RODG Enter new password: Re-type new password: Password changed.
/etc/lwvtab
This is the LinWare volume tables and it stores
information about what directories should be made available to LinWare users
(this file is similar in nature to the NFS /etc/exports
file). A
simple example of its format is as follows:
SYS /lwfs/sys DATA /lwfs/data HOME /homeThe format is simple: Volume name followed by whitespace followed by Linux directory to export. You must have at least an entry for the
SYS
volume for the server to start. If you intend your DOS based
users to be able use your LinWare server as their primary server then you must
install a standard SYS
volume directory structure underneath the
directory you export as your SYS
volume. Since these files are
proprietry and copyright to the Novell corporation you should have a license
for these. If you users will be using a Novell fileserver as their primary
server then this will not be necessary.
tada!
# lwaredIt is almost an anticlimax isn't it ? Ok so you've got a question, right? What is the fileserver name that is being advertised ? If you started the server as shown then the LinWare server name being advertised will be based on what is returned by the Linux hostname. If you'd like it to be something else then you can give the server the name when you start it, for example:
# lwared -nlinux00would start the server with the name
linux00
.
The very first thing to test is
that your LinWare server appears in an slist from a DOS client
on your network. The slist program is stored on the SYS
volume of a Novell fileserver so you must do this from a machine that is
already logged in somewhere. If this is not successful then check that
ipxsapd and lwared are both running. If the slist
is successful then you should try attaching to the server and mapping
a volume:
C:> attach linux00/ales ... ... C:> map l:=linux00/data: C:> l:You should then be able to treat the new map just like any other map. The file permissions you will have will be based on those allowed to the linux account that parallels your LinWare login.