Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
elearning:workbooks:debian:10:junior:l115 [2022/05/17 08:18] – created adminelearning:workbooks:debian:10:junior:l115 [2024/03/08 08:42] (Version actuelle) admin
Ligne 1: Ligne 1:
 ~~PDF:LANDSCAPE~~ ~~PDF:LANDSCAPE~~
  
-Version : **2022.01**+Version : **2024.01**
  
 Dernière mise-à-jour : ~~LASTMOD~~ Dernière mise-à-jour : ~~LASTMOD~~
  
-======LCF509 - Gestion des Impressions======+======LDF509 - Gestion des Impressions======
  
 =====Contenu du Module===== =====Contenu du Module=====
  
-  * **LCF509 - Gestion des Impressions** +  * **LDF509 - Gestion des Impressions** 
     * Contenu du Module     * Contenu du Module
     * Présentation de Cups     * Présentation de Cups
Ligne 23: Ligne 23:
       * 1.1 - La Commande lpstat       * 1.1 - La Commande lpstat
       * 1.2 - La Commande lpadmin       * 1.2 - La Commande lpadmin
-      * 1.3 - Les Commandes accept et cupsenable+      * 1.3 - Les Commandes cupsaccept et cupsenable
       * 1.4 - Classe d'imprimantes       * 1.4 - Classe d'imprimantes
       * 1.5 - Le fichier /etc/cups/printers.conf       * 1.5 - Le fichier /etc/cups/printers.conf
Ligne 53: Ligne 53:
  
 **cupsd** est le daemon principal du système CUPS. Quand cupsd traite une impression, il transmet les données à un **filtre** en fonction du modèle d'imprimante. Après traitement par le filtre, cupsd transmet le résultat à un **backend** qui se charge de l'impression. Les échanges entre cupsd et ces programmes se font via des **répertoires de spools** et des **tubes**. **cupsd** est le daemon principal du système CUPS. Quand cupsd traite une impression, il transmet les données à un **filtre** en fonction du modèle d'imprimante. Après traitement par le filtre, cupsd transmet le résultat à un **backend** qui se charge de l'impression. Les échanges entre cupsd et ces programmes se font via des **répertoires de spools** et des **tubes**.
- 
-====Installation==== 
- 
-Afin d'installer cups il convient d'utiliser **dnf** : 
- 
-<code> 
-[root@centos8 ~]# dnf install cups -y 
-</code> 
- 
-Ensuite activez et démarrez le service cups : 
- 
-<code> 
-[root@centos8 ~]# systemctl status cups 
-● cups.service - CUPS Scheduler 
-   Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled; vendor preset: enabled) 
-   Active: inactive (dead) 
-     Docs: man:cupsd(8) 
-[root@centos8 ~]# systemctl enable cups 
-[root@centos8 ~]# systemctl start cups 
-[root@centos8 ~]# systemctl status cups 
-● cups.service - CUPS Scheduler 
-   Loaded: loaded (/usr/lib/systemd/system/cups.service; enabled; vendor preset: enabled) 
-   Active: active (running) since Thu 2021-06-03 14:06:35 EDT; 4s ago 
-     Docs: man:cupsd(8) 
- Main PID: 32727 (cupsd) 
-   Status: "Scheduler is running..." 
-    Tasks: 1 (limit: 23720) 
-   Memory: 1.9M 
-   CGroup: /system.slice/cups.service 
-           └─32727 /usr/sbin/cupsd -l 
- 
-Jun 03 14:06:35 centos8.ittraining.loc systemd[1]: Starting CUPS Scheduler... 
-Jun 03 14:06:35 centos8.ittraining.loc systemd[1]: Started CUPS Scheduler. 
-</code> 
  
 ====Le Fichier /etc/cups/cupsd.conf==== ====Le Fichier /etc/cups/cupsd.conf====
Ligne 100: Ligne 66:
  
 <code> <code>
-[root@centos8 ~]cat /etc/cups/cupsd.conf +root@debian11:~# more /etc/cups/cupsd.conf
-MaxLogSize 0+
 # #
 # Configuration file for the CUPS scheduler.  See "man cupsd.conf" for a # Configuration file for the CUPS scheduler.  See "man cupsd.conf" for a
Ligne 110: Ligne 75:
 # for troubleshooting... # for troubleshooting...
 LogLevel warn 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. # Only listen for connections from the local machine.
 Listen localhost:631 Listen localhost:631
