Installazione e Configurazione CUPS: Difference between revisions

From RVM Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Installazione pacchetto ==
== Installazione pacchetto ==


  sudo apt-get install cupsys cupsys-client
  sudo apt-get install cups cups-client foomatic-filters


== Configurazione ==
== Configurazione ==


=== Cups <1.2.7 (Sarge) ===
Per permettere ad un utente UNIX di modificare la configurazione, bisogna assegnarlo al grupp '''lpadmin'''


Per poter accedere all'amministrazione via web da una macchina diversa da quella su cui gira cups, occorre modificare i permessi, contenuti nel file '''/etc/cups/cupsd.conf''':
  sudo gpasswd -a administrator lpadmin
sudo gpasswd -a printadmin lpadmin


<pre>
Creare il gruppo samba ''Print Operators:
sudoedit /etc/cups/cupsd.conf
  sudo net groupmap add ntgroup="Print Operators" unixgroup=lpadmin rid=550 type=d
...
<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 192.168.0.0/16
Allow From 10.0.0.0/16
</Location>
...
 
<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 Basic
AuthClass System
 
## Restrict access to local domain
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 192.168.0.0/16
Allow From 10.0.0.0/16
 
#Encryption Required
</Location>
</pre>


Riavviare il server cups:


  sudo /etc/init.d/cupsys stop; sudo /etc/init.d/cupsys start
Assicurarsi che l'utente abbia una password impostata:
  sudo passwd administrator
echo "printadmin:print" | sudo chpasswd


=== Cups >=1.2.7 (Etch) ===


Modificare il Bind alle'interfacce
*Modificare il Bind alle interfacce


sudoedit /etc/cupsd.conf
sudoedit /etc/cups/cupsd.conf


  #su tutte
  #su tutte
Line 60: Line 30:
  Listen 192.168.149.254:63
  Listen 192.168.149.254:63


Modificare le regole di accesso e disattivare l'encryption (non va ...)
*Modificare le regole di accesso


<pre>
<pre>
sudoedit /etc/cups/cupsd.conf
sudoedit /etc/cups/cupsd.conf
...
 
DefaultEncryption Never
...
...
# Restrict access to the server...
# Restrict access to the server...
Line 99: Line 68:
Riavviare il server cups:
Riavviare il server cups:


  sudo /etc/init.d/cupsys stop; sudo /etc/init.d/cupsys start
  sudo invoke-rc.d cups stop; sudo invoke-rc.d cups start


== Gestione delle code da riga comandi ==
== Gestione delle code da riga comandi ==

Latest revision as of 14:02, 9 September 2010

Installazione pacchetto

sudo apt-get install cups cups-client foomatic-filters

Configurazione

Per permettere ad un utente UNIX di modificare la configurazione, bisogna assegnarlo al grupp lpadmin

sudo gpasswd -a administrator lpadmin
sudo gpasswd -a printadmin lpadmin

Creare il gruppo samba Print Operators:

sudo net groupmap add ntgroup="Print Operators" unixgroup=lpadmin rid=550 type=d


Assicurarsi che l'utente abbia una password impostata:

sudo passwd administrator
echo "printadmin:print" | sudo chpasswd


  • Modificare il Bind alle interfacce
sudoedit /etc/cups/cupsd.conf
#su tutte
Listen *:631
#su localhost ed un'altra
Listen localhost:631
Listen 192.168.149.254:63
  • Modificare le regole di accesso
sudoedit /etc/cups/cupsd.conf

...
# Restrict access to the server...
<Location />
  Order allow,deny
  Allow localhost
  Allow 192.168.*.*
  Allow 10.0.*.*
</Location>

# Restrict access to the admin pages...
<Location /admin>
  #Encryption Required
  AuthType Basic
  Require user @SYSTEM
  Order allow,deny
  Allow localhost
  Allow 192.168.*.*
  Allow 10.0.*.*
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Basic
  Require user @SYSTEM
  Order allow,deny
  Allow localhost
  Allow 192.168.*.*
  Allow 10.0.*.*
</Location>

Riavviare il server cups:

sudo invoke-rc.d cups stop;  sudo invoke-rc.d cups start

Gestione delle code da riga comandi

Vedi la guida CUPS: Adding Your First Printer from the Command-Line

man lpadmin
http://cupsmachine:631/documentation.html

(Accessibile di default solo da localhost, vedi di seguito)

Gestione delle code via web

Accedento all'indirizzo

http://cupsmachine:631

è possibile creare e gestire le varie code.

Riferimenti