Table of Contents: Tech

Most Popular: Tech

NextCloud – Purge Music Library from DB

I recently posted an old bash script I had written to forcefully rescan the music library for the music app in NextCloud when new files aren’t being found, but what happens when you delete or make some changes to the MP3’s or file structure of your music library, then you go to run the rescan library occ script, and NextCloud proceeds to go ape shit, spewing a whole lot of errors in RED, and you can’t do anything? What now, home slice?

Welp, after some research, I found the easiest fix was just to dump the corresponding “oc_music_tracks” table from the database and start fresh. So again, it’s script writin’ time, boyz and girlz!

Continue reading “NextCloud – Purge Music Library from DB”

NextCloud – Rescan Music Library for All Users

NextCloud is a kick-ass piece of open-source software for personal cloud file sharing, backing up cell phones, email, and other forms of data, syncing contact lists, online collaboration, communication, and a variety of other use cases, but over the last few years, I’ve come across a few pitfalls and annoyances that required manual interventions. In doing so, I’ve lost quite a few man-hours of my pitiful existence on this planet scouring forums and GitHub posts, so let my loss be your gain.

Continue reading “NextCloud – Rescan Music Library for All Users”

Google AdSense Ads Are Not Displayed in Firefox with Startpage Privacy Protection Installed

Oh man, I was banging my head off of the desk for a good long while trying to figure out why Google AdSense ads were not being displayed using Google SiteKit (Version 1.92.0) on a WordPress installation (Version 6.1.1). I scoured forums for countless hours on end blindly following rabbit trails of various troubleshooting steps, install guides on Google AdSense and Tag Manager manual installation, and reading other people’s articles that were having similar error messages, none of which were overly helpful, but was not having any luck. It’s only in retrospect, that I realized if I were paying closer attention to some really obvious details, I could have spared myself some grief and several more wasted ticks off the old life clock.

These are the two primary (redacted) error messages I was getting:

GET https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-XXXXXXXXXXXXXXXX&host=ca-host-pub-XXXXXXXXXXXXXXXX
Blocked By Extension

TLDR – “Blocked By Extension” was the dead giveaway I kept overlooking.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-XXXXXXXXXXXXXXXX&host=ca-host-pub-XXXXXXXXXXXXXXXX. (Reason: CORS request did not succeed). Status code: (null).

Continue reading “Google AdSense Ads Are Not Displayed in Firefox with Startpage Privacy Protection Installed”

Bash Script – Test Veeam Linux Agent Socket and Restart Service if Needed

I recently started using the full version of Veeam Backup & Replication (Build 11.01.1261) in a corporate production environment and was kind of shocked to find that the Veeam Agent for Linux (Agent version: 5.0.1.4493) fails so regularly with the following warning and error messages:

Processing ServerName Error: Failed to execute agent management command print. Connection refused Failed to connect: /var/tmp/veeam/socket/veeamservice.sock. Failed to connect to veeamservice daemon.

and

Task failed. Error: Failed to execute agent management command print. Connection refused Failed to connect: /var/tmp/veeam/socket/veeamservice.sock. Failed to connect to veeamservice daemon.

Apparently, Veeam offers no error checking or resolution process for automatically restarting the service, so I had to write a quick script to resolve this ongoing issue.
Continue reading “Bash Script – Test Veeam Linux Agent Socket and Restart Service if Needed”

Ubuntu Server 18.04 – Postfix 3.3.0 Issues

After doing a release upgrade to Ubuntu Server 18.04, Postfix stopped working with the following messages in the syslog:

Mar 11 09:56:02 servername postfix/master[1046]: warning: process /usr/lib/postfix/sbin/smtpd pid 12628 exit status 1
Mar 11 09:56:02 servername postfix/master[1046]: warning: /usr/lib/postfix/sbin/smtpd: bad command startup -- throttling
Mar 11 09:57:02 servername postfix/smtpd[12650]: fatal: in parameter smtpd_relay_restrictions or smtpd_recipient_restrictions, specify at least one working instance of: reject_unauth_destination, defer_unauth_destination, reject, defer, defer_if_permit or check_relay_domains

The fix:

postconf -e 'compatibility_level=2'
systemctl restart postfix.service

Bash Script – Install HP Server Management Tools on Ubuntu Server

Here’s a quick and dirty, no-frills bash script to install the HP Server Management Tools on Ubuntu Server. As is, it will install the command line utilities to configure ILO and your RAID controllers. You can look up the other package names available for your distribution by examining the Packages file as in this example here:

Continue reading “Bash Script – Install HP Server Management Tools on Ubuntu Server”

Server 2012 and Up – Sync DHCP Filter List on Hot Spare Failover Server

Once again, we find out how worthless and pathetic Microsoft is when it comes to thoroughness. Starting with Server 2012, they added the ability to have a failover DHCP server using load balancing or by acting as a hot spare and have it replicate the server configuration, which is great, except they left out the MAC filtering lists, forcing us to use scripts yet again to accomplish something that should have been built in.
Continue reading “Server 2012 and Up – Sync DHCP Filter List on Hot Spare Failover Server”

How to Clone Windows with Clonezilla when the Destination Disk is Smaller than the Original – OR – Cloning a Large Drive to a Smaller SSD

I’ve done this dozens of times now over the last couple of years when it comes to swapping out workstation hard drives with SSDs and it’s pretty much become second nature at this point, but I think the world could use a good write up on this because I’ve wasted countless hours acquiring this knowledge.

So, for today’s lesson, we will be cloning a Windows 8.1 installation from a 500GB desktop hard drive onto a 250GB SSD. Basic knowledge of how to use tools like the command line and Disk Management are assumed. Continue reading “How to Clone Windows with Clonezilla when the Destination Disk is Smaller than the Original – OR – Cloning a Large Drive to a Smaller SSD”

Exchange 2010 – Add Send As Permission for All Users/Future Users from a User Account

No need for a bunch of hoopla, here’s the short and sweet version.

Add Send As Permission for All Users from a User Account

Get-Mailbox -ResultSize Unlimited | Add-ADPermission -User "YourDomain\Username" -Extendedrights "Send As"

To add send as permissions for future users, we need to create a powershell script with the above line in it, make sure you have enabled the use of unsigned scripts by issuing the “Set-ExecutionPolicy remotesigned” command at an administrator ran PowerShell prompt, and create a task scheduler job to run our script with the administrator credentials saved in there.
Continue reading “Exchange 2010 – Add Send As Permission for All Users/Future Users from a User Account”

Logitech BCC950 Conference Cam – Bad Speakers, Blown Speakers, Defective Speakers

Since the internet has become overrun by a gaggle of free speech hating corporations, I thought I would take a brief moment to display my discontent for what I feel are some sort of manufacturing defects of the Logitech BCC950 conference cam.

Don’t get me wrong, for the price, this thing kicks major ass in comparison to many of the alternatives out there. The video is amazing quality for 1080@30fps with PTZ and honestly I do love the camera for all it’s strong points.

Butt, and I say that with an improperly formed sentence and a huge ASS in mind, I just wanted to make the general public aware to the fact that in the last two years, the company I work for has purchased thirty-one of these units and four out of those have had prematurely failing speakers that just start crackling out of nowhere. Continue reading “Logitech BCC950 Conference Cam – Bad Speakers, Blown Speakers, Defective Speakers”