help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: configuring CUPS with cfengine?


From: Jason Cater
Subject: Re: configuring CUPS with cfengine?
Date: Wed, 10 Nov 2004 09:27:08 -0600

Erik, 

I, too, use cfengine to configure cups. 

Despite cups promoting its web interface for managing printers, it is
quite straight forward to do using the underlying text config files. 

The important files on the print server are /etc/cups/printers.conf and
/etc/cups/ppd/*. (The /etc/cups/ part may vary depending on your distro.)

"printers.conf" is a simple XML file. I have cups do a copy:: for this
file. I still hand-maintain it, though, as each printer only requires a
small cut-and-pasted xml fragment:

<Printer hp2>
  Info HP LaserJet 2200DN
  Location Memphis Reception Area
  DeviceURI socket://hp2:9100/
  State Idle
  Accepting Yes
  JobSheets none none
  QuotaPeriod 0
  PageLimit 0
  KLimit 0
</Printer>

(The printer name is hp2, and it is a JetDirect printer -- hence the
socket://hp2:9100/ in DeviceURI; Info and Location are just descriptions;
the other fields I leave alone. )

Then you just need to drop an hp2.ppd file into /etc/cups/ppd/, and have
cfengine reload cups -- the server is then set up.  You can get ppd files
from your printer vendor, if the printer is Postscript-aware, or from
http://www.linuxprinting.org. One note about the ppd files -- my friend
had issues with these ppd's being symlinks -- cups wouldn't work right
until he used copies instead of links.

You may need to also modify the <Location /> section in
/etc/cups/cupsd.conf to include a better AllowFrom line, depending on your
networking needs. 

On any client machines, you need cfengine to add/replace any "Browsing"
lines in /etc/cups/cupsd.conf with
  Browsing On
And the clients are good to go after a cups reload. 

Depending on your needs, you may also want to modify /etc/cups/lpoptions
to add default printers to individual machines. 

For example, my lpoptions has this line: 

  Default hp0

which causes hp0 to be the default printer on that machine. 

Hope this helps. 

-- Jason 


On Wed, 10 Nov 2004 08:07:19 -0500
Erik Dykema <ed2019@columbia.edu> wrote:

> Hi-
>       We're going to start using CUPS here on some of our machines,
>       switching from 
> LPRNG.  Does anyone have any experience configuring CUPS with cfengine? 
> Any pointers appreciated!
> 
> thanks,
> Erik
> 
> 
> _______________________________________________
> Help-cfengine mailing list
> Help-cfengine@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-cfengine
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]