As my good friend and TechProGuild's Linux Track Editor, Jack Wallen, Jr., keeps telling me, Linux is quickly spreading everywhere. If you're deploying Linux in your organization but still have some NetWare servers, you may be wondering how to get your Linux workstations communicating with your NetWare servers. To get them communicating with Windows, it's reasonably straightforward—just configure Samba and go.
It's a little more complicated when communicating with NetWare servers. You must load another protocol and learn a few commands. In this Daily Drill Down, I'll show you what's involved in getting your Linux workstations talking to your NetWare servers.
If you're familiar with Linux, you know there are many different distributions and versions available. For the purposes of this Daily Drill Down, we'll be dealing with Red Hat 7.1. However, if you're using a different version of Red Hat or a separate Linux distribution, don't panic. What we'll be covering will work on most distributions.
A matter of proper protocol
As you know from administering NetWare servers through the years, IPX serves as the core protocol NetWare uses to pass files across the network. In recent years, Novell has added IP support to NetWare 5.x that allows you to drop IPX from your network and run only TCP/IP.
Linux will allow you to connect to your NetWare server using either IPX or IP-only. Because IPX is most commonly used on NetWare servers, we'll discuss how to configure your Linux workstations to use IPX to connect to your NetWare servers.
Naturally, before you can use IPX, you must install it on your Linux workstation. During Red Hat 7.1's installation, you have the option of selecting the network components you want to install. Jack always advises me to install everything, so that naturally includes IPX support. However, you can also include IPX support by doing a custom installation at startup and making sure you select IPX/NetWare Connectivity on the Package Group Components screen.
If you've already installed Linux, you can check to see if you already have the proper components loaded by opening a terminal window and typing rpm –q ncpfs and pressing [Enter]. If ncpfs, the file system necessary to access NetWare resources, is present, the workstation will display something like
The actual version may be different, depending on the version of ncpfs that came with your distribution.
Likewise, you should also check to make sure that IPX utilities are installed on your workstation. To do so, type rpm –q ipxutils and press [Enter]. If ipxutils are present, you'll see
Next, you'll need to make sure IPX is configured on your workstation. To do so, open a terminal window, type su – and press [Enter]. You'll have to provide your root password. When the root prompt appears, type netconf and press [Enter]. Doing so will start Linux's Network Configurator.
Highlight IPX Interface Setup under Client Tasks and press [Enter]. You'll then see the IPX Interface Configuration screen. Use the Down Arrow key to move to the IPX Networking field and press the Spacebar to make sure that there's an X in the field to select and enable IPX. You can then use the Down Arrow key to move down and select the appropriate frame types for your IPX configuration.
Linux supports all of NetWare's Ethernet frame types, including the oddball ones of EthernetSnap and Ethernet II. If you're selecting multiple frames, you can choose a primary frame type by selecting the Is The Primary Interface check box for the frame type you want to serve as primary.
If you know the External IPX network number for your network, you can enter it for each frame by deselecting the Probe check box for the frame and entering the hex value of the IPX number in the field next to Probe. Likewise, you can set an Internal IPX number for the workstation or just leave the default of None.
When you're all done, press [Tab] to highlight Accept and press [Enter]. Then, quit out of the Network Configurator. You can then check to see if everything's working by getting a list of NetWare servers on your network. To do so, type slist and press [Enter]. If everything works, you'll see the names of your NetWare servers, along with their IPX network numbers and Node IDs.
Making the connection
Now that you've configured IPX, you're ready to mount the NetWare volumes you'll be accessing. First, you must create a mount point on your Linux workstation that will point to the NetWare volumes you'll be using. If you've used Linux before, you know the most common location for mount points is in the /mnt directory.
To create a NetWare mount point, open a terminal window and log in as supervisor by typing su and entering your root password. Next, change directories to the /mnt directory. Create the NetWare mount point by typing mkdir netware and pressing [Enter]. Don't forget that directory names in Linux are case sensitive. To make things easier to remember, just make everything lowercase.
After you've created the mount point, you're ready to go. To make the connection to your server, you'll use the ncpmount command. As with the other commands we've discussed so far, you must be logged in as root or from a terminal window using the su command. The basic syntax for the ncpmount command is:
ncpmount –S server –U user –P password mountpoint
So, on our test network, to connect to the NetWare 5.1 server called Brain, we'd enter ncpmount –S brain –U jsheesley –P password /mnt/netware and press [Enter]. You can then verify that the mount was successful by changing directories into the /mnt/netware directory. You'll see your NetWare volumes appear as directories subordinate to your mount point.
What can I do with ncpmount?
The command listed above gets you up and running in the quickest fashion. However, the ncpmount command also has other command-line switches that allow you more fine control over mounting NetWare volumes. This is the full syntax for ncpmount.
The ncpmount switches enclosed in brackets are fully optional. For example, in the simplified ncpmount above, we omitted almost all of the switches except –S, –U, and –P. If we had further omitted the –P switch, ncpmount would have prompted you to enter the password for the user account specified in –U. The ncpmount switches you can use include the following:
- · -b: This switch allows you to connect to your NetWare server in bindery mode. For it to work properly, you'll have to have your bindery context set properly on your NetWare 4.x or NetWare 5.x server. You'll need this switch to connect to NetWare 3.x servers.
- · -C:ncpmount normally converts passwords you enter at the –P switch to uppercase. This switch causes passwords to be sent without any case conversion. Because NetWare doesn't care about password case, this switch shouldn't be necessary in most cases.
- · -c client: This switch specifies a different owner of the connection to the NetWare server for purposes of using certain Linux utilities against your NetWare server. You'll only use this switch if you want the client name to be different than the username specified in the –u switch.
- · -d dirmode: This switch determines the permissions Linux should assign to the mounted volumes. These permissions can differ from the rights the NetWare server allows, but the permissions can't override the restrictions imposed by the server.
- · -f filemode: This works like the –d switch but applies to file level permissions as opposed to directory level permissions.
- · -g gid: This switch allows you to map NetWare groups to Linux groups. Doing so informs ncpmount which IDs it should assign to the files in the mounted directory. The default for the value for this switch is the current gid.
- · -h: This switch displays help for ncpmount.
- · -i level: This switch allows you to set the packet signature level on your network. If you don't use packet signatures, you don't have to worry about this option. You can set a level from 0 to 3.
- · -m: Ncpmount limits the number of connections a client can make to a server to one per unique username. You can mount more than one connection with the same username to your server, using this switch.
- · Mountpoint: The mountpoint is the name of the directory on your Linux servers where you want to mount your NetWare files. It works the same as the regular Linux mount command.
- · -n: If you're logging on to your NetWare server using a user ID that doesn't have a password, you must use this switch.
- · -p codepage: You'll only use this switch if you want to specify a special codepage translation for your NetWare server.
- · -P password: This switch specifies your NetWare password. If you don't want your password to appear as part of the command, you can omit this switch. Ncpmount will then display a password prompt but will not echo your NetWare password as you enter it.
- · -r retrycount: This switch specifies how many times your workstation will send a packet to the server before it decides the connection is dead. The default value is 5.
- · -S server: You'll use this switch to specify the name of the NetWare server you want to connect to. It's not case sensitive.
- · -t timeout: This switch sets the amount of time that your workstation waits for the server to answer a request. The default value is 60 seconds.
- · -u uid: This switch is similar to the –g switch, except it deals with Linux users that map to NetWare users. Just replace uid with the user ID of the Linux user you want to map.
- · -U username: This switch specifies the NetWare user ID you want to use to log in to your NetWare server. If you don't use this switch, ncpmount will try to connect to your server using the Linux login ID you used when starting your workstation.
- · -v: This switch prints the ncpfs version number when you use it on the command line by itself. If you use –v in conjunction with the –o switch, ncpmount starts in verbose mode, displaying more information about your connection as it makes it.
- · -V volume: This switch allows you to specify a specific volume to mount when you connect to your server. If you omit this switch, ncpmount will mount all of your available NetWare volumes under the mountpoint you've specified.
- · -yiocharset: This switch specifies character translation rules for converting names from unicode to your desktop. iocharset is the charset name you want to use.
If you want to terminate the connection to your NetWare server, you can do so without restarting your machine. All you have to do is use the ncpumount command. In a terminal window, type ncpumount mountpoint, press [Enter], and you're done.
You've probably known for some time that with a little bit of work with Samba, you can make your Linux workstations play nice with Windows servers. Linux is equally friendly with NetWare servers, using ncpmount. As long as you're comfortable with working at the command line to issue the proper Linux commands, your Linux workstations and NetWare servers will get along like penguins and icebergs.