|
|
NextPreviousContents
There are two packages available that allow Linux to provide the functions ofa Novell Fileserver. They both allow you to share files on your linuxmachine with users using Novell NetWare client software. Users can attach andmap filesystems to appear as local drives on their machines just as they wouldto a real Novell fileserver. You may want to try both to see which bestserves your intended purpose. Martin Stover <mstover@freeway.de> developed mars_nweto enable linux to provide both file and print services for NetWare clients. In case you are wondering about the name: mars_nwe is Martin StoversNetware Emulator. Capability of mars_nwe.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 butthere are many people using it now and the number of bugs is steadilydecreasing as new versions are released. Obtaining mars_nwe.You can obtain mars_nwe fromftp.gwdg.deor fromftp://sunsite.unc.edu/pub/Linux/system/filesystems/ncpfs/. The version current at the time of writing was: mars_nwe-0.99.pl10.tgz. Building the mars_nwe package.- Build a kernel with Ethernet and IPX Support
In the 1.2.13version kernel you need only ensure that you have answered Y to thequestion: 'The IPX protocol' and N to the question:`Full internal IPX network' as illustrated: ... ...The IPX protocol (CONFIG_IPX) [n] y ... ...Full internal IPX network (CONFIG_IPX_INTERN) [N/y/?] n ... ... In newer kernels a similar process is adopted but the actual text of the promptmay have changed slightly.You will also need to ensure that you include an appropriate driver for yourEthernet 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 runlilo to install it when you have finished. - Untar the mars_nwe package.
# cd /usr/src# tar xvfz mars_nwe-0.99.pl10.tgz
- Make mars_nwe.
To make the package is very simple.The first step is to simply run make, this will create aconfig.h file for you. Next you should look at and edit theconfig.h file if necessary. It allows you to configure itemssuch as the installation directories that will be used and the maximumnumber of sessions and volumes that the server will support. The reallyimportant entries to look at are: FILENAME_NW_INI the location of the initialisation filePATHNAME_PROGS where the executable support programs will be found.PATHNAME_BINDERY where the 'bindery' files will go.PATHNAME_PIDFILES the directory for the 'pid' files to be written.MAX_CONNECTIONS the maximum number of simultaneous connections allowed.MAX_NW_VOLS the maximum number of volumes mars_nwe will support.MAX_FILE_HANDLES_CONN the maximum number of open files per connection.WITH_NAME_SPACE_CALLS if you want to support ncpfs clients.INTERNAL_RIP_SAP whether you want mars_nwe to provide rip/sap routing.SHADOW_PWD whether you use shadow passwords or not. The defaults will probably be ok but you should check anyway. When this is done: # make# make install
will build the servers and install them in the appropriate directory. Theinstallation script also installs the configuration file/etc/nwserv.conf. - Configure the server.
Configuration is fairly simple. You need toedit the /etc/nwserv.conf file. The format of this file may at firstlook a little cryptic, but it is fairly straightforward. The file contains anumber of single line configuration items. Each line is whitespace delimitedand begins with a number that indicates the contents of the line. Allcharacters following a '#' character are considered a comment andignored. Martin supplies an example configuration file in the package,but I'll present what I consider to be a simplified example to offer analternative 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 'i' option ignores case.# The 'k' option converts all filenames in NCP requests to lowercase.# The 'm' option marks the volume as removable (useful for cdroms etc.)# The 'r' option set the volume to read-only.# The 'o' option indicates the volume is a single mounted filesystem.# The 'P' option allows commands to be used as files.# The 'O' option allows use of the OS/2 namespace# The 'N' option allows use of the NFS namespace# The default is upper case.# Syntax:# 1 <Volumename> <Volumepath> <Options>1 SYS /home/netware/SYS/ # SYS1 DATA /home/netware/DATA/ k # DATA1 CDROM /cdrom kmr # CDROM# SERVER NAME# If not set then the linux hostname will be converted to upper case# and used. This is optional, the hostname will be used if this is not# configured.# Syntax:# 2 <Servername>2 LINUX_FS01# INTERNAL NETWORK ADDRESS# The Internal IPX Network Address is a feature that simplifies IPX routing# for multihomed hosts (hosts that have ports on more than one IPX network).# Syntax:# 3 <Internal Network Address> [<Node Number>]# or:# 3 auto## If you use 'auto' then your host IP address will be used. NOTE: this may# be dangerous, please be sure you pick a number unique to your network.# Addresses are 4byte hexadecimal (the leading 0x is required).3 0x49a01010 1# NETWORK DEVICE(S)# This entry configures your IPX network. If you already have your# IPX network configured then you do not need this. This is the same as# using ipx_configure/ipx_interface before you start the server.# Syntax:# 4 <IPX Network Number> <device_name> <frametype> [<ticks>]# Frame types: ethernet_ii, 802.2, 802.3, SNAP4 0x39a01010 eth0 802.3 1# SAVE IPX ROUTES AFTER SERVER IS DOWNED# Syntax:# 5 <flag># 0 = don't save routes, 1 = do save routes5 0# NETWARE VERSION# Syntax:# 6 <version># 0 = 2.15, 1 = 3.116 1# PASSWORD HANDLING# Real Novell DOS clients support a feature which encypts your# password when changing it. You can select whether you want your# mars server to support this feature or not.# Syntax# 7 <flag># <flag> is:# 0 to force password encryption. (Clients can't change password)# 1 force password encryption, allow unencrypted password change.# 7 allow non-encrypted password but no empty passwords.# 8 allow non-encrypted password including empty passwords.# 9 completely unencrypted passwords (doesn't work with OS/2)7 1# MINIMAL GID UID rights# permissions used for attachments with no login. These permissions# will be used for the files in your primary server attachment.# Syntax:# 10 <gid># 11 <uid># <gid> <uid> are from /etc/passwd, /etc/groups10 20011 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.# You should avoid using the 'root' user and instead use another# account to administer the mars fileserver.## This entry is read and encrypted into the server bindery files, so# it only needs to exist the first time you start the server to ensure# that the password isn't stolen.## Syntax:# 12 <Supervisor-Login> <Unix username> [<password>]12 SUPERVISOR terry secret# USER ACCOUNTS# This associates NetWare logins with unix accounts. Password are# optional.# Syntax: 13 <User Login> <Unix Username> [<password>]13 MARTIN martin13 TERRY terry # LAZY SYSTEM ADMIN CONFIGURATION# If you have a large numbers of users and could not be bothered using# type 13 individual user mappings, you can automatically map mars_nwe# logins to linux user names. BUT, there is currently no means of making# use of the linux login password so all users configured this way are# will use the single password supplied here. My recommendation is not# to do this unless security is absolutely no concern to you.# Syntax:# 15 <flag> <common-password># <flag> is: 0 - don't automatically map users.# 1 - do automatically map users not configured above.# 99 - automatically map every user in this way.15 0 duzzenmatta# SANITY CHECKING# mars_nwe will automatically ensure that certain directories exist if# you set this flag.# Syntax:# 16 <flag># <flag> is 0 for no, don't, or 1 for yes, do.16 0# PRINT QUEUES# This associates NetWare printers with unix printers. The queue# directories must be created manually before printing is attempted.# The queue directories are NOT lpd queues.# Syntax:# 21 <queue_name> <queue_directory> <unix_print_cmd>21 EPSON SYS:/PRINT/EPSON lpr -h21 LASER SYS:/PRINT/LASER lpr -Plaser# DEBUG FLAGS# These are not normally needed, but may be useful if are you debugging# a problem.# Syntax:# <debug_item> <debug_flag>## 100 = IPX KERNEL# 101 = NWSERV# 102 = NCPSERV# 103 = NWCONN# 104 = start NWCLIENT# 105 = NWBIND# 106 = NWROUTED# 0 = disable debug, 1 = enable debug100 0101 0102 0103 0104 0105 0106 0# RUN NWSERV IN BACKGROUND AND USE LOGFILE# Syntax:# 200 <flag># 0 = run NWSERV in foreground and don't use logfile# 1 = run NWSERV in background and use logfile200 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 logfile202 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# ROUTING BROADCAST INTERVAL# The time is seconds between server broadcasts# Syntax:# 211 <time># in seconds. (defaults 60)211 60# ROUTING LOGGING INTERVAL# Set how many broadcasts take place before logging of routing# information occurs.# Syntax:# 300 <number>300 5# ROUTING LOGFILE# Set the name of the routing logfile# Syntax:# 301 <filename>301 /tmp/nw.routes# ROUTING APPEND/OVERWRITE# Set whether you want to append to an existing log file or# overwrite it.# Syntax:# 302 <flag># <flag> is 0 for append, 1 for create/overwrite302 1# WATCHDOG TIMING# Set the timing for watchdog messages that ensure the network is# still alive.# Syntax:# 310 <value># <value> = 0 - always send watchdogs# < 0 - (-ve) for disable watchdogs# > 0 - send watchdogs when network traffic# drops below 'n' ticks310 7# STATION FILE# Set the filename for the stations file which determine which# machines this fileserver will act as the primary fileserver for.# The syntax of this file is described in the 'examples' directory# of the source code.# Syntax:# 400 <filename>400 /etc/nwserv.stations# GET NEAREST FILESERVER HANDLING# Set how SAP Get Nearest Fileserver Requests are handled.# Syntax:# 401 <flag># <flag> is: 0 - disable 'Get Nearest Fileserver' requests.# 1 - The 'stations' file lists stations to be excluded.# 2 - The 'stations' file lists stations to be included.401 2
- Start the server
If you've configured the server to expect externalprograms to configure your network and/or provide the routing function thenyou should start those before starting the server. Presuming you haveconfigured the server so that it will configure your interfaces for you andprovide the routing services you need only issue the command: # nwserv
- Test the server
To test the server you should first try to attachand login from a NetWare client on your network. You then set aCAPTURE from the client and attempt a print. If both of these aresuccessful then the server is working.
Ales Dryak <A.Dryak@sh.cvut.cz> developed lwared to allowLinux to function as an NCP based fileserver. Ales has called the package lwared, an abbreviation for LinWareDaemon. Capability of lwared.The lwared server is capable of providing a subset of the fullfunction of the Novell NCP. It incorporates messaging but it does not provideany printing facilities at all. It does not currently work very well witheither Windows95 or Windows NT clients. The lwared server relieson external programs to build and update the IPX routing and SAP tables.Misbehaving clients can cause the server to crash. Importantly, filenametranslation facilities have not been included. The server does work for NETX and VLM NetWare shells. Obtaining lwaredThe lwared package can be built for any kernel newer than1.2.0, I recommend you use version 1.2.13 as no kernelpatches are required if you do. Some of the IPX functionality has changedwith the version 1.3.* kernels and this means that patches arenow required to make it work properly. Appropriate patches are included forthe new kernels, so if you must use an alpha kernel you should still be ableto 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.eduor mirror sites. The current version at the time of writing was:lwared-0.95.tar.gz Building lwared- Untar the lwaredpackage
Something like: # cd /usr/src# tar xvpfz lwared-0.95.tar.gz - Build a kernel with Ethernet and IPX support
If you are using an alpha 1.3.* kernel then you should try and usekernel version 1.3.17 or newer because the supplied patches were builtagainst it. 1.3.* kernels older than 1.3.17 will requirehand patching to install. (some information on how to do this is includedin the INSTALL file in the package.). To install the patchesagainst 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 isensure that your kernel has been built with IPX support enabled. In the1.2.13 version kernel you need only ensure that you have answeredY 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 promptmay have changed slightly.You will also need to ensure that you include an appropriate driver for yourEthernet 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 runlilo to install it when you have finished. - Compile and install lwared.
To compile lwared youshould first check, edit if necessary, the server/config.h file. Thisfile contains various settings that will govern the way your server willbehave when it is running. The defaults are reasonable, though you might wantto check that the directories specified for the log files and configurationfiles suit your system. # make depend# make# make install I found that the 'make depend' complained about not finding thefloat.h file on my system but appeared to work anyway.I also found that when I tried compiling with gcc 2.6.3 I foundI 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 routingdaemon programs into your /usr/sbin directory, the lwpasswdprogram into your /usr/bin directory, the IPX utility programs willbe installed into your /sbin directory and last but not least themanual pages will go into the /usr/man directory structure. If anyof these locations are not suitable for your system then you should editthe relevant Makefile and change the target directories to suit.
Configuring and using lwaredNow the fun bit! - Configuring the IPX network
The first thing you must do is configureyour 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 yourLAN segments, which Ethernet device (eth0, eth1 etc.) ison which segment, what frame type (802.3, EtherII etc.) eachLAN 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 IPXnetwork addresses 23a91300 and 23a91301 and internal networkaddress bdefaced might look like: # ipx_internal_net add BDEFACED 1# ipx_interface add eth0 802.3 23a91300# ipx_interface add eth1 etherii 23a91301 - Start the routing daemons
The kernel software itself actually doesthe IPX packet forwarding as it does for IP, but the kernel requires additionalprograms to manage the routing table updates. In the case of IPX two daemonsare needed and both are supplied with lwared: ipxripd managesthe IPX routing information and ipxsapd manages the SAP information.To start the daemons you need only specify the location of where they shouldwrite their log messages: # ipxripd /var/adm/ipxrip# ipxsapd /var/adm/ipxsap - Configure the lwared server
There are two files that youmust manually configure to allow user login to your lwared server.They are: /etc/lwpasswdThis is where LinWare user accountinformation 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 thenthe encrypted version of the login passwd. A couple of important caveats here:No encrypted password means no password, LinWare users must have Linuxaccounts, that is any user you place in /etc/lwpasswd must alsoappear in /etc/passwd and root is the only account that canchange the password of another LinWare user. If you are logged in asroot you can change the password of a LinWare user as this transcriptdemonstrates:# lwpasswd rodgChanging password for RODGEnter new password: Re-type new password: Password changed. /etc/lwvtabThis is the LinWare volume tables and it storesinformation about what directories should be made available to LinWare users(this file is similar in nature to the NFS /etc/exports file). Asimple example of its format is as follows: SYS /lwfs/sysDATA /lwfs/dataHOME /home The format is simple: Volume name followed by whitespace followed by Linuxdirectory to export. You must have at least an entry for theSYS volume for the server to start. If you intend your DOS basedusers to be able use your LinWare server as their primary server then you mustinstall a standard SYS volume directory structure underneath thedirectory you export as your SYS volume. Since these files areproprietary and copyright to the Novell corporation you should have a licensefor these. If you users will be using a Novell fileserver as their primaryserver then this will not be necessary.
- Start the lwared server.
tada! # lwared It 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 theserver as shown then the LinWare server name being advertised will bebased on what is returned by the Linux hostname. If you'd like itto be something else then you can give the server the name when you startit, for example:# lwared -nlinux00 would start the server with the name linux00.- Test the lwared server.
The very first thing to test isthat your LinWare server appears in an slist from a DOS clienton your network. The slist program is stored on the SYSvolume of a Novell fileserver so you must do this from a machine that isalready logged in somewhere. If this is not successful then check thatipxsapd and lwared are both running. If the slistis successful then you should try attaching to the server and mappinga 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. Thefile permissions you will have will be based on those allowed to thelinux account that parallels your LinWare login.
NextPreviousContents
|