How to configure HP-UX remote spooling using the command line
This article explain how to configure a remote spooling print queue on HP-UX Operating Environment using the command line.
1. Verify that you have superuser capabilities.
2. Add the remote printer using lpadmin command.
If the remote printer is on an HP-UX system, use the following command.
# lpadmin -plocal_printer -v /dev/null -mrmodel \ -ormremote_machine -orpremote_dest -ocmrcmodel \ -osmrsmodel
If the remote printer is not on an HP-UX system, use the following command:
# lpadmin -plocal_printer -v /dev/null -mrmodel \ -ormremote_machine -orpremote_dest -ocmrcmodel \ -osmrsmodel -ob3
3. Allow print requests to be accepted for the newly added remote printer.
# /usr/sbin/accept local_printer
4. Enable the newly added printer to process print requests.
# /usr/bin/enable local_printer
5. If the printer being added will be the default printer, execute the following:
# /usr/sbin/lpadmin -dlocal_printer
6. Start the LP spooler if it is not already running to process print requests.
7. Send a sample print job to the printer.
If it prints, the remote printing daemon,rlpdaemon is active on the system and your task is completed.
If your print job does not print, the remote printing daemon (rlpdaemon) is not active yet on the remote machine. Activate the rlpdaemon on the host system where the remote printer resides, as follows:
Examine the file /etc/inetd.conf and look for the following line:
# printer stream tcp nowait root /usr/sbin/rlpdaemon rlpdaemon -i
If a # sign appears at the beginning of the line, the rlpdaemon line is commented out, preventing the printer from printing remotely.
Edit the file /etc/inetd.conf to remove the # sign. Save the file.
8. Check /etc/services and look for:
# printer 515/tcp spooler #remote print spooling
If a # sign appears at the beginning of the line, the service is commented out, preventing the remote print spooler from serving the printer.
Edit the file to remove the # sign in the first column. Save the file.
9. Reconfigure the inetd superdemon, forcing it to reread the /etc/inetd.conf file.
# /usr/sbin/inetd -c
10. Look for entries in /var/adm/inetd.sec that restrict which systems can send remote print requests.
Test the printer using the LP spooler, then check the LP spooler’s status. For example:
# lp -dlocal_printer /etc/motd # lpstat -t