Linux Novell Access and Printing

Posted: September 27, 2010 in REDHAT 5 LinUX

Novell Network Access

Use the package ncpfs. The function ncpmount can then be used to mount network drives.

  1. Add the line “ipx_configure –auto_interface=on –auto_primary=on” to the end of the file “/etc/rc.d/rc.local”.
    Note : Use “ps ax |more” if you want to see all processes including daemons
  2. Type “slist” for a list of available servers on the network (Note, you must log onto the network using the “ncpmount” command before you can see a list of available servers or printers.)
  3. ncpmount – mount all the volumes on a specified Novell fileserver.
    Ex: ncpmount -S main_serv1 -U george /mnt/network
  4. Note: If you want all users to have this capability, you must install ncpmount suid root. Do the following:cd /usr/bin
    chmod +s ncpmount
    chmod +s ncpumount
  5. When done use ncpumount to unmount the drive.

Misc notes:
Type “pqlist” for a list of print spoolers.
Type “slist” for list of servers on the network.

Network Printing setup and use

If you are using Novell:

  1. After setting ipx_configure up in the above section, Log onto the desired network server using ncpmount. I have written a “neton” and “netoff” script file. To logon type “neton” and your username on the same line. To log off, type netoff. These script files are places in “/usr/bin”.
  2. Find out what printers are available on the server you’re logged in on by typing “pqlist –S servername”. Ex: pqlist -S main_serv1
  3. Type “nprint -S server -U username -P password -q queue name -d jobdescription file”. Ex: nprint -S main_serv1 -q HP_lprinter

To set up the printers:
If you are running Redhat Linux you may want to use printtool to set up your printer. To do this type “startx” to begin an X session. Then bring up a terminal program and type “printtool”. When the printtool screen appears, select “add” to add a printer. The Following is an example of a completed menu:

Names (name1|name2|…) lp
Spool Directory /var/spool/lpd/lp
File Limit in Kb (0 – no limit) 0
Printer Server Name main_serv1
Print Queue Name HP_lprinter
User george
Password ******
Input Filter *auto* – LaserJet4

Don’t forget to enable LF to CRLF translation if you will be printing windows or DOS files. The name is the name you want to call this printer. You could call it fred. The spool directory is where the spool files and any other files for this printer will be stored. Usually I call it “/var/spool/lpd/printername”. The file limit limits the size of the spool files. The print server name is the name of the server the printer is on. For a Novell system, a list of servers can be found (after logging on) by typing “slist”. The print queue name is the name of the printer on the server. On a Novell system it can be found by typing “pqlist -S servername” after logging on. The user and password is your username and password you use to log on to the network. The input filter is setup by printtool. There is no way, that I currently know of, to specify your own custom filter using printtool directly. Below is an example “/etc/printcap file created by printtool:

# /etc/printcap
# Please don’t edit this file directly unless you know what you are doing!
# Be warned that the control-panel printtool requires a very strict format!
# Look at the printcap(5) man page for more info.
# This file can be edited with the printtool in the control-panel.

##PRINTTOOL3## NCP ljet4 300×300 letter {} LaserJet4 Default 1
lp:\ :sd=/var/spool/lpd/lp:\

##PRINTTOOL3## NCP ljet4 300×300 letter {} LaserJet4 Default {}
mylp:\ :sd=/var/spool/lpd/mylp:\

In the script program “/var/spool/lpd/mylp/filter” the contents of the printed file are received as standard input. The type of file the standard input is can be determined by the command “file –” where the “-” sign indicates standard input. There is an undocumented program, apparently for rewinding standard input, probably written by Redhat called “rewindstdin”. This is used to allow the script file to look at the printer file several times. A variable string is built called “bestpath”. This string will for most standard text files include “cat – |”.

For other systems, use a program to format data to avoid the staircase effect like:

  • magicfilter
  • The Redhat printtool. Become root and run printtool. Be sure to SETENV DISPLAY :0.0 and “xhost +”.

Below are a list of files that apply to printing.

  • lpd – Print daemon to provide print services to linux
  • /etc/printcap – Printer capability data base
  • smbclient – Used to print through Samba.
  • nprint – Netware print client
  • pqlist – Netware list of printers
  • pserver – Netware print server (daemon)

To see a list of printers on Netware server “main_serv1”, type “pqlist -S main_serv1”

A listing of the script file “neton”:

main_serv1 $1

A listing of the script file “netoff”:

ncpumount $usernetwork

A listing of the script file “main_serv1”:

netserv $0 $1

A listing of the script file “netserv”:


if test -d $usernetwork
   echo "Mounting on $usernetwork"
   if mkdir $usernetwork
      echo "$usernetwork directory created"
      echo "Failure creating $usernetwork"

if [ $status -eq 1 ]
   if ncpmount -S $1 -U $2 $usernetwork 
      echo "$1 server mounted for user $2 on $usernetwork"
      echo "Failure mounting $1 server for user $2 on $usernetwork"

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s