Moving /etc/printers.conf

Hi all,

I am requested to move printer definitions/configurations to new box (Solaris 10). The old box (Solaris 8) only has /etc/printers.conf configured. There are no /etc/lp/interface or /etc/lp/printer files.

What I did was, I just moved /etc/printers.conf file to the new box and restarting the print service.

The new box is able to detect and register all the print servers. But they are unable to accept any requests.

I am not very familiar with print services and all. I wanna ask whether this lpd protocol thingy affects anything? My new box can detect the servers, just that they are shown as disabled and not accepting requests.

# lpstat -p laser6l
printer laser6l disabled since Wed Oct 10 13:30:00 2012. available.
Invalid printer
# lp test.txt
_default: not-accepting
# lp test.txt -d laser6l
_default: aborting request, -d: No such file or directory

I'm really stumped on this one. You guys happen to know anything I left out?

Thanks.

---------- Post updated at 04:02 PM ---------- Previous update was at 01:32 PM ----------

I discovered something. In the old box, there is a /etc/lp/Systems file.

#
#ident  "@(#)Systems    1.8     97/06/09 SMI"   /* SVr4.0 1.2   */
# This file previously contained an LP private interface.  It's
# contents are no longer used by the printing system and therefore
# obsolete.  Expect the file to be removed in a subsequent release
# of Solaris, along with the lpsystem(1M) command.
+:x:-:bsd:-:n:10:-:-:Allow all connections
192.200.9.23:x:-:bsd:-:n:10:-:-:Cheque_Room
192.200.110.74:x:-:bsd:-:n:10:-:-:KT_FINKT
192.200.150.31:x:-:bsd:-:n:10:-:-:KL_FINKLG1
192.200.120.32:x:-:bsd:-:n:10:-:-:MG_FINMSG
192.200.130.32:x:-:bsd:-:n:10:-:-:MR_FINMUAR
192.200.130.14:x:-:bsd:-:n:10:-:-:Stor_FINMUAR2
192.200.100.32:x:-:bsd:-:n:10:-:-:PTN_FINPTN
192.200.9.68:x:-:bsd:-:n:10:-:-:Peng_epsonjb
192.200.160.36:x:-:bsd:-:n:10:-:-:Zuraini_SGT
192.200.140.159:x:-:bsd:-:n:10:-:-:
192.200.140.29:x:-:bsd:-:n:10:-:-:
192.200.130.157:x:-:bsd:-:n:10:-:-:
192.200.9.31:x:-:bsd:-:n:10:-:-:
192.200.160.132:x:-:bsd:-:n:10:-:-:
192.200.9.16:x:-:bsd:-:n:10:-:-:
192.200.9.135:x:-:bsd:-:n:10:-:-:
192.200.10.69:x:-:bsd:-:n:10:-:-:
192.200.9.45:x:-:bsd:-:n:10:-:-:Kontrak_CPU3
192.200.10.190:x:-:bsd:-:n:10:-:-:
192.200.9.54:x:-:bsd:-:n:10:-:-:
192.200.110.103:x:-:bsd:-:n:10:-:-:
192.200.10.168:x:-:bsd:-:n:10:-:-:
-:x:-:bsd:-:n:10:-:-:
t:x:-:bsd:-:n:10:-:-:
bsd:x:-:bsd:-:n:10:-:-:
192.200.9.219:x:-:bsd:-:n:10:-:-:
192.200.10.189:x:-:bsd:-:n:10:-:-:
192.200.22.81:x:-:bsd:-:n:10:-:-:
192.200.23.34:x:-:bsd:-:n:10:-:-:
192.200.23.42:x:-:bsd:-:n:10:-:-:
192.200.22.67:x:-:bsd:-:n:10:-:-:
192.200.21.49:x:-:bsd:-:n:10:-:-:
192.200.22.42:x:-:bsd:-:n:10:-:-:
192.200.21.56:x:-:bsd:-:n:10:-:-:
192.200.21.32:x:-:bsd:-:n:10:-:-:
192.200.9.71:x:-:bsd:-:n:10:-:-:
192.200.25.36:x:-:bsd:-:n:10:-:-:
192.200.9.38:x:-:bsd:-:n:10:-:-:

That file has been obosleted.

I typed "lpsystems -l" in the old box. And it shows me this

root@Hino # lpsystem -l
System:                     +
Type:                       bsd
Connection timeout:         never
Retry failed connections:   after 10 minutes
Comment:                    Allow all connections
System:                     192.200.9.23
Type:                       bsd
Connection timeout:         never
Retry failed connections:   after 10 minutes
Comment:                    Cheque_Room
System:                     192.200.110.74
Type:                       bsd
Connection timeout:         never
Retry failed connections:   after 10 minutes
Comment:                    KT_FINKT
System:                     192.200.150.31
Type:                       bsd
Connection timeout:         never
Retry failed connections:   after 10 minutes
Comment:                    KL_FINKLG1
System:                     192.200.120.32
Type:                       bsd
Connection timeout:         never
Retry failed connections:   after 10 minutes
Comment:                    MG_FINMSG
System:                     192.200.130.32
.
.
.

In the NEW BOX, it shows nothing. I suspect that is causing the issue. Anyone know of the new alternative for "/etc/lp/Systems" in Solaris 10?

LOL!

Yes, it does and this is probably one of the reasons your new server doesn't print anything.

"lpd" is short for "line printer daemon" and the name is pretty intuitive.

Consider a network communication via telnet: there is a specific protocol and a designated port for it to operate (have a look in "/etc/services"). The protocol is like a common language. You also need a client and a server both speaking this protocol. The client is called "telnet" too and issuing "telnet foo" on the system "bar" will call this client and have it try to initiate a communication with the system "foo". To be successful on system "foo" there has to run a "daemon" listening on the designated port for clients requesting its services. The daemon is called "telnetd" and steered by a super-daemon called "inetd" (I[nter]net-daemon).

The communication between printers and systems offering print queues ("print servers") is similar, just the protocol is different: lpdp instead of telnet. It operates on port 515 (again: have a look in "/etc/services").

You put a print job into a queue with the "lpr" (line printer remote) utility. The printing system puts it into the queue until the necessary server becomes available for it (spooling). In fact this step just means to maintain a directory with waiting print jobs - simply files waiting to be dumped into a printer. You can find these files somewhere under "/var", probably "/var/spool/lp" or something such (i am not too knowledgeable in Solaris, but somewhere in this vicinity you will find the jobs).

Once a printer says it is ready to accept files this job file is being sent to it using the client and server part of the lpd. The print server maintaining the queue acts as a lient, the printer hardware as the server: commonly a printer just prints, a network printer has a network card built in with a lpd running on top of its hardware. This lpd is the "server" for the job.

You can test this (at least with the common HP printers using JetDirect cards) by issuing "telnet <printer-ip> 515" on the command line. You will get a banner saying "HP Jetdirect" and some diagnostic information before it says "connection closed" - of course. "telnet" speaks another protocol and can't really answer the requests of a lpd server, but it is enough to get this banner information sent before the processes recognize they don't share a common language.

Once the job is sent to the printer (more correctly: to its network card) and the lpd running there acknowledges the job being processed (this doesn't necessarily have to mean the file is completely or even in parts printed - it just says the server doesn't have to feel responsible for it any more) the print server clears the job from the queue. That is all.

PS: literature pointers
see RFC 1179 for the exact definition of the standard.
search for "Berkeley Printing System" (that's the name of the whole system) for manuals, documents, etc..

I hope this helps.

bakunin