Droits accès Cups
Par défaut, une console d'administration est disponible sur le port 631
, mais visible que depuis la machine.
Votre avis
Nobody voted on this yet
|
|
Modification droits d'accès
Afin d'accéder à celle-ci, il faut modifier la configuration dans le fichier /etc/cups/cupsd.conf
pour étendre les possibilité d'accès. La modification suivante permet d'accéder à la console depuis n'importe quel poste, et à toutes les fonctionnalités, administration incluse:
# Only listen for connections from the local machine.
#Listen localhost:631
Port 631
Listen /var/run/cups/cups.sock
# Show shared printers on the local network.
Browsing Off
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS dnssd
BrowseAddress @LOCAL
# Default authentication type, when authentication is required...
DefaultAuthType Basic
# Web interface setting...
WebInterface Yes
# Restrict access to the server...
<Location />
Allow ALL
Order allow,deny
</Location>
# Restrict access to the admin pages...
<Location /admin>
Allow ALL
Order allow,deny
</Location>
Cependant, ces droits d'accès sont un peu trop permissifs. Il est possible, un peu comme sous Apache, de mettre en place un masque d'adresse IP pouvant y accéder. Ce masque s'applique également au poste qui auront déclaré l'imprimante pour utilisation. Dans la configuration suivante, seule les IP commençant par 192.168.1.
pourront y accéder.
# Only listen for connections from the local machine.
#Listen localhost:631
Port 631
Listen /var/run/cups/cups.sock
# Show shared printers on the local network.
Browsing Off
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS dnssd
BrowseAddress @LOCAL
# Default authentication type, when authentication is required...
DefaultAuthType Basic
# Web interface setting...
WebInterface Yes
# Restrict access to the server...
<Location />
# Allow ALL
Allow 192.168.1.*
Order allow,deny
</Location>
# Restrict access to the admin pages...
<Location /admin>
# Allow ALL
Allow 192.168.1.*
Order allow,deny
</Location>
Le mode de configuration est similaire aux fichiers Apache.