domingo, 20 de janeiro de 2013

cupsd                                                      


Intalando o servidor de impressão. A impressora esta ligada no servidor. Poderemos imprimir de outros computadores, inclusive de computadores virtuais ( virtual machines )

# apt-get install cups 

After this operation, 101 MB of additional disk space will be used.
Do you want to continue [Y/n]? y


Vamos entrar no diretório cups, fazer backup de arquivo cupsd.conf e criar um novo cupsd.conf, pois o original parece não esta correto.

# cd /etc/cups/
# cp cupsd.conf cupsd.conf--bkp

# cat > /etc/cups/cupsd.conf
#---[ begin: cupsd ]--------------------------------------------------------------
LogLevel warn
MaxLogSize 1m
SystemGroup lpadmin
# Allow remote access
Port 631
Listen /var/run/cups/cups.sock
# Share local printers on the local network.
Browsing On
BrowseOrder allow
BrowseRemoteProtocols
BrowseAddress @LOCAL
BrowseLocalProtocols cups
DefaultAuthType Basic
<Location />
  # Allow shared printing...
  Order allow
  Allow From all
</Location>
<Location /admin>
  # Restrict access to the admin pages...
  Order allow
  Allow From All
</Location>
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  # Restrict access to the configuration files...
  Order allow
  Allow From All
</Location>
<Policy default>
  <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 allow
    Allow From all
  </Limit>
  <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 allow
    Allow From all
  </Limit>
  <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 allow
    Allow From all
  </Limit>
  <Limit Cancel-Job CUPS-Authenticate-Job>
    Require user @OWNER @SYSTEM
    Order allow
    Allow From all
  </Limit>
  <Limit All>
    Order allow
    Allow From all
  </Limit>
</Policy>
<Policy authenticated>
  <Limit Create-Job Print-Job Print-URI>
  AuthType Default
  Order 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 allow
  </Limit>
  <Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
  AuthType Default
  Require user @SYSTEM
  Order allow
    </Limit>
  <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 allow
      </Limit>
 
<Limit Cancel-Job CUPS-Authenticate-Job>
      AuthType Default
      Require user @OWNER @SYSTEM
      Order allow
        </Limit>
  <Limit All>
        Order allow
          </Limit>
</Policy>
#---[ end: cupsd ]--------------------------------------------------------------

ctlrl + d  ( para salvar e sair do arquivo )


Verificando se o processo esta rodando.

# ps ax | grep cupsd
16520 ?        Ss     0:00 /usr/sbin/cupsd -C /etc/cups/cupsd.conf
23746 pts/0    S+  0:00 grep --color cupsd


Executando o cups.

# /etc/init.d/cups start

Parando o cups.

# /etc/init.d/cups stop

Reiniciando o cups.

# /etc/init.d/cups restart
Restarting Common Unix Printing System: cupsd.




Atenção:

- Verifique se o cabo da impressora esta conectado corretamente ( comumente cabo USB );

- Deixe a impressora ligada;

- Cabo da fonte ( energia conectado na tomada );

Vamos abrir o painel de gerenciamento da impressora.

Rede interna:

( ip servidor interno )

http://192.168.1.13:631/



------------------------------------------------------------------------------------------------------------------------
===[ Sharing Knowledge ]===   -  Obrigado - Thank you - Danke - Merci - Grazie - Gracias - arigatou gozaimasu
“We make a living by what we get, but we make a life by what we give.”  - Give and you will receive - just share :)
------------------------------------------------------------------------------------------------------------------------

Nenhum comentário:

Postar um comentário