-Listen /var/run/cups/cups.sock+Listen /run/cups/cups.sock
  
 # Show shared printers on the local network. # Show shared printers on the local network.
Ligne 128: Ligne 99:
 # Restrict access to the server... # Restrict access to the server...
 <Location /> <Location />
-  Order allow,deny +--More--(12%)
-</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>+
 </code> </code>
  
Ligne 291: Ligne 107:
  
 <code> <code>
-[root@centos8 ~]# ls /usr/lib/cups/filter +root@debian11:~# ls /usr/lib/cups/filter 
-bannertopdf     commandtopclx  gstoraster     imagetoubrl         pdftoraster    rastertolabel  svgtopdf          texttops      xfigtopdf +bannertopdf     commandtopclx  gstoraster     imagetoubrl         pdftops        rastertolabel  svgtopdf          texttops      xfigtopdf 
-brftoembosser   commandtops    gziptoany      imageubrltoindexv3  pstops         rastertopclm   sys5ippprinter    texttotext +brftoembosser   commandtops    gziptoany      imageubrltoindexv3  pdftoraster    rastertopclm   sys5ippprinter    texttotext 
-brftopagedbrf   emftopdf       imagetobrf     imageubrltoindexv4  rastertodymo   rastertopclx   textbrftoindexv3  vectortobrf +brftopagedbrf   emftopdf       imagetobrf     imageubrltoindexv4  pstops         rastertopclx   textbrftoindexv3  vectortobrf 
-cgmtopdf        foomatic-rip   imagetopdf     musicxmltobrf       rastertoepson  rastertopdf    textbrftoindexv4  vectortopdf +cgmtopdf        foomatic-rip   imagetopdf     mupdftoraster       rastertoepson  rastertopdf    textbrftoindexv4  vectortopdf 
-cmxtopdf        gstopdf        imagetops      pdftopdf            rastertoescpx  rastertops     texttobrf         vectortoubrl +cmxtopdf        gstopdf        imagetops      musicxmltobrf       rastertoescpx  rastertops     texttobrf         vectortoubrl 
-commandtoescpx  gstopxl        imagetoraster  pdftops             rastertohp     rastertopwg    texttopdf         wmftopdf+commandtoescpx  gstopxl        imagetoraster  pdftopdf            rastertohp     rastertopwg    texttopdf         wmftopdf
 </code> </code>
  
Ligne 305: Ligne 121:
  
 <code> <code>
-[root@centos8 ~]# ls /usr/lib/cups/backend +root@debian11:~# ls /usr/lib/cups/backend 
-beh  cups-brf  dnssd  driverless  failover  http  https  implicitclass  ipp  ipps  lpd  ncp  parallel  serial  snmp  socket  usb+beh  cups-brf  dnssd  driverless  driverless-fax  http  https  implicitclass  ipp  ipps  lpd  mdns  parallel  serial  snmp  socket  usb
 </code> </code>
  
Ligne 312: Ligne 128:
  
 <code> <code>
-[root@centos8 ~]# lpinfo -v+root@debian11:~# lpinfo -v 
 +file cups-brf:/ 
 +network beh 
 +network ipps
 network http network http
 +network socket
 +network lpd
 network https network https
 network ipp network ipp
-network ipps 
-network lpd 
-network socket 
-network beh 
 </code> </code>
  
Ligne 336: Ligne 153:
  
 <code> <code>
-[root@centos8 ~]# ls -l /var/log/cups +root@debian11:~# ls -l /var/log/cups 
-total 12 +total 36 
--rw-------1 root lp 166 Jun  3 14:02 access_log +-rw-r----- 1 root adm 415 Jun  6 09:58 access_log 
--rw-------. 1 root lp 166 Jun  3 14:02 error_log +-rw-r----- 1 root adm 649 Jun  6 00:00 access_log.1 
--rw-------. 1 root lp 166 Jun  3 14:02 page_log+-rw-r----- 1 root adm 201 Jun  5 00:00 access_log.2.gz 
 +-rw-r----- 1 root adm 201 Jun  4 00:00 access_log.3.gz 
 +-rw-r----- 1 root adm 200 Jun  3 00:00 access_log.4.gz 
 +-rw-r----- 1 root adm 200 Jun  2 00:00 access_log.5.gz 
 +-rw-r----- 1 root adm 205 Jun  1 00:00 access_log.6.gz 
 +-rw-r----- 1 root adm 203 May 31 00:00 access_log.7.gz 
 +-rw-r----- 1 root adm 172 Jun  6 09:58 error_log
 </code> </code>
  
