Résolu le 30-08-24 Problème CUPS

Postez ici toutes vos demandes d’assistance.
Benoit
Messages : 24
Enregistré le : ven. 12 janv. 2018 08:13

Problème CUPS

Message par Benoit »

Bonjour à tous,
Ayant eu quelques problèmes avec CUPS, j'ai décidé de le réinstaller.
Pour ce faire j'ai effectuer ceci :
sudo apt-get purge cups && sudo apt-get autoremove
sudo apt-get update && sudo apt-get install cups

Mais depuis, impossible d’accéder à Cups ! L'icone sur le bureau des imprimantes ne veut pas s'ouvrir, sous Firefox impossible d’accéder à http://localhost:631/printers.
Du coup après recherche, j'ai effectué la commande suivante : sudo systemctl status cups.service
résultat :
Image

Il y a manifestement un problème.
La commande : "sudo cupsd -t " ne renvoie rien.
Le répertoire etc/cups contient cela :
Image

Auriez-vous une idée ?
Merci de votre aide.
Benoît
Machine :
Linux Mint 21.3, Cinnamon 6.0.4, Kernel: 5.15.0-119-generic
ASUS Vivobook, AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx × 4

Avatar du membre
tyrry
modérateur
Messages : 6029
Enregistré le : mar. 21 juil. 2015 07:42
Localisation : à l'ouest

Re: Problème CUPS

Message par tyrry »

Slt,
dans ton retour je vois : dependency failed ...........
essais :

Code : Tout sélectionner

sudo apt update

Code : Tout sélectionner

sudo apt install -f
@+
LXDE Desktop résistance
Debian 12 Bookworm

Avatar du membre
cyrille
Administrateur du site
Messages : 13037
Enregistré le : mar. 19 sept. 2017 08:49
Localisation : Nowhere
Contact :

Re: Problème CUPS

Message par cyrille »

Peut être une erreur dans la conf de cups, que retourne

Code : Tout sélectionner

sudo cupsd -t
?séuqartéd sel ruoP / sécnoféd sel ruoP / sreiruréB sel ruoP / ?étéicos elleuQ

https://crust.ovh

Benoit
Messages : 24
Enregistré le : ven. 12 janv. 2018 08:13

Re: Problème CUPS

Message par Benoit »

Merci pour votre retour

@tirry
Image

@cirylle

Code : Tout sélectionner

 sudo cupsd -t 
ne retourne rien
Machine :
Linux Mint 21.3, Cinnamon 6.0.4, Kernel: 5.15.0-119-generic
ASUS Vivobook, AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx × 4

Benoit
Messages : 24
Enregistré le : ven. 12 janv. 2018 08:13

Re: Problème CUPS

Message par Benoit »

Un début de réponse :
j'ai créé un fichier cupsd.conf dans le répertoire /etc/cups cqr celui-ci était inexistant ! Je ne sais pas pourquoi !
Dans ce fichier, j'ai inséré :

Code : Tout sélectionner

Port 631
j'ai redémarré cups et ... j'ai à nouveau accès à Cups !
Du coup je retrouve l'icone imprimantes actif dans ma barre de taches.
Il faut juste que je retrouve les imprimantes airprint !
Si quelqu'un a une idée.

Benoît
Machine :
Linux Mint 21.3, Cinnamon 6.0.4, Kernel: 5.15.0-119-generic
ASUS Vivobook, AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx × 4

Avatar du membre
cyrille
Administrateur du site
Messages : 13037
Enregistré le : mar. 19 sept. 2017 08:49
Localisation : Nowhere
Contact :

Re: Problème CUPS

Message par cyrille »

Si

Code : Tout sélectionner

 sudo cupsd -t 
ne retourne c'est qu'il n'y a pas d'erreur de syntaxe / conf dans ce fichier
?séuqartéd sel ruoP / sécnoféd sel ruoP / sreiruréB sel ruoP / ?étéicos elleuQ

https://crust.ovh

Benoit
Messages : 24
Enregistré le : ven. 12 janv. 2018 08:13

