SUMMARY: NIS printcap

From: Jian Ye (ye@Software.ORG)
Date: Fri Apr 01 1994 - 09:54:30 CST


Hi Great ones,

I appologize for ask a question that has been summarized before.
But since 4 out of 11 people who responded wants a summary, I figure might
as well resummarize it. I think this should be included in the FAQ.

The answer to my question:

How to make a NIS printcap (without spend any money)?

is NO WAY! but there is a work around seems to work well, I haven't try it yet,
but trust me I will soon.

As most of you indicated to me that in SUNOS 4.1.X, lpr will not bother to
check the NIS database since SUN doesn't want us to have that feature, and
SUN wants to charge extra $$$$ for that. Except for Sun386i running
SunOS 4.0.3, it is not possible.

The work around is to create a NFS printcap indicated by Donald McLachlan.

Thank you Donald! here it goes:

I have asked about this in the past, but I have not received any good answers.
Here is an alternate solution you may be interested in which I use.

I have a file server which exports /usr/local. I have created the file
/usr/local/etc/printcap. On ALL machines (including the file server)
/etc/printcap is a symbolic link to /usr/local/etc/printcap.

This way, there is only 1 file to maintain for ALL the machines.

To support printers which are directly connected to a machines serial ports
I have done the following (how is your printcap understanding?).

All users wanting to print to the printer connected to mars do
lpr -Pmars filename. Lpd on the machine they are working on forwards the
print job to the remote machine (:rm=) mars.dgrc.doc.ca and is queued up
for to the printer (:rp=) mars_lp. The mars_lp entry spools the job to the
printer on mars' ttya.

The joy of this system is there is only 1 file to maintain, and that
lpr -Pmars will even work when you are logged in on mars.

#
#
1|mars|spooler for mars_lp:\
        :lf=/usr/adm/lpd-errs:\
        :lp=:\
        :mx#0:\
        :pl#0:\
        :pw#0:\
        :rp=mars_lp:\
        :rm=mars.dgrc.doc.ca:\
        :rw:\
        :sd=/usr/spool/lpd/1:\
        :sh:
#
2|mars_lp|QMS PS_815 printer in bldg 2b, rm 6:\
        :br#9600:\
        :if=/usr/local/qms/qms-serial-filter:\
        :lf=/usr/adm/lpd-errs:\
        :lp=/dev/ttya:\
        :ms=-parenb,cs8,ixoff,ixon,ixany:\
        :mx#0:\
        :pl#0:\
        :pw#0:\
        :rw:\
        :sd=/var/spool/lpd/2:\
        :sh:

Donald McLachlan e-mail donald.mclachlan@crc.doc.ca
Communications Research Centre / DRL office 613-998-2845
3701 Carling Ave., lab 613-998-2423
Ottawa, Ontario fax 613-990-7987
K2H 8S2

There is another approach which might also work indicated by Celso de Souza
Lima. Thank you Celso, the only reason I don't want to go with this idea is
more steps have to take to get what I want, and I am a simple minded lazy guy.

>>I remember seeing somebody asked about setting up nis printcap.

Yes! The consensus was that there is no way to implement it without some
tricks. The major trick is to build a map with the containing your
printcap client file, and in the startup section of your /etc/rc
just after the setup of the YP you can copy the map to the file /etc/printcap
using ypcat.
Many people thinks that the transfer via rdist was cleaner.

At least it was what I understood. I didn't try it.

hope it helps.

--celso

Also Hal Stern indicated to me that sun consulting sells CONSULT-NISLPD,
which is a full NIS printcap and lpd/lpr/lpq kit for 4.1.x.

If wasn't for the recent 10% layoff in my company I might ask my boss, but
I am not going to stick my neck out this time.

Other people told me that it can't be done with NIS map on SUN Sparc. I
would like to thank you for saving me time trying to get a dead horse to
walk.

Finally, I would like to thank all of you who responded. Thank you
for your time and support.

Mr T Crummey (DIJ) <tom@sees.bangor.ac.uk>
Max <bogart@bpb.it>
sckhoo@emtds1.nsc.com (Swee-Chuan Khoo)
Eckhard.Rueggeberg@ts.go.dlr.de (Eckhard Rueggeberg)
feldt@phyast.nhn.uoknor.edu (Andy Feldt)
Pat Cain <pjc@denver.ssds.com>
stern@sunrise.East.Sun.COM (Hal Stern - NE Area Systems Engineer)
anchi@mailhost.gcm.com (Anchi Zhang)
nishan@lambo.alldata.com (Nishan Sandhar)
don@mars.dgrc.doc.ca (Donald McLachlan)
celso@topazio.dcc.ufmg.br (Celso de Souza Lima)

-- Jian



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:58 CDT