Ligne 348: Ligne 171:
  
 <code> <code>
-[root@centos8 ~]# lpinfo -m | more +root@debian11:~# lpinfo -m | more 
-lsb/usr/cupsfilters/Fuji_Xerox-DocuPrint_CM305_df-PDF.ppd Fuji Xerox +drv:///sample.drv/dymo.ppd DYMO Label Printer
-drv:///sample.drv/dymo.ppd Dymo Label Printer+
 drv:///sample.drv/epson9.ppd Epson 9-Pin Series drv:///sample.drv/epson9.ppd Epson 9-Pin Series
 drv:///sample.drv/epson24.ppd Epson 24-Pin Series drv:///sample.drv/epson24.ppd Epson 24-Pin Series
 +lsb/usr/cupsfilters/Fuji_Xerox-DocuPrint_CM305_df-PDF.ppd Fuji Xerox DocuPrint CM305 df PDF
 drv:///generic-brf.drv/gen-brf.ppd Generic Braille embosser, 1.0 drv:///generic-brf.drv/gen-brf.ppd Generic Braille embosser, 1.0
 drv:///cupsfilters.drv/pwgrast.ppd Generic IPP Everywhere Printer drv:///cupsfilters.drv/pwgrast.ppd Generic IPP Everywhere Printer
Ligne 380: Ligne 203:
 drv:///indexv3.drv/ieveres3.ppd Index Everest-D V3, 1.0 drv:///indexv3.drv/ieveres3.ppd Index Everest-D V3, 1.0
 drv:///indexv4.drv/ieveres4.ppd Index Everest-D V4/V5, 1.0 drv:///indexv4.drv/ieveres4.ppd Index Everest-D V4/V5, 1.0
 +drv:///sample.drv/intelbar.ppd Intellitech IntelliBar Label Printer, 2.3
 --More-- --More--
 </code> </code>
Ligne 404: Ligne 228:
  
 <code> <code>
-[root@centos8 ~]# lpstat -t+root@debian11:~# lpstat -t
 scheduler is running scheduler is running
 no system default destination no system default destination
Ligne 418: Ligne 242:
  
 <code> <code>
-[root@centos8 ~]# lpadmin -p imp1 -v socket://localhost:12000 -m raw+root@debian11:~# lpadmin -p imp1 -v socket://localhost:12000 -m raw 
 +lpadmin: Raw queues are deprecated and will stop working in a future version of CUPS.
 </code> </code>
  
Ligne 443: Ligne 268:
  
 <code> <code>
-[root@centos8 ~]# lpstat -t+root@debian11:~# lpstat -t
 scheduler is running scheduler is running
 no system default destination no system default destination
 device for imp1: socket://localhost:12000 device for imp1: socket://localhost:12000
-imp1 not accepting requests since Thu 03 Jun 2021 02:10:02 PM EDT +imp1 not accepting requests since Mon 06 Jun 2022 10:01:43 AM CEST 
- reason unknown +        reason unknown 
-printer imp1 disabled since Thu 03 Jun 2021 02:10:02 PM EDT +printer imp1 disabled since Mon 06 Jun 2022 10:01:43 AM CEST 
- reason unknown+        reason unknown
 </code> </code>
  
Ligne 458: Ligne 283:
  
 <code> <code>
-[root@centos8 ~]accept imp1 +root@debian11:~# cupsaccept imp1 
-[root@centos8 ~]# lpstat -t+ 
 +root@debian11:~# lpstat -t
 scheduler is running scheduler is running
 no system default destination no system default destination
 device for imp1: socket://localhost:12000 device for imp1: socket://localhost:12000
-imp1 accepting requests since Thu 03 Jun 2021 02:10:02 PM EDT +imp1 accepting requests since Mon 06 Jun 2022 10:01:43 AM CEST 
-printer imp1 disabled since Thu 03 Jun 2021 02:10:02 PM EDT +printer imp1 disabled since Mon 06 Jun 2022 10:01:43 AM CEST 
- reason unknown +        reason unknown 
-[root@centos8 ~]# cupsenable imp1 + 
-[root@centos8 ~]# lpstat -t+root@debian11:~# cupsenable imp1 
 + 
 +root@debian11:~# lpstat -t
 scheduler is running scheduler is running
 no system default destination no system default destination
 device for imp1: socket://localhost:12000 device for imp1: socket://localhost:12000
