Страница 1 из 1

Как открыть доступ к веб-интерфейсу CUPS?

Добавлено: 2010-11-27 2:41:42
UsCr
Здравствуйте.
Хочу сделать доступным по сети USB принтер на роутере. Для этого установил CUPS. Так как роутер не имеет в составе графической оболочки, ровно как и видеокарты в принципе, конфигурить планирую с компьютера из-за роутера (IP 172.16.0.3). Проблема в том, что я не могу попасть на веб-интерфейс CUPS.
Чтение мануалов привело вот к такому конфигу:

Код: Выделить всё

#
# "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $"
#
# Sample configuration file for the CUPS scheduler.  See "man cupsd.conf" for a
# complete description of this file.
#

# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel debug

# Administrator user group...
SystemGroup wheel

Port 631
# Only listen for connections from the local machine.
Listen 172.16.0.1:631
#Listen 127.0.0.1:631
#Listen /var/run/cups.sock

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS

# Default authentication type, when authentication is required...
DefaultAuthType Basic

# Restrict access to the server...
<Location />
  Order allow,deny
#  Deny from all
  Allow from 172.16.0.3
</Location>

## Restrict access to local domain
Order Deny,Allow
allow 172.16.0.3

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
  Deny from all
  Allow from 172.16.0.3
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
  Allow from 172.16.0.3
</Location>

# Set the default printer/job policies...
<Policy default>
  # Job-related operations must be done by the owner or an administrator...
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # All printer operations require a printer operator to authenticate...
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

# Set the authenticated printer/job policies...
<Policy authenticated>
  # Job-related operations must be done by the owner or an administrator...
  <Limit Create-Job Print-Job Print-URI>
    AuthType Default
    Order deny,allow
  </Limit>

  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # All printer operations require a printer operator to authenticate...
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

#
# End of "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $".
#
При текущем конфиге получаю ошибку 403 при попытке перейти в раздел "Администрирование".

Если убрать строку Port 631 ИЛИ Allow from 172.16.0.3 в секции

Код: Выделить всё

<Location />
  Order allow,deny
#  Deny from all
  Allow from 172.16.0.3
</Location>
, то опять получаю ошибку 403 вообще при попытке зайти на веб-морду.
Как чинить?

Free BSD 8.1

Re: Как открыть доступ к веб-интерфейсу CUPS?

Добавлено: 2010-11-30 12:02:18
boriskaaaa
Попробуй

Код: Выделить всё

Allow from all
чё пишет?

Re: Как открыть доступ к веб-интерфейсу CUPS?

Добавлено: 2010-11-30 12:48:53
x6e6564
"from" лишнее:

Код: Выделить всё

Allow 172.16.0.3
Deny all
man cupsd.conf

Re: Как открыть доступ к веб-интерфейсу CUPS?

Добавлено: 2010-11-30 20:57:13
UsCr
x6e6564 писал(а):"from" лишнее:

Код: Выделить всё

Allow 172.16.0.3
Deny all
man cupsd.conf
Нет.
boriskaaaa писал(а):Попробуй

Код: Выделить всё

Allow from all
чё пишет?
Нет.
Вот кусок лога:

Код: Выделить всё

