published by whitemice on Fri, 08/30/2019 - 15:36
The assignment of print queues to device URIs can be listed from a CUPS server using the "-v" option.
The following authenticates to the CUPS server cups.example.com as user adam and lists the queue and device URI relationships.
published by whitemice on Fri, 08/30/2019 - 15:29
Listing completed jobs
By default the lpstat command lists the queued/pending jobs on a print queue. However the completed jobs still present on the server can be listed using the "-W completed" option.
For example, to list the completed jobs on the local print server for the queue named "examplep":
published by whitemice on Fri, 08/30/2019 - 15:11
Create A Print Queue
[root@host ~]# /usr/sbin/lpadmin -U adam -h cups.example.com:631 -p examplelm1 -E \
-m "foomatic:HP-LaserJet-laserjet.ppd" -D "Example Pick Ticket Printer"\
-L "Grand Rapids" -E -v lpd://printer.example.com/lp
This will create a queue named examplelm1 on the host cups.example.com as user adam.
published by whitemice on Fri, 05/24/2019 - 16:09
Added a cron job to a service account's crontab using the standard crontab -e -u ogo command. This server has been chugging away for more than a year, with lots of stuff running within he service account - but nothing via cron.
Subsequently the cron jobs didn't run. :( The error logged in /var/log/cron was:
published by whitemice on Thu, 04/18/2019 - 14:30
This is a query to report the number of rows and the estimated size of all the tables in a MySQL database:
SELECT
table_name,
table_rows,
ROUND(((data_length + index_length) / 1024 / 1024), 2) AS mb_size
FROM information_schema.tables
WHERE table_schema = 'maindb;
Results look like:
published by whitemice on Sun, 05/06/2018 - 16:11
When testing applications one of the concerns is always that their actions don't effect the real-world. One aspect of that this is sending e-mail; the last thing you want is the application you are testing to send a paid-in-full customer a flurry of e-mails that he owes you a zillion dollars. A simple, and reliable, method to avoid this is to adjust the Postfix server on the host used for testing to bury all mail in a shared folder. This way:
published by whitemice on Sun, 04/22/2018 - 11:14
One of the beauties of LDAP is how simply it lets the user or application perform searching. The various attribute types hint how to intelligently perform searches such as case sensitivity with strings, whether dashes should be treated as relevant characters in the case of phone numbers, etc... However, there are circumstances when you need to override this intelligence and make your search more or less strict. For example: in the case of case sensitivity of a string. That is the purpose of the extensibleMatch.
Look at this bit of schema:
published by whitemice on Sun, 04/22/2018 - 10:34
I needed to prepare some SD cards for deployment to Android phones. After formatting the first SD card in a phone I moved it to my laptop and was met with the "Error mounting... unknown filesystem type exfat
" error. That was somewhat startling as GVFS gracefully handles almost anything you throw at it. Following this I dropped down to the CLI to inspect how the SD card was formatted.
published by whitemice on Tue, 03/07/2017 - 09:18
Occasionally one gets reminded of something old.
[root@NAS04256 ~]# kinit adam@example.com
Password for adam@Example.Com:
kinit: KDC reply did not match expectations while getting initial credentials
Huh.
[root@NAS04256 ~]# kinit adam@EXAMPLE.COM
Password for adam@EXAMPLE.COM:
[root@NAS04256 ~]#
In some cases the case of the realm name matters.
published by whitemice on Thu, 02/09/2017 - 06:51
Almost every server I work with is a virtual machine; accordingly I like to do one small install with all the packages that I always want [like pam-nss-ldapd, snmp-utils, dstat, etc...] but don't install by default. Then I make sure VMware tools is installed and operational. From that point forward I can just clone that one VM and add to it when I want a new instance of something.
Pages