-imp1 accepting requests since Thu 03 Jun 2021 02:11:17 PM EDT +imp1 accepting requests since Mon 06 Jun 2022 10:03:48 AM CEST 
-printer imp1 is idle.  enabled since Thu 03 Jun 2021 02:11:17 PM EDT+printer imp1 is idle.  enabled since Mon 06 Jun 2022 10:03:48 AM CEST
 </code> </code>
  
 <WRAP center round important> <WRAP center round important>
-**Important** : Notez que les deux commandes **accept** et **cupsenable** ont leurs opposées : **reject** et **cupsdisable**.+**Important** : Notez que les deux commandes **cupsaccept** et **cupsenable** ont leurs opposées : **cupsreject** et **cupsdisable**.
 </WRAP> </WRAP>
  
Ligne 482: Ligne 310:
  
 <code> <code>
-[root@centos8 ~]# lpadmin -d imp1 +root@debian11:~# lpadmin -d imp1 
-[root@centos8 ~]# lpstat -t+ 
 +root@debian11:~# lpstat -t
 scheduler is running scheduler is running
 system default destination: imp1 system default destination: imp1
 device for imp1: socket://localhost:12000 device for imp1: socket://localhost:12000
-imp1 accepting requests since Thu 03 Jun 2021 02:11:17 PM EDT +imp1 accepting requests since Mon 06 Jun 2022 10:03:48 AM CEST 
-printer imp1 is idle.  enabled since Thu 03 Jun 2021 02:11:17 PM EDT+printer imp1 is idle.  enabled since Mon 06 Jun 2022 10:03:48 AM CEST
 </code> </code>
  
 Vous allez maintenant créer une file d'attente dans CUPS pour une imprimante **%%HP Color LaserJet Series PCL 6%%** utilisant le fichier pxlcolor.ppd, appelée **Imprimante1** et étant connectée au port parallèle. Vous allez maintenant créer une file d'attente dans CUPS pour une imprimante **%%HP Color LaserJet Series PCL 6%%** utilisant le fichier pxlcolor.ppd, appelée **Imprimante1** et étant connectée au port parallèle.
  
-Sous RHEL/CentOS la file d'attente physique pour cette imprimante existe déjà :+Sous Debian 11, pour créer la file d'attente physique associée à cette imprimante, il convient de saisir les commandes suivantes :
  
 <code> <code>
-[root@centos8 ~]# ls -l /dev/lp0 +root@debian11:~# mknod /dev/lp0 c 6 0  
-crw-rw----1 root lp 6, 0 Jun  3 14:02 /dev/lp0+ 
 +root@debian11:~# ls -l /dev/lp0 
 +crw-r--r-- 1 root root 6, 0 Jun  6 10:22 /dev/lp0 
 + 
 +root@debian11:~# chgrp lp /dev/lp0 
 + 
 +root@debian11:~# chmod 660 /dev/lp0 
 + 
 +root@debian11:~# ls -l /dev/lp0 
 +crw-rw---- 1 root lp 6, 0 Jun  6 10:22 /dev/lp0
 </code> </code>
  
-Créez donc la file d'attente dans CUPS :+Créez maintenant la file d'attente dans CUPS :
  
 <code> <code>
-[root@centos8 ~]# lpadmin -p Imprimante1 -E -v parallel:/dev/lp0 -pxlcolor.ppd +root@debian11:~# lpadmin -p Imprimante1 -E -v parallel:/dev/lp0 -i /usr/share/ppd/cupsfilters/pxlcolor.ppd 
-[root@centos8 ~]# lpstat -t+lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS. 
 + 
 +root@debian11:~# lpstat -t
 scheduler is running scheduler is running
 system default destination: imp1 system default destination: imp1
 device for imp1: socket://localhost:12000 device for imp1: socket://localhost:12000
 device for Imprimante1: parallel:/dev/lp0 device for Imprimante1: parallel:/dev/lp0