I [30/Nov/2010:21:59:05 +0300] Scheduler shutting down normally.
D [30/Nov/2010:21:59:05 +0300] Discarding unused server-stopped event...
X [30/Nov/2010:21:59:05 +0300] kevent() returned Bad file descriptor
I [30/Nov/2010:21:59:05 +0300] Saving job cache file "/var/cache/cups/job.cache"...
I [30/Nov/2010:21:59:06 +0300] Listening to :::631 (IPv6)
I [30/Nov/2010:21:59:06 +0300] Listening to 0.0.0.0:631 (IPv4)
I [30/Nov/2010:21:59:06 +0300] Listening to 172.16.0.1:631 (IPv4)
E [30/Nov/2010:21:59:06 +0300] Unknown directive Order on line 38.
E [30/Nov/2010:21:59:06 +0300] Unknown directive allow on line 39.
D [30/Nov/2010:21:59:06 +0300] cupsdDenyIP(loc=0x21507480(/admin), address=0:0:0:0, netmask=0:0:0:0)
I [30/Nov/2010:21:59:06 +0300] Remote access is enabled.
D [30/Nov/2010:21:59:06 +0300] Added auto ServerAlias Progress.localhost
D [30/Nov/2010:21:59:06 +0300] Added auto ServerAlias Progress
I [30/Nov/2010:21:59:06 +0300] Loaded configuration file "/usr/local/etc/cups/cupsd.conf"
I [30/Nov/2010:21:59:06 +0300] Using default TempDir of /var/spool/cups/tmp...
I [30/Nov/2010:21:59:06 +0300] Configured for up to 100 clients.
I [30/Nov/2010:21:59:06 +0300] Allowing up to 100 client connections per host.
I [30/Nov/2010:21:59:06 +0300] Using policy "default" as the default!
I [30/Nov/2010:21:59:06 +0300] Full reload is required.
I [30/Nov/2010:21:59:06 +0300] Loaded MIME database from "/usr/local/share/cups/mime" and "/usr/local/etc/cups": 35 types, 41 filters...
I [30/Nov/2010:21:59:06 +0300] Loading job cache file "/var/cache/cups/job.cache"...
I [30/Nov/2010:21:59:06 +0300] Full reload complete.
I [30/Nov/2010:21:59:06 +0300] Cleaning out old temporary files in "/var/spool/cups/tmp"...
I [30/Nov/2010:21:59:06 +0300] Listening to :::631 on fd 6...
I [30/Nov/2010:21:59:06 +0300] Listening to 0.0.0.0:631 on fd 7...
I [30/Nov/2010:21:59:06 +0300] Listening to 172.16.0.1:631 on fd 8...
I [30/Nov/2010:21:59:06 +0300] Resuming new connection processing...
D [30/Nov/2010:21:59:06 +0300] Discarding unused server-started event...
D [30/Nov/2010:21:59:07 +0300] Report: clients=0
D [30/Nov/2010:21:59:07 +0300] Report: jobs=0
D [30/Nov/2010:21:59:07 +0300] Report: jobs-active=0
D [30/Nov/2010:21:59:07 +0300] Report: printers=0
D [30/Nov/2010:21:59:07 +0300] Report: printers-implicit=0
D [30/Nov/2010:21:59:07 +0300] Report: stringpool-string-count=119
D [30/Nov/2010:21:59:07 +0300] Report: stringpool-alloc-bytes=3968
D [30/Nov/2010:21:59:07 +0300] Report: stringpool-total-bytes=3048
D [30/Nov/2010:21:59:18 +0300] cupsdAcceptClient: 12 from 172.16.0.3:631 (IPv4)
D [30/Nov/2010:21:59:18 +0300] cupsdReadClient: 12 GET / HTTP/1.1
D [30/Nov/2010:21:59:18 +0300] cupsdSetBusyState: Active clients
D [30/Nov/2010:21:59:18 +0300] cupsdAuthorize: No authentication data provided.
D [30/Nov/2010:21:59:18 +0300] cupsdSetBusyState: Not busy
D [30/Nov/2010:21:59:18 +0300] cupsdReadClient: 12 GET /cups.css HTTP/1.1
D [30/Nov/2010:21:59:18 +0300] cupsdSetBusyState: Active clients
D [30/Nov/2010:21:59:18 +0300] cupsdAuthorize: No authentication data provided.
D [30/Nov/2010:21:59:18 +0300] cupsdSetBusyState: Not busy
D [30/Nov/2010:21:59:18 +0300] cupsdReadClient: 12 GET /images/left.gif HTTP/1.1
D [30/Nov/2010:21:59:18 +0300] cupsdSetBusyState: Active clients
D [30/Nov/2010:21:59:18 +0300] cupsdAuthorize: No authentication data provided.
D [30/Nov/2010:21:59:18 +0300] cupsdAcceptClient: 14 from 172.16.0.3:631 (IPv4)
D [30/Nov/2010:21:59:18 +0300] cupsdSetBusyState: Not busy
D [30/Nov/2010:21:59:18 +0300] cupsdAcceptClient: 13 from 172.16.0.3:631 (IPv4)
D [30/Nov/2010:21:59:18 +0300] cupsdReadClient: 14 GET /images/right.gif HTTP/1.1
D [30/Nov/2010:21:59:18 +0300] cupsdSetBusyState: Active clients
D [30/Nov/2010:21:59:18 +0300] cupsdAuthorize: No authentication data provided.
D [30/Nov/2010:21:59:18 +0300] cupsdReadClient: 13 GET /images/cups-icon.png HTTP/1.1
D [30/Nov/2010:21:59:18 +0300] cupsdAuthorize: No authentication data provided.
D [30/Nov/2010:21:59:18 +0300] cupsdSetBusyState: Not busy
D [30/Nov/2010:21:59:18 +0300] cupsdReadClient: 12 GET /images/sel.gif HTTP/1.1
D [30/Nov/2010:21:59:18 +0300] cupsdSetBusyState: Active clients
D [30/Nov/2010:21:59:18 +0300] cupsdAuthorize: No authentication data provided.
D [30/Nov/2010:21:59:18 +0300] cupsdSetBusyState: Not busy
D [30/Nov/2010:21:59:18 +0300] cupsdReadClient: 14 GET /images/unsel.gif HTTP/1.1
D [30/Nov/2010:21:59:18 +0300] cupsdSetBusyState: Active clients
D [30/Nov/2010:21:59:18 +0300] cupsdAuthorize: No authentication data provided.
D [30/Nov/2010:21:59:18 +0300] cupsdSetBusyState: Not busy
D [30/Nov/2010:21:59:20 +0300] cupsdReadClient: 13 GET /admin HTTP/1.1
D [30/Nov/2010:21:59:20 +0300] cupsdSetBusyState: Active clients
D [30/Nov/2010:21:59:20 +0300] cupsdAuthorize: No authentication data provided.
D [30/Nov/2010:21:59:20 +0300] cupsdCloseClient: 13
D [30/Nov/2010:21:59:20 +0300] cupsdSetBusyState: Not busy
D [30/Nov/2010:21:59:20 +0300] cupsdReadClient: 12 GET /favicon.ico HTTP/1.1
D [30/Nov/2010:21:59:20 +0300] cupsdSetBusyState: Active clients
D [30/Nov/2010:21:59:20 +0300] cupsdAuthorize: No authentication data provided.
D [30/Nov/2010:21:59:20 +0300] cupsdReadClient: 12 Closing because Keep-Alive disabled
D [30/Nov/2010:21:59:20 +0300] cupsdCloseClient: 12
D [30/Nov/2010:21:59:20 +0300] cupsdSetBusyState: Not busy
D [30/Nov/2010:21:59:21 +0300] cupsdReadClient: 14 GET /favicon.ico HTTP/1.1
D [30/Nov/2010:21:59:21 +0300] cupsdSetBusyState: Active clients
D [30/Nov/2010:21:59:21 +0300] cupsdAuthorize: No authentication data provided.
D [30/Nov/2010:21:59:21 +0300] cupsdReadClient: 14 Closing because Keep-Alive disabled
D [30/Nov/2010:21:59:21 +0300] cupsdCloseClient: 14
D [30/Nov/2010:21:59:21 +0300] cupsdSetBusyState: Not busy
I [30/Nov/2010:22:00:00 +0300] Scheduler shutting down normally.
D [30/Nov/2010:22:00:00 +0300] Discarding unused server-stopped event...
X [30/Nov/2010:22:00:00 +0300] kevent() returned Bad file descriptor
I [30/Nov/2010:22:00:00 +0300] Saving job cache file "/var/cache/cups/job.cache"...
I [30/Nov/2010:22:00:00 +0300] Listening to :::631 (IPv6)
I [30/Nov/2010:22:00:00 +0300] Listening to 0.0.0.0:631 (IPv4)
I [30/Nov/2010:22:00:00 +0300] Listening to 172.16.0.1:631 (IPv4)
E [30/Nov/2010:22:00:00 +0300] Unknown directive Allow on line 26.
E [30/Nov/2010:22:00:00 +0300] Unknown directive Order on line 39.
E [30/Nov/2010:22:00:00 +0300] Unknown directive allow on line 40.
D [30/Nov/2010:22:00:00 +0300] cupsdDenyIP(loc=0x21507480(/admin), address=0:0:0:0, netmask=0:0:0:0)
I [30/Nov/2010:22:00:00 +0300] Remote access is enabled.
D [30/Nov/2010:22:00:00 +0300] Added auto ServerAlias Progress.localhost
D [30/Nov/2010:22:00:00 +0300] Added auto ServerAlias Progress
I [30/Nov/2010:22:00:00 +0300] Loaded configuration file "/usr/local/etc/cups/cupsd.conf"
I [30/Nov/2010:22:00:00 +0300] Using default TempDir of /var/spool/cups/tmp...
I [30/Nov/2010:22:00:00 +0300] Configured for up to 100 clients.
I [30/Nov/2010:22:00:00 +0300] Allowing up to 100 client connections per host.
I [30/Nov/2010:22:00:00 +0300] Using policy "default" as the default!
I [30/Nov/2010:22:00:00 +0300] Full reload is required.
I [30/Nov/2010:22:00:00 +0300] Loaded MIME database from "/usr/local/share/cups/mime" and "/usr/local/etc/cups": 35 types, 41 filters...
I [30/Nov/2010:22:00:00 +0300] Loading job cache file "/var/cache/cups/job.cache"...
I [30/Nov/2010:22:00:00 +0300] Full reload complete.
I [30/Nov/2010:22:00:00 +0300] Cleaning out old temporary files in "/var/spool/cups/tmp"...
I [30/Nov/2010:22:00:00 +0300] Listening to :::631 on fd 6...
I [30/Nov/2010:22:00:00 +0300] Listening to 0.0.0.0:631 on fd 7...
I [30/Nov/2010:22:00:00 +0300] Listening to 172.16.0.1:631 on fd 8...
I [30/Nov/2010:22:00:00 +0300] Resuming new connection processing...
D [30/Nov/2010:22:00:00 +0300] Discarding unused server-started event...
D [30/Nov/2010:22:00:01 +0300] Report: clients=0
D [30/Nov/2010:22:00:01 +0300] Report: jobs=0
D [30/Nov/2010:22:00:01 +0300] Report: jobs-active=0
D [30/Nov/2010:22:00:01 +0300] Report: printers=0
D [30/Nov/2010:22:00:01 +0300] Report: printers-implicit=0
D [30/Nov/2010:22:00:01 +0300] Report: stringpool-string-count=119
D [30/Nov/2010:22:00:01 +0300] Report: stringpool-alloc-bytes=3968
D [30/Nov/2010:22:00:01 +0300] Report: stringpool-total-bytes=3048
D [30/Nov/2010:22:00:08 +0300] cupsdAcceptClient: 12 from 172.16.0.3:631 (IPv4)
D [30/Nov/2010:22:00:08 +0300] cupsdReadClient: 12 GET / HTTP/1.1
D [30/Nov/2010:22:00:08 +0300] cupsdSetBusyState: Active clients
D [30/Nov/2010:22:00:08 +0300] cupsdAuthorize: No authentication data provided.
D [30/Nov/2010:22:00:08 +0300] cupsdSetBusyState: Not busy
D [30/Nov/2010:22:00:08 +0300] cupsdReadClient: 12 GET /cups.css HTTP/1.1
D [30/Nov/2010:22:00:08 +0300] cupsdSetBusyState: Active clients
D [30/Nov/2010:22:00:08 +0300] cupsdAuthorize: No authentication data provided.
D [30/Nov/2010:22:00:08 +0300] cupsdSetBusyState: Not busy
D [30/Nov/2010:22:00:08 +0300] cupsdReadClient: 12 GET /images/left.gif HTTP/1.1
D [30/Nov/2010:22:00:08 +0300] cupsdSetBusyState: Active clients
D [30/Nov/2010:22:00:08 +0300] cupsdAuthorize: No authentication data provided.
D [30/Nov/2010:22:00:08 +0300] cupsdSetBusyState: Not busy
D [30/Nov/2010:22:00:08 +0300] cupsdReadClient: 12 GET /images/right.gif HTTP/1.1
D [30/Nov/2010:22:00:08 +0300] cupsdSetBusyState: Active clients
D [30/Nov/2010:22:00:08 +0300] cupsdAuthorize: No authentication data provided.
D [30/Nov/2010:22:00:08 +0300] cupsdSetBusyState: Not busy
D [30/Nov/2010:22:00:08 +0300] cupsdReadClient: 12 GET /images/cups-icon.png HTTP/1.1
D [30/Nov/2010:22:00:08 +0300] cupsdSetBusyState: Active clients
D [30/Nov/2010:22:00:08 +0300] cupsdAuthorize: No authentication data provided.
D [30/Nov/2010:22:00:08 +0300] cupsdSetBusyState: Not busy
D [30/Nov/2010:22:00:08 +0300] cupsdReadClient: 12 GET /images/sel.gif HTTP/1.1
D [30/Nov/2010:22:00:08 +0300] cupsdSetBusyState: Active clients
D [30/Nov/2010:22:00:08 +0300] cupsdAuthorize: No authentication data provided.
D [30/Nov/2010:22:00:08 +0300] cupsdSetBusyState: Not busy
D [30/Nov/2010:22:00:08 +0300] cupsdReadClient: 12 GET /images/unsel.gif HTTP/1.1
D [30/Nov/2010:22:00:08 +0300] cupsdSetBusyState: Active clients
D [30/Nov/2010:22:00:08 +0300] cupsdAuthorize: No authentication data provided.
D [30/Nov/2010:22:00:08 +0300] cupsdSetBusyState: Not busy
D [30/Nov/2010:22:00:09 +0300] cupsdReadClient: 12 GET /admin HTTP/1.1
D [30/Nov/2010:22:00:09 +0300] cupsdSetBusyState: Active clients
D [30/Nov/2010:22:00:09 +0300] cupsdAuthorize: No authentication data provided.
D [30/Nov/2010:22:00:09 +0300] cupsdCloseClient: 12
D [30/Nov/2010:22:00:09 +0300] cupsdSetBusyState: Not busy
Это вот с таким конфигом (оба совета сразу):

