Linux Novell Access and Printing
Novell Network Access
Use the package ncpfs. The function ncpmount can then be used to mount network drives.
- 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
- 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.)
- ncpmount - mount all the volumes on a specified Novell fileserver.
Ex: ncpmount -S main_serv1 -U george /mnt/network
- 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
- 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:
- 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".
- Find out what printers are available on the server you're logged in on by typing "pqlist –S servername". Ex: pqlist -S main_serv1
- 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 300x300 letter {} LaserJet4 Default 1
lp:\
:sd=/var/spool/lpd/lp:\
:mx#0:\
:sh:\
:if=/var/spool/lpd/lp/marktest:\
:af=/var/spool/lpd/lp/acct:\
:lp=/dev/null:
##PRINTTOOL3## NCP ljet4 300x300 letter {} LaserJet4 Default {}
mylp:\
:sd=/var/spool/lpd/mylp:\
:mx#0:\
:sh:\
:af=/var/spool/lpd/mylp/acct:\
:lp=/dev/null:\
:if=/var/spool/lpd/mylp/filter:
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":
usernetwork=$HOME/main_serv1
ncpumount $usernetwork
A listing of the script file "main_serv1":
netserv $0 $1
A listing of the script file "netserv":
#!/bin/bash
usernetwork=$HOME/$1
status=1
if test -d $usernetwork
then
echo "Mounting on $usernetwork"
else
if mkdir $usernetwork
then
echo "$usernetwork directory created"
else
echo "Failure creating $usernetwork"
status=0
fi
fi
if [ $status -eq 1 ]
then
if ncpmount -S $1 -U $2 $usernetwork
then
echo "$1 server mounted for user $2 on $usernetwork"
else
echo "Failure mounting $1 server for user $2 on $usernetwork"
fi
fi
|