-imp1 accepting requests since Thu 03 Jun 2021 02:11:17 PM EDT +imp1 accepting requests since Mon 06 Jun 2022 10:03:48 AM CEST 
-Imprimante1 accepting requests since Thu 03 Jun 2021 02:17:25 PM EDT +Imprimante1 accepting requests since Mon 06 Jun 2022 10:37:26 AM CEST 
-printer imp1 is idle.  enabled since Thu 03 Jun 2021 02:11:17 PM EDT +printer imp1 is idle.  enabled since Mon 06 Jun 2022 10:03:48 AM CEST 
-printer Imprimante1 is idle.  enabled since Thu 03 Jun 2021 02:17:25 PM EDT+printer Imprimante1 is idle.  enabled since Mon 06 Jun 2022 10:37:26 AM CEST
 </code> </code>
  
 <WRAP center round important> <WRAP center round important>
-**Important** : Notez que l'option **-E** permet de combiner les options **accept** et **cupsenable** de la commande **lpadmin**.+**Important** : Notez que l'option **-E** permet de combiner les options **cupsaccept** et **cupsenable** de la commande **lpadmin**.
 </WRAP> </WRAP>
  
Ligne 522: Ligne 362:
  
 <code> <code>
-[root@centos8 ~]# echo "Test Printer File" > /tmp/test.print +root@debian11:~# echo "Test Printer File" > /tmp/test.print 
-[root@centos8 ~]# lpadmin -d Imprimante1 + 
-[root@centos8 ~]# lpstat -t+root@debian11:~# lpadmin -d Imprimante1 
 + 
 +root@debian11:~# lpstat -t
 scheduler is running scheduler is running
 system default destination: Imprimante1 system default destination: Imprimante1
 device for imp1: socket://localhost:12000 device for imp1: socket://localhost:12000
 device for Imprimante1: parallel:/dev/lp0 device for Imprimante1: parallel:/dev/lp0
-imp1 accepting requests since Thu 03 Jun 2021 02:11:17 PM EDT +imp1 accepting requests since Mon 06 Jun 2022 10:03:48 AM CEST 
-Imprimante1 accepting requests since Thu 03 Jun 2021 02:17:25 PM EDT +Imprimante1 accepting requests since Mon 06 Jun 2022 10:37:26 AM CEST 
-printer imp1 is idle.  enabled since Thu 03 Jun 2021 02:11:17 PM EDT +printer imp1 is idle.  enabled since Mon 06 Jun 2022 10:03:48 AM CEST 
-printer Imprimante1 is idle.  enabled since Thu 03 Jun 2021 02:17:25 PM EDT+printer Imprimante1 is idle.  enabled since Mon 06 Jun 2022 10:37:26 AM CEST
  
-[root@centos8 ~]# lp /tmp/test.print+root@debian11:~# lp /tmp/test.print
 request id is Imprimante1-1 (1 file(s)) request id is Imprimante1-1 (1 file(s))
 </code> </code>
Ligne 545: Ligne 387:
  
 <code> <code>
-[root@centos8 ~]# lpstat -t+root@debian11:~# lpadmin -p Imprimante2 -E -v parallel:/dev/lp1 -i /usr/share/ppd/cupsfilters/pxlcolor.ppd 
 +lpadmin: Printer drivers are deprecated and will stop working in a future version of CUPS. 
 + 
 +root@debian11:~# lpstat -t
 scheduler is running scheduler is running
 system default destination: Imprimante1 system default destination: Imprimante1
Ligne 551: Ligne 396:
 device for Imprimante1: parallel:/dev/lp0 device for Imprimante1: parallel:/dev/lp0
 device for Imprimante2: parallel:/dev/lp1 device for Imprimante2: parallel:/dev/lp1