Код: Выделить всё

# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel debug

# Administrator user group...
SystemGroup wheel

Port 631
# Only listen for connections from the local machine.
Listen 172.16.0.1:631
#Listen 127.0.0.1:631
#Listen /var/run/cups.sock

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS
Allow all

# Default authentication type, when authentication is required...
DefaultAuthType Basic

# Restrict access to the server...
<Location />
  Order allow,deny
#  Deny all
  Allow 172.16.0.3
</Location>

## Restrict access to local domain
Order Deny,Allow
allow 172.16.0.3

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
  Deny all
  Allow 172.16.0.3
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
  Allow 172.16.0.3
</Location>

# Set the default printer/job policies...
<Policy default>
  # Job-related operations must be done by the owner or an administrator...
  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # All printer operations require a printer operator to authenticate...
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

# Set the authenticated printer/job policies...
<Policy authenticated>
  # Job-related operations must be done by the owner or an administrator...
  <Limit Create-Job Print-Job Print-URI>
    AuthType Default
    Order deny,allow
  </Limit>

  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  # All administration operations require an administrator to authenticate...
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # All printer operations require a printer operator to authenticate...
  <Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
    AuthType Default
    Require user @SYSTEM
    Order deny,allow
  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...
  <Limit Cancel-Job CUPS-Authenticate-Job>
    AuthType Default
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

  <Limit All>
    Order deny,allow
  </Limit>
</Policy>

Re: Как открыть доступ к веб-интерфейсу CUPS?

Добавлено: 2010-12-01 3:59:37
x6e6564
E [30/Nov/2010:22:00:00 +0300] Unknown directive Allow on line 26.
E [30/Nov/2010:22:00:00 +0300] Unknown directive Order on line 39.
E [30/Nov/2010:22:00:00 +0300] Unknown directive allow on line 40.
лишнее:

Код: Выделить всё

BrowseLocalProtocols CUPS
Allow all --- лишнее
....
## Restrict access to local domain
Order Deny,Allow --- лишнее
allow 172.16.0.3 --- лишнее
лучше скопируй cupsd.conf.default в cupsd.conf
и минимум раб. вариант:

Код: Выделить всё

# Only listen for connections from the local machine.
Listen 127.0.0.1:631
Listen 172.16.0.1:631
...
# Restrict access to the server...
<Location />
  Order allow,deny
  Allow 172.16.0.3
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
  Allow 172.16.0.3
</Location>
проверять конфиг:

Код: Выделить всё

sudo cupsd -t