NextPreviousContents
If you are a user of a mixed technology network that comprises both IP and IPXprotocols it is likely that at some time or another you have wanted to haveyour Linux machine access data stored on a Novell fileserver on yournetwork. Novell have long offered an NFS server package for theirfileservers that would allow this, but if you are a small site or have onlya small number of people interested in doing this it is difficult to justifythe cost of the commercial package. Volker Lendecke <lendecke@namu01.gwdg.de> has written a Linuxfilesystem kernel module that supports a subset of the Novell NCPthat will allow you to mount Novell volumes into your Linux filesystemwithout requiring any additional products for your fileserver.Volker has called the package ncpfs and derived the necessaryinformation mainly from the book "Netzwerkprogrammierung in C" byManfred Hill and Ralf Zessin (further details of the book are contained withinthe README file in the ncpfs package). The software causes Linux to emulate a normal Novell workstation for fileservices. It also includes a small print utility that allows you to print toNovell print queues (This is documented in the Print Client section later).The ncpfs package will work with Novell fileservers of version 3.x andlater, it will not work the Novell 2.x. The ncpfs client will also workwith close Novell compatible products, but unfortunately some products thatclaim to be compatible aren't compatible enough. To use ncpfs with Novell4.x fileservers, it is preferred to use the Novell server in binderyemulation mode. The NDS support is a very recent early beta addition toncpfs and additionally its use may be prohibited in your country due tothe inclusion of patented technology. The latest ncpfs package was designed to be built against the version1.2.13 kernel or kernels later than 1.3.71 (this includes 2.x.x).If you not using a kernel in either of these categories then you will haveto upgrade your kernel. The Kernel-HOWTO describes how to do this indetail. You can obtain the ncpfs package by anonymous ftp fromVolker's home site at:ftp.gwdg.deorsunsite.unc.edu or mirror sites. The current version at the time of writing was: ncpfs-2.0.11.tgz or ncpfs-2.2.0.tgz which adds the NDS support.
- Build a kernel with Ethernet and IPX support
The first thing youneed 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 haveanswered Y to the question: 'The IPX protocol' asillustrated: ... ...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 ... ... 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 ncpfs software
# cd /usr/src# tar xvfz ncpfs-2.0.11.tgz# cd ncpfs - Check the Makefile
If you intend to use kerneld toautoload the ncpfs kernel module then you must uncomment theline in the Makefile that refers to: KERNELD. If youare unsure what this means then you should read the Kernel-HOWTO to familiariseyourself with kernel module configuration. - Make the ncpfs software
The software should compile cleanlywith no other configuration necessary: # make - Copy the IPX tools somewhere useful if you don't already have them.
After the make has completed you should find all of the toolsyou need in the ncpfs/bin directory. You can use: # make install
to install the tools in Volkers choice of directories. If you are runningon an ELF based system then you will need to rerun `ldconfig -v' toensure that the shared library is able to be found. - Copy the ncpfs.o module somewhere useful if necessary.
If you are compiling for a 1.2.* kernel then you will find a filecalled ncpfs.o in the ncpfs/bin directory after themake has completed. This is the ncpfs kernel module.You should copy this somewhere useful. On my debian system I havecopied it to the /lib/modules/1.2.13/fs directory and addedncpfs to the /etc/modules file so that it will beautomatically started at boot time. If you are using some other distributionyou should find where it keeps its modules and copy it there, or just copy itto your /etc directory. To load the modules manually you need to usethe command: # insmod ncpfs.o
For the latest version of ncpfs you must use kernel 1.3.71or newer, this includes the 2.0.* kernels. If you intend using a kernel that is version 1.3.71 or newer then thencpfs kernel code has been included in the standard kerneldistribution. You need only answer Y to: Networking options ---> ... ... <*> The IPX protocol ...Filesystems ---> ... ... <*> NCP filesystem support (to mount NetWare volumes) ...
You will still need to follow the instructions for building for kernels1.2.* so that you can build the tools but there will not be a modulefile for you to install. - Configure the IPX network software
There are two ways of configuringthe IPX network software. You can manually configure all of your IPX networkinformation or you can choose to let the software determine for itself somereasonable settings using the command: # ipx_configure --auto_interface=on --auto_primary=on
This should be reasonable in most circumstances, but if it doesn't work foryou then read the 'IPX tools' section above to configure your softwaremanually. Problems have been noted using this on networks containingWindows '95 clients. - Test the configuration
After your IPX network is configured youshould be able to use the slist command to see a list of all ofthe Novell fileserver on your network: # slist If the slist command displays a message like:ncp_connect: Invalid argument then your kernel probably does notsupport IPX. Check that you have actually booted off the appropriate kernel.When you boot you should see messages about 'IPX' and 'ncpfs' inthe system startup messages. If the slist command does not list allof your fileservers then you may need to use the manual network configurationmethod.- Mount a Novell(tm) server or volume.
If your IPX network softwareis workingok you should now be able to mount a Novell fileserver or volume into yourLinux filesystem. The ncpmount command is used for this purposeand requires that you specify at least the following information: - The fileserver name
- (optionally) The fileserver directory to mount
- The fileserver login id. If it has a password you will also need that.
- The mount point ie. where you want the mount to go. This will be anexisting directory on your machine.
There is an equivalent ncpumount command to unmount a mounted NCPfilesystem. The NCP filesystems will be unmounted cleanly if you shutdownyour machine normally, so you needn't worry about ncpumounting yourfilesystems manually before a halt or shutdown. An example command to mount fileserver ACCT_FS01, with a login id of guest with no password, under the /mnt/Accounts directorymight look like the following: # ncpmount -S ACCT_FS01 /mnt/Accounts -U guest -n Note the use of the -n option to indicate that no password isrequired for the login. The same login specifying a password of secretwould look like:# ncpmount -S ACCT_FS01 /mnt/Accounts -U guest -P secret If you don't specify either the -n or the -P options youwill be prompted for a password.- Check the mount
If the mount is successful you will find all thevolumes accessible to the userid used for login listed as directories underthe mount point. You should then also be able to traverse the directorystructure to find other files. You may alternatively use the -V optionto mount a single volume. NCP does not provide uid or gid ownership of files. All the files will havethe permission and ownership assigned to the mount point directory restrictedby trustee permissions on the Novell server. Bear this in mind when sharingmounts between Linux users. - Configure mounts to be automatically performed.
If you have someneed to permanently have an ncp mount then you will want to configure thecommands above into your rc files so that they occur automaticallyat boot time. If your distribution doesn't already provide some way ofconfiguring IPX like debian then I recommend you place them in your/etc/rc.local file if you have one. You might use something like: ## Start the ncp filesystem/sbin/insmod /lib/modules/1.2.13/fs/ncpfs.o# configure the IPX networkipx_configure --auto_interface=on --auto_primary=on# guest login to the Accounting fileserverncpmount -S ACCT_FS01 /mnt/Accounts -U guest -n# There is another means of configuring NCP mounts and that is by buildinga $HOME/.nwclient file. This file contains details of temporaryor user specific NCP mounts that would be performed regularly. It allowsyou to store the details of mounts so that you can recreate them withouthaving to specify all of the detail each time.Its format is quite straightforward: # The first entry is the 'preferred server' entry and is# used whenever you do not specify a server explicitly.## User TERRY login to DOCS_FS01 fileserver with password 'password'DOCS_FS01/TERRY password## Guest login to the ACCT_FS01 fileserver with no password.ACCT_FS01/GUEST - To activate these mounts you could use:$ ncpmount /home/terry/docs to mount: DOCS_FS01 with a login of TERRY under the /home/terry/docsdirectory. Note that this entry was chosen because no fileserver wasspecified in the mount command. If the following command were used:$ ncpmount -S ACCT_FS01 /home/terry/docs then a GUEST login to ACCT_FS01 would be mounted there instead.Note: for this mechanism to work the permissions of the$HOME/.nwclient file must be 0600 so you wouldneed to use the command: $ chmod 0600 $HOME/.nwclient If non-root users are to be allowed to use this mechanism thenthe ncpmount command must be Set Userid Root, so youwould need to give it permissions:# chmod 4755 ncpmount
- Try out the nsend utility
a utility to send messagesto Novell users is also included in the package, it is called nsendand is used as follows: # nsend rod hello there would send the message "hello there" to a logged in user "rod" on your"primary" fileserver (the first one appearing in your .nwclientfile. You can specify another fileserver with the same syntax as for thencpmount command.
NextPreviousContents
|