start / stop printer from Webinterface only possible as root

Roland Hager news at roland-hager.de
Thu Sep 21 00:00:46 PDT 2006


I configured a Samsung ML-1710 connected via USB to be reachable from internal network.
So far everything works fine. All users are able to print.

The problem is that from time to time the printer switches to "Paused" mode.
No problem just push "Start Printer" button on the cups website but this needs to be done as the
root user.

I already configured cups so that some users have access to the /admin pages and they are able to
view the "Administration" site. They could change the Configuration Files but are not allowed to add
classes / printers. They are also not allowed to "Start Printer" after it changes to "Pause" mode.
Is there a special directive or do i have to set some file permissions?

I'am using a self compiled cups 1.2.0 .
Locations are set as followed in cupsd.conf:

<Location />
  Encryption IfRequested
  Satisfy All
  Order deny,allow
  Deny From All
  Allow From 127.0.0.1
  Allow From 127.0.0.2
  Allow From @LOCAL
  Allow From 192.168.1.*
</Location>

<Location /admin>
  Require user root roland
  Encryption IfRequested
  Satisfy All
  Order deny,allow
  Deny From All
  Allow From 127.0.0.1
  Allow From @LOCAL
  Allow From 192.168.1.*
</Location>



Thanks for your help!



here an extract of cups errorlog

