[MacTUG] defaults read

Dani Roloson daroloso at uwaterloo.ca
Tue Aug 30 14:25:59 EDT 2016


As mentioned this morning, defaults read is supposed to have the side-effect of forcing a reload of the plist.


However:


% ls -l /Library/Preferences/org.cups.printers.plist

-rw-r--r--  1 root  wheel  10343 Aug 30 12:12 /Library/Preferences/org.cups.printers.plist


% defaults read /Library/Preferences/org.cups.printers.plist

2016-08-30 14:12:51.591 defaults[664:6851]

Domain /Library/Preferences/org.cups.printers.plist does not exist


% defaults read /Library/Preferences/org.cups.printers

2016-08-30 14:12:51.601 defaults[665:6859]

Domain /Library/Preferences/org.cups.printers does not exist


% defaults read org.cups.printers.plist

2016-08-30 14:12:51.630 defaults[666:6864]

Domain org.cups.printers.plist does not exist


% defaults read org.cups.printers

2016-08-30 14:12:51.642 defaults[667:6869]

Domain org.cups.printers does not exist


Any ideas?


-------------


Workaround is


launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist


sed -i -e 's/OLDserver/NEWserver/' /Library/Preferences/org.cups.printers.plist


launchctl load -w /System/Library/LaunchDaemons/org.cups.cupsd.plist

Also for finding and removing keychains from command line, the following
need to be run as the user not root

security find-internet-password -s OLDserver

security delete-internet-password -s OLDserver
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uwaterloo.ca/pipermail/mactug/attachments/20160830/a3f53420/attachment.html>


More information about the MacTUG mailing list