Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'CUPS and network security' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
CUPS and network security
Authored by: everette on Dec 16, '03 10:13:20AM

So for those looking for a solution that does not disable cups there is another option. You can edit /etc/cups/cupd.conf as suggested but change the following (tested in 10.3 only but should work in 10.2 or any cups).
Change:
<Location /admin>
#
# You definitely will want to limit access to the administration functions.
# The default configuration requires a local connection from a user who
# is a member of the system group to do any admin tasks. You can change
# the group name using the SystemGroup directive.
#

AuthType None
AuthClass Anonymous

## Restrict access to local domain
Order Deny,Allow
Deny From All
Allow From 127.0.0.1

#Encryption Required
</Location>
to:
<Location /admin>
## Require Password and Restict to Users in admin group
AuthType Basic
AuthClass Group
AuthGroupName admin

## Restrict access to local domain
Order Deny,Allow
Deny From All
Allow From 127.0.0.1

</Location>
-----
This will effectively disable Printer Setup Utility except for setting the user's default printer. http://localhost:631 will still let folks in but when you click on a button for admin task a login dialog will appear (type in the name and password of an admin account to use it). Also any user using lpadmin, enable, disable, etc will be asked for a password. For some reason Printer Setup will not prompt for passwords so you have to disable this location if you want to add printers. To disable it put # in front of each of the lines you just changed and restart the printing subsystem.
An easy way to to restart the printing subsystem is in Terminal type:
sudo -s (and type admin password if asked)
SystemStarter stop PrintingServices
SystemStarter start PrintingServices

Also if you need to set a default printer as a user without Printer Setup you can try:
lpoptions -d printername
Where printername is replaced by the CUPS name of the printer you want (doing the same command under sudo should set the default system wide). To get the CUPS names of the printers and find the default printer use
lpstat -d -p
I hope these tips will help.



[ Reply to This | # ]
CUPS and network security
Authored by: artemio on Feb 01, '05 06:35:49AM

In connection with this hint (which I found quite useful), after not using the web interface to manage printers for a while I've run into a weird and frustrating problem, namely when I try to perform an administrative task (changing a printer configuration, say) my user name and password are not recognized. Do you have any idea why this is so and, more importantly, how to correct this?

Thanks a lot,

Artemio Gonzalez
artemio@eresmas.net



[ Reply to This | # ]