-imp1 accepting requests since Thu 03 Jun 2021 02:11:17 PM EDT +imp1 accepting requests since Mon 06 Jun 2022 10:03:48 AM CEST 
-Imprimante1 accepting requests since Thu 03 Jun 2021 02:23:03 PM EDT +Imprimante1 accepting requests since Mon 06 Jun 2022 10:39:32 AM CEST 
-Imprimante2 accepting requests since Thu 03 Jun 2021 02:23:46 PM EDT +Imprimante2 accepting requests since Mon 06 Jun 2022 10:41:06 AM CEST 
-printer imp1 is idle.  enabled since Thu 03 Jun 2021 02:11:17 PM EDT +printer imp1 is idle.  enabled since Mon 06 Jun 2022 10:03:48 AM CEST 
-printer Imprimante1 now printing Imprimante1-1.  enabled since Thu 03 Jun 2021 02:23:03 PM EDT +printer Imprimante1 now printing Imprimante1-1.  enabled since Mon 06 Jun 2022 10:39:32 AM CEST 
- Printer not connected; will retry in 30 seconds. +        Printer not connected; will retry in 30 seconds. 
-printer Imprimante2 is idle.  enabled since Thu 03 Jun 2021 02:23:46 PM EDT +printer Imprimante2 is idle.  enabled since Mon 06 Jun 2022 10:41:06 AM CEST 
-Imprimante1-1           root              1024   Thu 03 Jun 2021 02:23:03 PM EDT+Imprimante1-1           root              1024   Mon 06 Jun 2022 10:39:32 AM CEST
 </code> </code>
  
Ligne 568: Ligne 413:
  
 <code> <code>
-[root@centos8 ~]# lpadmin -p Imprimante1 -c classe1 +root@debian11:~# lpadmin -p Imprimante1 -c classe1 
-[root@centos8 ~]# lpadmin -p Imprimante2 -c classe1+root@debian11:~# lpadmin -p Imprimante2 -c classe1
 </code> </code>
  
Ligne 575: Ligne 420:
  
 <code> <code>
-[root@centos8 ~]# lpstat -t+root@debian11:~# lpstat -t
 scheduler is running scheduler is running
 system default destination: Imprimante1 system default destination: Imprimante1
 members of class classe1: members of class classe1:
- Imprimante1 +        Imprimante1 
- Imprimante2+        Imprimante2
 device for classe1: ///dev/null device for classe1: ///dev/null
 device for imp1: socket://localhost:12000 device for imp1: socket://localhost:12000
 device for Imprimante1: parallel:/dev/lp0 device for Imprimante1: parallel:/dev/lp0
 device for Imprimante2: parallel:/dev/lp1 device for Imprimante2: parallel:/dev/lp1
-classe1 not accepting requests since Thu 03 Jun 2021 02:24:25 PM EDT +classe1 not accepting requests since Mon 06 Jun 2022 10:43:24 AM CEST 
- reason unknown +        reason unknown 
-imp1 accepting requests since Thu 03 Jun 2021 02:11:17 PM EDT +imp1 accepting requests since Mon 06 Jun 2022 10:03:48 AM CEST 
-Imprimante1 accepting requests since Thu 03 Jun 2021 02:23:03 PM EDT +Imprimante1 accepting requests since Mon 06 Jun 2022 10:39:32 AM CEST 
-Imprimante2 accepting requests since Thu 03 Jun 2021 02:23:46 PM EDT +Imprimante2 accepting requests since Mon 06 Jun 2022 10:41:06 AM CEST 
-printer classe1 disabled since Thu 03 Jun 2021 02:24:25 PM EDT +printer classe1 disabled since Mon 06 Jun 2022 10:43:24 AM CEST 
- reason unknown +        reason unknown 
-printer imp1 is idle.  enabled since Thu 03 Jun 2021 02:11:17 PM EDT +printer imp1 is idle.  enabled since Mon 06 Jun 2022 10:03:48 AM CEST 
-printer Imprimante1 now printing Imprimante1-1.  enabled since Thu 03 Jun 2021 02:23:03 PM EDT +printer Imprimante1 now printing Imprimante1-1.  enabled since Mon 06 Jun 2022 10:39:32 AM CEST 
- Printer not connected; will retry in 30 seconds. +        Printer not connected; will retry in 30 seconds. 
-printer Imprimante2 is idle.  enabled since Thu 03 Jun 2021 02:23:46 PM EDT +printer Imprimante2 is idle.  enabled since Mon 06 Jun 2022 10:41:06 AM CEST 
-Imprimante1-1           root              1024   Thu 03 Jun 2021 02:23:03 PM EDT+Imprimante1-1           root              1024   Mon 06 Jun 2022 10:39:32 AM CEST
 </code> </code>
  
Ligne 604: Ligne 449:
  
 <code> <code>
-[root@centos8 ~]# cat /etc/cups/printers.conf +root@debian11:~# cat /etc/cups/printers.conf 
-# Printer configuration file for CUPS v2.2.6 +# Printer configuration file for CUPS v2.3.3op2 
-# Written by cupsd on 2021-06-03 14:24+# Written by cupsd
 # DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING # DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
 +NextPrinterId 9
 <Printer imp1> <Printer imp1>