D [21/Sep/2006:08:52:09 +0200] cupsdAcceptClient: 6 from 192.168.1.2:631 (IPv4)
D [21/Sep/2006:08:52:09 +0200] cupsdReadClient: 6 GET
/admin/?op=start-printer&printer_name=Samsung_ML-1710_USB_1 HTTP/1.1
D [21/Sep/2006:08:52:09 +0200] cupsdReadClient: 6 Browser asked for language "de.UTF-8"...
E [21/Sep/2006:08:52:09 +0200] cupsdAuthorize: Empty Basic password!
D [21/Sep/2006:08:52:09 +0200] cupsdSendError: 6 code=401 (Unauthorized)
D [21/Sep/2006:08:52:09 +0200] cupsdCloseClient: 6
D [21/Sep/2006:08:52:16 +0200] cupsdAcceptClient: 6 from 192.168.1.2:631 (IPv4)
D [21/Sep/2006:08:52:16 +0200] cupsdReadClient: 6 GET
/admin/?op=start-printer&printer_name=Samsung_ML-1710_USB_1 HTTP/1.1
D [21/Sep/2006:08:52:16 +0200] cupsdReadClient: 6 Browser asked for language "de.UTF-8"...
E [21/Sep/2006:08:52:16 +0200] cupsdAuthorize: Empty Basic password!
D [21/Sep/2006:08:52:16 +0200] cupsdSendError: 6 code=401 (Unauthorized)
D [21/Sep/2006:08:52:16 +0200] cupsdCloseClient: 6
D [21/Sep/2006:08:52:21 +0200] cupsdAcceptClient: 6 from 192.168.1.2:631 (IPv4)
D [21/Sep/2006:08:52:21 +0200] cupsdReadClient: 6 GET
/admin/?op=start-printer&printer_name=Samsung_ML-1710_USB_1 HTTP/1.1
D [21/Sep/2006:08:52:21 +0200] cupsdReadClient: 6 Browser asked for language "de.UTF-8"...
D [21/Sep/2006:08:52:21 +0200] cupsdAuthorize: username="roland"
D [21/Sep/2006:08:52:21 +0200] CGI /usr/lib/cups/cgi-bin/admin.cgi started - PID = 19416
I [21/Sep/2006:08:52:21 +0200] Started "/usr/lib/cups/cgi-bin/admin.cgi" (pid=19416)
D [21/Sep/2006:08:52:21 +0200] cupsdSendCommand: 6 file=9
D [21/Sep/2006:08:52:21 +0200] [CGI] admin.cgi started...
D [21/Sep/2006:08:52:21 +0200] [CGI] http=0x510640
D [21/Sep/2006:08:52:21 +0200] [CGI] op="start-printer"...
D [21/Sep/2006:08:52:21 +0200] cupsdAcceptClient: 8 from localhost:631 (IPv4)
D [21/Sep/2006:08:52:21 +0200] cupsdReadClient: 8 POST /admin/ HTTP/1.1
D [21/Sep/2006:08:52:21 +0200] cupsdAuthorize: No authentication data provided.
D [21/Sep/2006:08:52:21 +0200] cupsdSendError: 8 code=401 (Unauthorized)
D [21/Sep/2006:08:52:21 +0200] cupsdCloseClient: 8
D [21/Sep/2006:08:52:21 +0200] cupsdAcceptClient: 8 from localhost:631 (IPv4)
D [21/Sep/2006:08:52:21 +0200] cupsdReadClient: 8 POST /admin/ HTTP/1.1
D [21/Sep/2006:08:52:21 +0200] cupsdAuthorize: username="roland"
D [21/Sep/2006:08:52:21 +0200] Resume-Printer ipp://localhost/printers/Samsung_ML-1710_USB_1
E [21/Sep/2006:08:52:21 +0200] Resume-Printer: Unauthorized
D [21/Sep/2006:08:52:21 +0200] cupsdSendError: 8 code=401 (Unauthorized)
D [21/Sep/2006:08:52:21 +0200] cupsdAcceptClient: 10 from localhost:631 (IPv4)
D [21/Sep/2006:08:52:21 +0200] cupsdCloseClient: 8
D [21/Sep/2006:08:52:21 +0200] cupsdReadClient: 10 POST /admin/ HTTP/1.1
D [21/Sep/2006:08:52:21 +0200] cupsdAuthorize: username="roland"
D [21/Sep/2006:08:52:21 +0200] Resume-Printer ipp://localhost/printers/Samsung_ML-1710_USB_1
E [21/Sep/2006:08:52:21 +0200] Resume-Printer: Unauthorized
D [21/Sep/2006:08:52:21 +0200] cupsdSendError: 10 code=401 (Unauthorized)
D [21/Sep/2006:08:52:21 +0200] cupsdAcceptClient: 8 from localhost:631 (IPv4)
D [21/Sep/2006:08:52:21 +0200] cupsdCloseClient: 10
D [21/Sep/2006:08:52:21 +0200] cupsdReadClient: 8 POST /admin/ HTTP/1.1
D [21/Sep/2006:08:52:21 +0200] cupsdAuthorize: username="roland"
D [21/Sep/2006:08:52:21 +0200] Resume-Printer ipp://localhost/printers/Samsung_ML-1710_USB_1
E [21/Sep/2006:08:52:21 +0200] Resume-Printer: Unauthorized
D [21/Sep/2006:08:52:21 +0200] cupsdSendError: 8 code=401 (Unauthorized)
D [21/Sep/2006:08:52:21 +0200] PID 19416 (/usr/lib/cups/cgi-bin/admin.cgi) exited with no errors.
D [21/Sep/2006:08:52:21 +0200] [CGI] cgi_passwd(prompt="Password for lp on localhost? ") called!
D [21/Sep/2006:08:52:21 +0200] cupsdSendError: 6 code=401 (Unauthorized)
D [21/Sep/2006:08:52:21 +0200] cupsdCloseClient: 6
D [21/Sep/2006:08:52:21 +0200] cupsdCloseClient: 8
D [21/Sep/2006:08:52:37 +0200] cupsdAcceptClient: 6 from 192.168.1.2:631 (IPv4)
D [21/Sep/2006:08:52:37 +0200] cupsdReadClient: 6 GET
/admin/?op=start-printer&printer_name=Samsung_ML-1710_USB_1 HTTP/1.1
D [21/Sep/2006:08:52:37 +0200] cupsdReadClient: 6 Browser asked for language "de.UTF-8"...
D [21/Sep/2006:08:52:37 +0200] cupsdAuthorize: username="roland"
D [21/Sep/2006:08:52:37 +0200] CGI /usr/lib/cups/cgi-bin/admin.cgi started - PID = 19417
I [21/Sep/2006:08:52:37 +0200] Started "/usr/lib/cups/cgi-bin/admin.cgi" (pid=19417)
D [21/Sep/2006:08:52:37 +0200] cupsdSendCommand: 6 file=9
D [21/Sep/2006:08:52:37 +0200] [CGI] admin.cgi started...
D [21/Sep/2006:08:52:37 +0200] cupsdAcceptClient: 8 from localhost:631 (IPv4)
D [21/Sep/2006:08:52:37 +0200] [CGI] http=0x510640
D [21/Sep/2006:08:52:37 +0200] [CGI] op="start-printer"...
D [21/Sep/2006:08:52:37 +0200] cupsdReadClient: 8 POST /admin/ HTTP/1.1
D [21/Sep/2006:08:52:37 +0200] cupsdAuthorize: No authentication data provided.
D [21/Sep/2006:08:52:37 +0200] cupsdSendError: 8 code=401 (Unauthorized)
D [21/Sep/2006:08:52:37 +0200] cupsdCloseClient: 8
D [21/Sep/2006:08:52:37 +0200] cupsdAcceptClient: 8 from localhost:631 (IPv4)
D [21/Sep/2006:08:52:37 +0200] cupsdReadClient: 8 POST /admin/ HTTP/1.1
D [21/Sep/2006:08:52:37 +0200] cupsdAuthorize: username="roland"
D [21/Sep/2006:08:52:37 +0200] Resume-Printer ipp://localhost/printers/Samsung_ML-1710_USB_1
E [21/Sep/2006:08:52:37 +0200] Resume-Printer: Unauthorized
D [21/Sep/2006:08:52:37 +0200] cupsdSendError: 8 code=401 (Unauthorized)
D [21/Sep/2006:08:52:37 +0200] cupsdAcceptClient: 10 from localhost:631 (IPv4)
D [21/Sep/2006:08:52:37 +0200] cupsdCloseClient: 8
D [21/Sep/2006:08:52:37 +0200] cupsdReadClient: 10 POST /admin/ HTTP/1.1
D [21/Sep/2006:08:52:37 +0200] cupsdAuthorize: username="roland"
D [21/Sep/2006:08:52:37 +0200] Resume-Printer ipp://localhost/printers/Samsung_ML-1710_USB_1
E [21/Sep/2006:08:52:37 +0200] Resume-Printer: Unauthorized
D [21/Sep/2006:08:52:37 +0200] cupsdSendError: 10 code=401 (Unauthorized)
D [21/Sep/2006:08:52:37 +0200] cupsdAcceptClient: 8 from localhost:631 (IPv4)
D [21/Sep/2006:08:52:37 +0200] cupsdCloseClient: 10
D [21/Sep/2006:08:52:37 +0200] cupsdReadClient: 8 POST /admin/ HTTP/1.1
D [21/Sep/2006:08:52:37 +0200] cupsdAuthorize: username="roland"
D [21/Sep/2006:08:52:37 +0200] Resume-Printer ipp://localhost/printers/Samsung_ML-1710_USB_1
E [21/Sep/2006:08:52:37 +0200] Resume-Printer: Unauthorized
D [21/Sep/2006:08:52:37 +0200] cupsdSendError: 8 code=401 (Unauthorized)
D [21/Sep/2006:08:52:37 +0200] PID 19417 (/usr/lib/cups/cgi-bin/admin.cgi) exited with no errors.
D [21/Sep/2006:08:52:37 +0200] [CGI] cgi_passwd(prompt="Password for lp on localhost? ") called!
D [21/Sep/2006:08:52:37 +0200] cupsdSendError: 6 code=401 (Unauthorized)
D [21/Sep/2006:08:52:37 +0200] cupsdCloseClient: 6
D [21/Sep/2006:08:52:37 +0200] cupsdCloseClient: 8




More information about the cups mailing list