SCIENTIFIC-LINUX-USERS Archives

September 2006

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Reply To:
Date:
Thu, 28 Sep 2006 18:11:03 -0500
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (67 lines)
You can prevent the printtool from overwriting your hand edits by
editing /etc/rc.d/init.d/cups.  There is a line in the start() function --
'config' which calls the shell function config() (also in the same script)
that calls the printconf tool.  Simply comment this line out and your
hand-edits will stay in place.



On Thu, 28 Sep 2006, Michael Hannon wrote:

> Hi, folks.  I'm trying to find out if there is some way to make permanent 
> changes, such as the addition of access controls, to the cupsd configuration 
> file.
>
> Here's an example of the thing I'd like to accomplish.  We typically add a 
> print queue to a server using the system-config-printer utility. After that 
> there is a stanza in /etc/cups/cupsd.conf that looks something like:
>
>    <Location /printers/r472>
>    Order Deny,Allow
>    Deny From All
>    Allow From 127.0.0.1
>    AuthType None
>    </Location>
>
> But we need to have client systems in our subnet print via this server as 
> well, so we add (i.e., using vim or emacs) a line to the stanza allowing 
> access from our subnet:
>
>    <Location /printers/r472>
>    Order Deny,Allow
>    Deny From All
>    Allow From 127.0.0.1
>    Allow From 169.237.nnn.*
>    AuthType None
>    </Location>
>
> After that we restart the cups daemon, and we have the desired result.
>
> On the other hand, there is now a line in /etc/cupsd.conf that says:
>
>    Lines below are automatically generated - DO NOT EDIT
>
> I haven't tested this in SL 4.3, but in SL 3.x the hand edits that we made 
> DID seem to disappear whenever we ran the print tool.  We worked around the 
> problem simply by keeping a reference copy of cupsd.conf around so that we 
> could quickly restore our configuration if necessary.
>
> We've looked through the options in the system-config-printer utility. We've 
> looked through the options in the CUPS admin utility:
>
>    http://localhost:631/admin
>
> We can't find any place to specify such things as the "Allow From" line.
>
> Furthermore, the CUPS documentation itself makes a point of saying that the 
> configuration file is a simple text file, so it's easy to edit. Also, the 
> discussions that we've found on the web seem to suggest that hand editing is 
> the way to go.
>
> I am evidently missing something basic here.  How can we insert access 
> controls, etc., such that the changes will be preserved across invocations of 
> system-config-printer?  Can somebody enlighten me?  Thanks.
>
> 					- Mike
>

ATOM RSS1 RSS2