-UUID urn:uuid:2af2862a-9a4d-3095-59d5-ca108d8d9837+PrinterId 1 
 +UUID urn:uuid:8322102e-e029-325b-42eb-ed63c7904196
 Info imp1 Info imp1
 DeviceURI socket://localhost:12000 DeviceURI socket://localhost:12000
 State Idle State Idle
-StateTime 1622743877 +StateTime 1654502628 
-ConfigTime 1622743802+ConfigTime 1654502503
 Type 4 Type 4
 Accepting Yes Accepting Yes
Ligne 623: Ligne 470:
 KLimit 0 KLimit 0
 OpPolicy default OpPolicy default
-ErrorPolicy stop-printer+ErrorPolicy retry-job
 </Printer> </Printer>
 <DefaultPrinter Imprimante1> <DefaultPrinter Imprimante1>
-UUID urn:uuid:ea6f22ce-ee8f-3447-4e09-f8659ccfe929+PrinterId 7 
 +UUID urn:uuid:ba7e38f7-0547-387e-6189-7bb341799a36
 Info Imprimante1 Info Imprimante1
 MakeModel HP Color LaserJet Series PCL 6 CUPS MakeModel HP Color LaserJet Series PCL 6 CUPS
 DeviceURI parallel:/dev/lp0 DeviceURI parallel:/dev/lp0
 State Idle State Idle
-StateTime 1622744583 +StateTime 1654504772 
-ConfigTime 1622744245+ConfigTime 1654504646
 Type 8400972 Type 8400972
 Accepting Yes Accepting Yes
Ligne 641: Ligne 489:
 KLimit 0 KLimit 0
 OpPolicy default OpPolicy default
-ErrorPolicy stop-printer+ErrorPolicy retry-job
 </DefaultPrinter> </DefaultPrinter>
 <Printer Imprimante2> <Printer Imprimante2>
-UUID urn:uuid:1f7e7401-6bc4-306a-50ef-b07f2c78bf65+PrinterId 8 
 +UUID urn:uuid:751df4ab-afb6-3fce-4a26-80d0f2d131bd
 Info Imprimante2 Info Imprimante2
 MakeModel HP Color LaserJet Series PCL 6 CUPS MakeModel HP Color LaserJet Series PCL 6 CUPS
 DeviceURI parallel:/dev/lp1 DeviceURI parallel:/dev/lp1
 State Idle State Idle
-StateTime 1622744626 +StateTime 1654504866 
-ConfigTime 1622744626+ConfigTime 1654504866
 Type 8400972 Type 8400972
 Accepting Yes Accepting Yes
Ligne 659: Ligne 508:
 KLimit 0 KLimit 0
 OpPolicy default OpPolicy default
-ErrorPolicy stop-printer+ErrorPolicy retry-job
 </Printer> </Printer>
 </code> </code>
Ligne 668: Ligne 517:
  
 <code> <code>
-[root@centos8 ~]# cat /etc/cups/classes.conf +root@debian11:~# cat /etc/cups/classes.conf 
-# Class configuration file for CUPS v2.2.6 +# Class configuration file for CUPS v2.3.3op2 
-# Written by cupsd on 2021-06-03 14:24+# Written by cupsd
 # DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING # DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
 <Class classe1> <Class classe1>
-UUID urn:uuid:989a4f91-8d00-30f1-7322-63fbacfefb7f+PrinterId 9 
 +UUID urn:uuid:f0d54c11-d472-380d-70ba-1da156d82965
 Info classe1 Info classe1
 State Stopped State Stopped
-StateTime 1622744665+StateTime 1654505004
 Accepting No Accepting No
 Shared Yes Shared Yes
Ligne 695: Ligne 545:
  
 <code> <code>
-[root@centos8 ~]# lpstat +root@debian11:~# lpstat 
-Imprimante1-1           root              1024   Thu 03 Jun 2021 02:23:03 PM EDT +Imprimante1-1           root              1024   Mon 06 Jun 2022 10:39:32 AM CEST 
-[root@centos8 ~]# cancel imprimante1-1 + 
-[root@centos8 ~]# lpstat +root@debian11:~# cancel Imprimante1-1 
-[root@centos8 ~]#+ 
 +root@debian11:~# lpstat 
 +root@debian11:~#
 </code> </code>
  
