Setting Up a NetWare File Server in Red Hat Linux

Setting Up a NetWare File Server in Red Hat Linux

NetWare (from Novell, Inc.) was once the most popular software for sharing files and printers among PCs connected in LANs. NetWare is referred to as a network operating system. That means that NetWare takes control of the whole computer and manages its resources. Although NetWare is not like client operating systems (such as Windows 2000 or XP) that you could keep on your desk at work to do word processing, it is a highly efficient file and print server.

In Linux, there is software available for emulating a NetWare server from your Linux system. One that comes with Red Hat Linux is the Martin Stovers NetWare Emulator (mars_nwe package). Though mars_nwe doesn't do everything a NetWare server can do, it does a good job as a basic file-and-print server. Here are features that mars_nwe includes:

  • File Services — You can share directory structures (referred to as volumes) from Linux using the NetWare Emulator.

  • Print Services — You can share printers associated with NetWare services using the NetWare Emulator.

  • RIP/SAP daemon — This allows your Red Hat Linux computer to function as an IPX router. (IPX is the native protocol used to communicate among NetWare systems.)

    Note?

    If the mars_nwe package is not installed on your computer, you can install it from the second Red Hat Linux installation CD (CD #3) that comes with this book.

On the client side, the ncpfs package is an additional package that you would need to install if you want your Red Hat Linux computer to take advantage of services from NetWare servers (it's also on CD #3). This package offers a full range of client commands for accessing NetWare services. These commands let you mount NetWare volumes, display information about available services, and work with NetWare bindery objects.

Creating the NetWare file server

To share NetWare services from your Red Hat Linux server, you need to use IPX protocol to communicate with NetWare clients over your physical network. A common situation is to use IPX over an Ethernet LAN (which is what is described in this section).

Cross-Reference?

See Chapter 15 for information on setting up an Ethernet LAN.

Most of the configuration of your NetWare server in Linux is done in the /etc/nwserv.conf file. The nwserv.conf file that is delivered with mars_nwe contains a lot of commented information that describes what you need to do to configure NetWare services in Red Hat Linux. Refer to the commented text for more details on different ways of configuring NetWare servers in Red Hat Linux.

Configuring /etc/nwserv.conf

Information that you need to add to your /etc/nwserv.conf file is organized in sections. Each entry in a section begins with the number of that section. Here are some of the sections that you may need to modify for your NetWare server in Red Hat Linux. (The number assigned to each section is shown in parentheses.)

  • Volumes (1) — The names of volumes (Red Hat Linux directories) you want to share.

  • Server Name (2) — The identity of your server.

  • Internal Network Number (3) — A number that uniquely identifies your server. The address either must be a hexadecimal number or must include the word auto to use your current IP address as your internal network number.

  • IPX Devices (4) — Contains information used by the IPX network. It includes the IP network number, the network interface's device name (such as eth0), the frame type (ethernet_ii, 802.2, 802.3, or SNAP), and the number of ticks (a tick is a 1/18 of a second increment that is used to determine the time it takes packets to travel over a particular interface). You don't need to do this if your IPX network is already set up.

  • Password Handling (7) — Defines whether (and how) passwords are encrypted from clients. (The default is 0, which enforces encryption of all client passwords.)

  • Minimal UID/GID Rights (10) — Assigns the minimal user rights to the shared volumes from your Linux server. By default, the nobody user rights (UID=99) are assigned. Also by default, the nobody group rights (GID=99) are assigned.

  • Supervisor Login (12) — Assigns the NetWare supervisor login to a particular login on your Linux system. It is recommended that you assign a special login instead of using root (to limit the security implications). By default, the supervisor login is assigned to the Linux root login (UID=0). This entry is read only once, the first time the server is started. In should also include an initial password for the login.

  • User Logins (13) — Maps regular Linux logins on your computer into Linux NetWare server logins. You can also add a default password, although none is required.

  • Automatic Login Mapping (15) — Defines whether to map your Red Hat Linux user logins (those in /etc/passwd) automatically into your Linux NetWare server. For commonly mapped logins, the same password is assigned. By default, logins are reread from /etc/passwd and assigned the password top-secret.

  • Startup Tests (16) — Runs sanity checks at startup with this value set to 1 (the default).

You can find information about a few other values that are used to set printing, debugging, and timing by reading the descriptions in the /etc/nwserv.conf file. Here is an example of the values I set to share a NetWare volume from a Linux system. Some of these values are defaults that are set in the nwserv.conf file. (These entries are spread throughout the /etc/nwserv.conf file.)

1      SYS         /var/mars_nwe/sys    rk 711 600
1      CDROM       /mnt/cdrom           kr  auto    1
2      maple1
4      0x0         eth0    802.3        1
7      1
10     99
11     99
12     SUPERVISOR  root    secret
15     99          top-secret

In this sample, the SYS (/var/mars_nwe/sys directory) and CDROM (/mnt/cdrom) volumes are being shared. The server's name is assigned as maple1. The address is being automatically selected (auto) from the IP address of the local computer. By using 0x0 the Linux kernel can choose a network number for you. The network interface is eth0 (the first Ethernet network on the computer) and the frame type used is 802.3. Minimal user and group permissions are assigned to UID 99 (user nobody). SUPERVISOR permissions are assigned to root user (with an initial password of secret). The password for UID 99 is top-secret.

Starting the NetWare server daemon

At this point, all you have to do is start your NetWare server process. You can do that by typing nwserv. Your other option, which is better in the long term, is to start the server from a system init script. The mars_nwe package delivers such a script, but it is probably not configured to start automatically on your system. To set the script to start the NetWare server process automatically, type the following:

# chkconfig mars-nwe on

This command sets up mars-nwe to start at run levels 3, 4, and 5. The next time you reboot your Linux system, the nwserv daemon will start providing your NetWare services. Or, you could start the service immediately by typing the following:

# service mars-nwe start

Using NetWare client commands

The ncpfs software package comes with a set of utilities that work with NetWare file and print services. Here are a few of those commands.

  • nsend — Sends a message to a user's workstation. The nsend command looks for information about the file server, user name and, optionally, a password, in the .nwclient file in your home directory. For example, to send a message to the system administrator, you could type nsend supervisor 'Hello, how is your day?'.

  • nwauth — Authenticates to a NetWare server. You can specify the server (-S servername) and user (-U username) you want to authenticate. Otherwise, nwauth will look in your $HOME/.nwclient file for that information. If you run this command from the shell, the server will prompt you for a password.

  • nwbols — Lists the NetWare bindery objects that you specify.

  • nwboprops — Lists properties associated with a specified NetWare bindery object.

  • nwbpset — Sets NetWare bindery properties value or creates a bindery property.

  • nwfsinfo — Displays information about a file server without requiring you to log in to the server.

  • nwpasswd — Changes your password on a NetWare server.

  • nwpurge — Purges a directory of files that were previously erased.

  • nwrights — Displays the NetWare rights associated with a particular file or directory.

  • nwsfind — Searches for a NetWare server and displays a route (network address) to the server.

  • nwtrustee — Displays a lot of trustee directory assignments associated with an object.

  • nwuserlist — Displays a list of users that are currently logged in to a NetWare server.

  • nwvolinfo — Shows information about a NetWare server volume.

  • slist — Shows a list of all available NetWare servers.

  • ncpmount — Mounts volumes from a NetWare file server.

  • ncpumount — Unmounts volumes from a NetWare file server.

  • nwbocreate — Creates a bindery object for a NetWare file server.

  • nwborm — Deletes a bindery object for a NetWare file server.

  • nwfsctrl — Runs a command on the NetWare file server.

  • nwgrant — Adds a bindery object and its associated trustee rights to a directory.

  • nwmsg — Sends a NetWare user broadcast message.

  • nwrevoke — Revokes a directory's trustee rights.

Many NetWare commands can draw on configuration information in your $HOME/.nwclient file. When you run a NetWare command without specifying a server name, user name, and/or a password, that information can be obtained from the .nwclient file. This file must have secure permissions (0600) because it can contain passwords and other private information. Entries in a .nwclient file may look similar to the following:

nwfs1/mike mypasswd
remserv/guest -

The first line is a listing for a file server named nwfs1 and a user named mike, followed by the password for that account, mypasswd. On the next line, the server's name is remserv and the user account is guest. No password is required for this account (indicated by the -).




Part IV: Red Hat Linux Network and Server Setup