8. Configuring your Linux machine as an NCP client.

Contents of this section

If you are a user of a mixed technology network that comprises both ip and ipx protocols it is likely that at some time or another you have wanted to have your Linux machine access data stored on a Novell(tm) fileserver on your network. Novell have long offered an NFS server package for their fileservers that would allow this, but if you are a small site or have only a small number of people interested in doing this it is difficult to justify the cost of the commercial package.

Volker Lendecke <lendecke@namu01.gwdg.de> has written a Linux filesystem kernel module that supports a limited subset of the Novell NCP that will allow you to mount Novell volumes into your Linux filesystem without requiring any additional products for your fileserver. The software causes Linux to emulate a normal Novell workstation for fileservices.

Volker has called the package ncpfs and derived the necessary information mainly from the book "Netzwerkprogrammierung in C" by Manfred Hill and Ralf Zessin (further details of the book are contained within the README file in the ncpfs package). Volker also used some IPX tools written by Greg Page <greg@caldera.com>.

8.1 Obtaining ncpfs.

The ncpfs package was designed to be built against the version 1.2.13 kernel, so you if you are not using it then you should obtain it. There are currently problems with the version 1.3.* kernels that affect the IPX support.

You can obtain the ncpfs package by anonymous ftp from: sunsite.unc.edu or mirror sites. The current version at the time of writing was: ncpfs-0.9.tgz

8.2 Building ncpfs.

Build a kernel with ethernet and IPX support

The first 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
 ...
 ...
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.

Untar the ncpfs software

# cd /usr/src
# tar xvfz ncpfs-0.9.tgz

Make the ncpfs software

The software should compile cleanly with no configuration necessary:

# make

Copy the IPX tools to somewhere useful.

After the make has completed you should find all of the tools you need in the ncpfs/bin directory. I recommend you copy these tools to your /usr/local/sbin directory as shown:

# cd bin
# for i in ipx* ncp* slist; do cp $i /usr/local/sbin; done

Copy the ncpfs.o module somewhere useful.

After the make has completed you should also find a file ncpfs.o in the ncpfs/bin directory. This is the ncpfs kernel module. You should copy this somewhere useful. On my debian system I have copied it to the /lib/modules/1.2.13/fs directory and added ncpfs to the /etc/modules file so that it will be automatically started at boot time. If you are using some other distribution you should find where it keeps its modules and copy it there, or just copy it to your /etc directory. To load the modules manually you need to use the command:

# insmod ncpfs.o

8.3 Configuring and using ncpfs.

Configure the IPX network software

There are two ways of configuring the IPX network software. You can manually configure all of your IPX network information or you can choose to let the software determine for itself some reasonable settings. In most installations the automatic method will work ok. If it doesn't work for you then read the 'IPX tools' section below to configure your software manually:

# ipx_configure --auto_interface=on --auto_primary=on

Test the configuration

After your IPX network is configured you should be able to use the slist command to see a list of all of the Novell fileserver on your network:

# slist
If the slist command displays a message like: ncp_connect: Invalid argument then your kernel probably does not support IPX. Check that you have actually booted off the appropriate kernel. If the slist command does not list all of your fileservers then you may need to use the manual network configuration method.

Mount a Novell(tm) volume.

If your IPX network software is working ok you should now be able to mount a Novell fileserver volume into your Linux filesystem. The ncpmount command is used for this purpose and requires that you specify at least the following information:

  1. The fileserver name
  2. The fileserver login id. If it has a password you will also need that.
  3. The mount point ie. where you want the mount to go.

An example mount to mount login to fileserver ACCT_FS01 as user guest with no password under the /mnt/Accounts directory might look like the following:

# ncpmount ACCT_FS01 /mnt/Accounts -U guest -n
Note the use of the -n option to indicate that no password is required for the login. The same login specifying a password of secret would look like:
# ncpmount ACCT_FS01 /mnt/Accounts -U guest -P secret
If you don't specify either the -n or the -P options you will be prompted for a password.

Check the mount

If the mount is successful you will find the volumes accessable to the userid used for login listed as directories under the mount point. You should then also be able to traverse the directory structure to find other files. Because NCP does not provide uid or gid ownership of files, all of the files will have the permission and ownership assigned to the mount point directory, keep this in mind when sharing mounts between Linux users.

Change your rc files to do it all automatically

If you have some need to permanently have an ncp mount then you will want to configure the commands above into your rc files so that they occur automatically at boot time. I recommend you place them in your /etc/rc.local file if you have one. I have placed them in a file called NetWare in my /etc/init.d directory and created appropriate symbolic links into my /etc/rc2.d directory to cause it to be started. You might use something like:

#
# Start the ncp filesystem
/sbin/insmod /lib/modules/1.2.13/fs/ncpfs.o

# configure the IPX network
ipx_configure --auto_interface=on --auto_primary=on

# guest login to the Accounting fileserver
ncpmount ACCT_FS01 /mnt/Accounts -U guest -n

#


Next Chapter, Previous Chapter

Table of contents of this chapter, General table of contents

Top of the document, Beginning of this Chapter