Ligne 709: Ligne 561:
  
 <code> <code>
-[root@centos8 ~]# lpadmin -d imp1+root@debian11:~# lpadmin -d imp1
 </code> </code>
  
Ligne 715: Ligne 567:
  
 <code> <code>
-[root@centos8 ~]# lp /tmp/test.print+root@debian11:~# lp /tmp/test.print
 request id is imp1-2 (1 file(s)) request id is imp1-2 (1 file(s))
-[root@centos8 ~]# lpstat +root@debian11:~# lpstat 
-imp1-2                  root              1024   Thu 03 Jun 2021 02:29:29 PM EDT+imp1-2                  root              1024   Mon 06 Jun 2022 10:47:39 AM CEST
 </code> </code>
  
Ligne 724: Ligne 576:
  
 <code> <code>
-[root@centos8 ~]# lpmove imp1 classe1 +root@debian11:~# lpmove imp1 classe1 
-[root@centos8 ~]# lpstat +root@debian11:~# lpstat 
-classe1-2               root              1024   Thu 03 Jun 2021 02:29:29 PM EDT+classe1-2               root              1024   Mon 06 Jun 2022 10:47:39 AM CEST
 </code> </code>
  
Ligne 732: Ligne 584:
  
 <code> <code>
-[root@centos8 ~]# lpadmin -p Imprimante1 -r classe1 +root@debian11:~# lpadmin -p Imprimante1 -r classe1 
-[root@centos8 ~]# lpadmin -p Imprimante2 -r classe1 + 
-[root@centos8 ~]# lpstat -t+root@debian11:~# lpadmin -p Imprimante2 -r classe1 
 + 
 +root@debian11:~# lpstat -t
 scheduler is running scheduler is running
 system default destination: imp1 system default destination: imp1
Ligne 740: Ligne 594:
 device for Imprimante1: parallel:/dev/lp0 device for Imprimante1: parallel:/dev/lp0
 device for Imprimante2: parallel:/dev/lp1 device for Imprimante2: parallel:/dev/lp1
-imp1 accepting requests since Thu 03 Jun 2021 02:30:23 PM EDT +imp1 accepting requests since Mon 06 Jun 2022 10:50:11 AM CEST 
-Imprimante1 accepting requests since Thu 03 Jun 2021 02:28:33 PM EDT +Imprimante1 accepting requests since Mon 06 Jun 2022 10:46:34 AM CEST 
-Imprimante2 accepting requests since Thu 03 Jun 2021 02:23:46 PM EDT +Imprimante2 accepting requests since Mon 06 Jun 2022 10:41:06 AM CEST 
-printer imp1 is idle.  enabled since Thu 03 Jun 2021 02:30:23 PM EDT +printer imp1 is idle.  enabled since Mon 06 Jun 2022 10:50:11 AM CEST 
-printer Imprimante1 is idle.  enabled since Thu 03 Jun 2021 02:28:33 PM EDT +printer Imprimante1 is idle.  enabled since Mon 06 Jun 2022 10:46:34 AM CEST 
-printer Imprimante2 is idle.  enabled since Thu 03 Jun 2021 02:23:46 PM EDT+printer Imprimante2 is idle.  enabled since Mon 06 Jun 2022 10:41:06 AM CEST
 </code> </code>
  
Ligne 755: Ligne 609:
  
 <code> <code>
-[root@centos8 ~]# lpadmin -x Imprimante1 +root@debian11:~# lpadmin -x Imprimante1 
-[root@centos8 ~]# lpadmin -x Imprimante2 + 
-[root@centos8 ~]# lpadmin -x Imp1 +root@debian11:~# lpadmin -x Imprimante2 
-[root@centos8 ~]# lpstat -t+ 
 +root@debian11:~# lpadmin -x Imp1 
 + 
 +root@debian11:~# lpstat -t
 scheduler is running scheduler is running
 no system default destination no system default destination
Ligne 770: Ligne 627:
  
 CUPS peut également être administré en utilisant l'interface Web sur le port 631/tcp.  CUPS peut également être administré en utilisant l'interface Web sur le port 631/tcp. 
-</WRAP> 
  
 ----- -----
-Copyright © 2022 Hugh Norris.+ 
 +Copyright © 2024 Hugh Norris.
Menu