Re: Problème CUPS

Message par Benoit »

Merci Cyrille.

Est-ce que quelqu'un pourrait me transférer un fichier cupsd.conf standard. Je n'en trouve pas. Cela me permettrait de mettre à jour ma configuration cups.
Merci d'avance.
Benoît
Machine :
Linux Mint 21.3, Cinnamon 6.0.4, Kernel: 5.15.0-119-generic
ASUS Vivobook, AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx × 4

Avatar du membre
cyrille
Administrateur du site
Messages : 13037
Enregistré le : mar. 19 sept. 2017 08:49
Localisation : Nowhere
Contact :

Re: Problème CUPS

Message par cyrille »

Voici le mien mais sous debian sid

Code : Tout sélectionner

#
# 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 warn
PageLogFormat

# Specifies the maximum size of the log files before they are rotated.  The value "0" disables log rotation.
MaxLogSize 0

# Default error policy for printers
ErrorPolicy retry-job

# Only listen for connections from the local machine.
Listen localhost:631
Listen /run/cups/cups.sock

# Show shared printers on the local network.
Browsing Yes
BrowseLocalProtocols dnssd

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

# Web interface setting...
WebInterface Yes

# Timeout after cupsd exits if idle (applied only if cupsd runs on-demand - with -l)
IdleExitTimeout 60

# Restrict access to the server...
<Location />
  Order allow,deny
</Location>

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

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

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

# Set the default printer/job policies...
<Policy default>
  # Job/subscription privacy...
  JobPrivateAccess default
  JobPrivateValues default
  SubscriptionPrivateAccess default
  SubscriptionPrivateValues default

  # Job-related operations must be done by the owner or an administrator...
  <Limit Create-Job Print-Job Print-URI Validate-Job>
    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 Cancel-My-Jobs Close-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 Cancel-Jobs 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/subscription privacy...
  JobPrivateAccess default
  JobPrivateValues default
  SubscriptionPrivateAccess default
  SubscriptionPrivateValues default

  # Job-related operations must be done by the owner or an administrator...
  <Limit Create-Job Print-Job Print-URI Validate-Job>
    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 Cancel-My-Jobs Close-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 Cancel-Jobs 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>

# Set the kerberized printer/job policies...
<Policy kerberos>
  # Job/subscription privacy...
  JobPrivateAccess default
  JobPrivateValues default
  SubscriptionPrivateAccess default
  SubscriptionPrivateValues default

  # Job-related operations must be done by the owner or an administrator...
  <Limit Create-Job Print-Job Print-URI Validate-Job>
    AuthType Negotiate
    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 Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
    AuthType Negotiate
    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 Cancel-Jobs 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 Negotiate
    Require user @OWNER @SYSTEM
    Order deny,allow
  </Limit>

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

Sinon tu lances un liveUSB et le récupères (ou une virtualbox avec la même version de Mint )
?séuqartéd sel ruoP / sécnoféd sel ruoP / sreiruréB sel ruoP / ?étéicos elleuQ

https://crust.ovh

Avatar du membre
cyrille
Administrateur du site
Messages : 13037
Enregistré le : mar. 19 sept. 2017 08:49
Localisation : Nowhere
Contact :

Re: Problème CUPS

Message par cyrille »

Redémarrer le service pour que les modif soient prises en compte
?séuqartéd sel ruoP / sécnoféd sel ruoP / sreiruréB sel ruoP / ?étéicos elleuQ

https://crust.ovh

Benoit
Messages : 24
Enregistré le : ven. 12 janv. 2018 08:13

Re: Problème CUPS

Message par Benoit »

Merci Cyrille,

Ton idée était excellente. J'ai récupéré le fichier sur une liveusb ! C'est nickel, tout refonctionne normalement.
Je mets le sujet en résolu.
Bonne soirée à tous
Benoît
Machine :
Linux Mint 21.3, Cinnamon 6.0.4, Kernel: 5.15.0-119-generic
ASUS Vivobook, AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx × 4

Répondre