MySQL automatically set created and lastupdated timestamps on columns

ALTER TABLE `tablename` ADD COLUMN `created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, ADD COLUMN `updated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; https://dev.mysql.com/doc/refman/5.6/en/timestamp-initialization.html https://dev.mysql.com/doc/refman/5.6/en/data-type-defaults.html Requires MySQL 5.6.5 or better

Creating a Microsoft Office 365 Offline Installer

Creating a Microsoft Office 365 Offline Installer Product IDs that are supported by the Office Deployment Tool for Click-to-Run Office 2013 Deployment Tool for Click-to-Run Office 2016 Deployment Tool Office 365 Offline Installer (as of 29-09-2015, untested)

A Blank SUSDB Database for WSUS 3.0 SP2 & Size Information

Initial SUSDB.mdf file after a virgin installation was 8,340KB During the initial setup of WSUS it goes away and downloads update information from Microsoft Update (You press Start Connecting and wait quite a while). After this process completes, but before you pressed next the size of SUSDB.mdf was 35,008 KB. A backup of a SUSDB taken… Read More »

Using WSUS to keep Adobe software up to date

http://windowsitpro.com/article/patch-management/Secure-non-Microsoft-applications-by-publishing-3rd-party-updates-to-WSUS-129241 https://wsuspackagepublisher.codeplex.com/ Adobe Products Reader – https://www.adobe.com/devnet-docs/acrobatetk/tools/AdminGuide/sccm.html Flash – http://blogs.technet.com/b/jasonlewis/archive/2010/09/21/new-scup-catalog-adobe-flash-player.aspx      

pkg check commands

pkg check -d for dependencies, pkg check -B for shared library issues pkg check -s for invalid checksum issues. pkg check -d && pkg check -B && pkg check -s https://forums.freebsd.org/threads/upgrading-to-9-3-and-php-apache.50419/

The wuauclt Utility

https://technet.microsoft.com/en-us/library/cc720477%28v=ws.10%29.aspx?f=255&MSPPError=-2147217396 The wuauclt Utility /a /ResetAuthorization Initiates an asynchronous background search for applicable updates. If Automatic Updates is disabled, this option has no effect. /r /ReportNow Sends all queued reporting events to the server asynchronously. /? /h /help Shows this help information.    

Windows Update impacting system performance

https://support.microsoft.com/en-us/kb/3050265 Fixes included in this update This update addresses an issue in which system performance can be decreased during scans. This issue has the greatest effect on computers that have a small amount of physical memory. This update addresses an issue in which Windows Update scans can fail and generate a 0x8007000E error. General improvements are… Read More »

Reporting problems to Microsoft about emails being delivered to Outlook.com

Use form at http://go.microsoft.com/fwlink/?LinkID=614866 Use SCS’s @outlook.com as contact email address. Enter IPs as 109.169.47.183 78.129.250.108 109.169.26.118 <Customers IP address> 109.169.26.118;109.169.47.183;78.129.250.108;<Customers IP address> You’ll get a message back eventually with a subject of Reported deliverability problem to Outlook.com XXXXXXXXXX and a message of Dear XYZ Please note that your ticket number is in the subject… Read More »

SSL and Apache2.4

Generate private key openssl genrsa -out domainname.key 2048 Generate Signing Request openssl req -new -key domainname.key -out domainname.csr

Amavis DKIM setup

Notes I’m keeping the keys organised by year, this might change in the future If you omit the 1024 from the genrsa command it’ll generate 1024 keys. Its supplied here now to remind me to upgrade these to 2048 keys when the time is right (at present Easyspace don’t allow you to enter 2048 records… Read More »

WordPress administration tips

Use WP-CLI (http://wp-cli.org/) Su to a non-privileged user # su -m www # wp core version 4.2.2 # wp core verify-checksums Success: WordPress install verifies against checksums. # wp core check-update Success: WordPress is at the latest version. # wp core update Plugsin # wp plugin status 4 installed plugins: UI akismet 3.1.1 A force-login-except-special-ip-range… Read More »

Software Restriction Policy

Default “Additional Rules” %HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRoot% %HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ProgramFilesDir% Additional Steps Remove LNK from Designated File Types (so shortcuts work!) Add the following Additional Rules %HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ProgramFilesDir (x86)%

Spectrum FreeBSD Servers SVN Setup

If SVN not installed (on the older servers) install by doing… portsnap fetch update cd /usr/ports/devel/subversion && make install clean If svnlite is already installed do… ln -s /usr/bin/svnlite /usr/bin/svn Once installed checkout our repos mkdir /scs cd /scs/ svn checkout https://svn.spectrumcs.net:9443/svn/freebsd-scripts/ svn checkout https://svn.spectrumcs.net:9443/svn/freebsd-preferences/

Traffic Capture Software

I usually use Wireshark but strumbkled accros this recently… Microsoft Network Monitor https://www.microsoft.com/en-gb/download/details.aspx?id=4865 https://en.wikipedia.org/wiki/Microsoft_Network_Monitor After I installed Microsoft Network Monitor I read the Wikipedia page I discovered Microsoft Network Monitor was been superseded by Microsoft Message Analyzer  (https://www.microsoft.com/en-us/download/details.aspx?id=44226). Microsoft Network Monitor seems to work on Windows 7 64bit, but I’ll give Microsoft Message Analyzer a try when I get a… Read More »

How to check WordPress versions on your server are up to date

Original script at https://www.howtoforge.com/how-to-find-outdated-wordpress-versions-on-your-server-to-reduce-the-risk-of-being-hacked This script has been improved to automatically detect latest WordPress version by sending a HTTP HEAD request to http://wordpress.org/latest and parsing the Content-Disposition: attachment; filename=wordpress-A.B.C.tar.gz result as suggested at https://wordpress.org/support/topic/programmatically-check-latest-wp-release <?php /** * find outdated wordpress versions * (c) 2014 howtoforge.com (M. Cramer) <m.cramer@pixcept.de> * Appended by Steve Scotter www.stephen-scotter.net */ if(!isset($argv[1])) die(“Please start this program with… Read More »