Cups password editing on Linux

I have a few printers on my Linux (Kubuntu, if that matters) that do require password authentication. So far, each time I had to change the password, I simple edited the printers.conf file and did a replace-all, fire a cups service restart and that was all I needed to be back on printing. Today I had to repeatadly edit the printers.conf file since it was automatically rolled back from a copy I was unabled to find. After a while, being unable to find the master copy, I thought it was a kind of cups dump that was rolling back changes. And in fact, having a closer look at the head of the file revelead it:
# Printer configuration file for CUPS v2.2.2
# Written by cupsd
Therefore the solution was simple:
  1. stop the cups service;
  2. edit the printers.conf file;
  3. restart the cups service.
Now, while I understand there are some good reasons for not editing configuration files by-hand, I also strongly state that this is Unix (-like), and the core is based on editable, human readable, configuation files the system has to obey to! So instead of having my configuration file silently rolled back, I claim logs to clearly report the rollback action, that would made me think about the problem. Last but not least, this kind of approach cleary nukes the old style comfortable edit-and-then-SIGHUP workflow!

The article Cups password editing on Linux has been posted by Luca Ferrari on November 7, 2017