Unable to Reset Printing System on MacOS High Sierra

If you are having printing system crashes on MacOS High Sierra, read on! After recently upgrading to MacOS High Sierra, I found that every time the OS loaded up a print dialogue, the application in question would crash.

Google reveals the best first step for this as to Reset the Printing System as documented by Apple. Please be warned, you will lose all your printers if you do this, however, it is likely a bad driver you are encountering so this will at least give you access to add new printers in.

However, I was unlucky enough to find this to be impossible. In my particular case, holding control on the System Preferences panel and clicking on printers, resulted in a crash of System Preferences.

So, if you have exhausted all possibilities MacManager put has a neat little script as defined on the MacOS Hints forum to get around this.

#!/bin/sh

for printer in `lpstat -p | awk '{print $2}'`
do
echo Deleting $printer
lpadmin -x $printer
done

If you save this to a file called deletePrinters.sh, then run on the command line/terminal ‘sh deletePrinters.sh’, you will be able to remove all printers and should get access to the Printers and Scanners menu in System Preferences again. Note, you could adapt this to comment out the lpadmin -x $printer line and instead see the printer names, then try deleting them one by one, to hopefully find the bad one before you delete them all.

Hope this helps, now time for me to get back to installing printers again!

Pinentry and Pinentry-Curses on Mac OSX Backspace Issues

So this is going to be short and sweet… for those of you that are looking to use pinentry or pinentry-curses (at least in my case installed with Homebrew) that are having problems with the backspace character not working properly… this might just be up your alley.

Recently while using the LastPass CLI (for writing an integration with Alfred) on OSX Yosemite, I had an issue where pinentry-curses was registering the backspace character as a new character… not a backspace.

The fix was rather simple in the end… just execute the following in your terminal before the related command:

TERM=linux-vt

That seems to be enough for it to look correct (which if you just use linux the pinentry box looks very wrong as some characters are not recognised) and the backspace character now works correctly. It is a win win 😀

Hope that helps someone else!

Stuart

cPanel Bug causing fixrndc to never complete on CentOS 6

If you are having problems on a recent cPanel installation on CentOS linux where /scripts/fixrndc starts and never completes this may fix your issue. I have noted that this is currently an issue on (at least) cPanel/WHM Release 11.32.3 but may also affect other versions.

After chatting with Michael from cPanel Support he has stated: “The basic issue is that on Centos 6 the /etc/init.d/named script needs to use the “portrelease” command before it can bind port 953. Such a line isn’t present in the default /etc/init.d/named script provided by the cPanel installer. Reinstalling bind installs a working /etc/init.d/named.”

This can manifest in the following ways (I have found so far):

  • EasyApache pauses on /scripts/fixrndc and never completes
  • Initial server GetStarted Wizard does not complete setting up bind and gets stuck
  • /scripts/upcp –force freezes and does not complete

These are the cases I have seen thus far. If you run /scripts/rndc manually you will likely get the following output:

warn [fixrndc] /usr/sbin/rndc status failed: WARNING: key file (/etc/rndc.key) exists, but using default configuration file (/etc/rndc.conf)rndc: connect failed: 127.0.0.1#953: connection refused
warn [fixrndc] /usr/sbin/rndc status failed: WARNING: key file (/etc/rndc.key) exists, but using default configuration file (/etc/rndc.conf)rndc: connect failed: 127.0.0.1#953: connection refused
Restarting named
warn [fixrndc] /usr/sbin/rndc status failed: WARNING: key file (/etc/rndc.key) exists, but using default configuration file (/etc/rndc.conf)rndc: connect failed: 127.0.0.1#953: connection refused

The simple fix for this is to reinstall BIND using yum. All you need to do is execute:

yum reinstall bind

And the problem will be fixed. Michael has informed me that this will be fixed in a future update to cPanel. Kudos to him and the cPanel support team for getting me back up and running in RECORD fast time.

Stuart 😀