AzCopy Batch File with SAS Token: The remote server returned an error (403) Forbidden

By Jake Edwards | Thursday, August 18th, 2016 | Permalink | No Comments

I was recently trying to copy some files from Azure using an SAS token. It was failing with the following error;

The remote server returned an error: (403) Forbidden.
Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.

When run manually in the command line — it’d work.

Turns out it was purely because it was running with a batch file, the % signs (common in the SAS Signature) don’t play nice with batch files.
Changing the % in the signature to %% escaped them, and let it run normally.

Hoping this saves someone else 1 hour ūüėČ

DisplayPort Screen Blank after Boot or Sleep with Asus STRIX GTX 970 Series

By Jake Edwards | Sunday, March 27th, 2016 | Permalink | 4 Comments

Seems there’s an issue with the Asus Strix GTX 970 card when using specifically the DisplayPort (DP) connector on certain monitor models.

Symptoms

I found my screen (Dell U2713H) would suggest there was “No Signal” coming from the PC at certain times. More confusingly, intermittently;

  • Black screen/No Signal when first turning on the PC
  • Black screen/No Signal when resuming from Sleep
  • Black screen/No Signal between the Windows 10 boot screen and the login screen.

Solution

When you finally get it too boot without issue, you need to update the VBIOS of your graphics card.

I believe I was on version¬†84.04.36.00.AS15, however since updating to 84.04.84.00.AS17 I haven’t had an issue.

You can download the new VBIOS from Asus’ Support Website. It has the description “Fix DP display issue with certain monitors”

There are some older VBIOS versions too;¬†84.04.2F.00.AS05 & 84.04.1F.00.AS13 & 84.04.1F.00.AS08¬†though I can’t confirm they had the same issue.

If you need to check the version of your VBIOS, you can use the GPU Tweak II download on the same page (though don’t trust the LiveUpdate as it didn’t pick up this update).

Asus STRIX GTX970 on GPU Tweak II

 

OpenWRT and GRE: Error 806

By Jake Edwards | Saturday, September 12th, 2015 | Permalink | No Comments

Trying to connect to a VPN failed while running behind my OpenWRT router (Chaos Calmer) from a Windows LAN client.

Adding the following software package to the router resolved the issue;

  • kmod-nf-nathelper-extra

The original error was;

806: The VPN connection between your computer and the VPN server could not be completed. The most common cause for this failure is that at least one Internet device (for example, a firewall or a router) between your computer and the VPN server is not configured to allow Generic Routing Encapsulation (GRE) protocol packets. If the problem persists, contact your network administrator or Internet Service Provider.

Using screen after su: Cannot open your terminal

By Jake Edwards | Tuesday, August 25th, 2015 | Permalink | No Comments

If you try to use screen after using su to switch user you might get the following message;

Cannot open your terminal '/dev/pts/0' - please check.

Rather than adjusting permissions of /dev/pts/0, simply run the following before screen;

script /dev/null

Force a reserved Windows 10 update early

By Jake Edwards | Saturday, August 1st, 2015 | Permalink | No Comments

To force an early Windows 10 upgrade from Windows 7 or Windows 8, follow one of the two methods below. You will need administrative privileges to run the update.

ForceWin10update

Method 1 – Registry

  1. Locate the registry key:
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\OSUpgrade
  2. Create a new DWORD (32-bit) Value with the name AllowOSUpgrade, and set the value to 1.
  3. Run “Check for Updates” in Windows Update

Method 2 – Command Line

  1. Remove all files in C:\Windows\SoftwareDistribution\Download
    • It seems Windows 10 won’t install with existing pending updates.
    • These files are temporary storage for Windows Update so it’s¬†okay¬†to delete them
  2. Open Command Prompt and type;

    wuauclt.exe /updatenow

  3. Open Windows Update from the Control Panel and you should see the update starting to download.
  4. If you get a Windows Update error, make sure you cleared the directory out above, and restart your PC.

 

Searching Active Directory from any domain PC

By Jake Edwards | Tuesday, April 14th, 2015 | Permalink | No Comments

If you’re on a domain and would like to search Active Directory from any PC, you can run the following command to open the Active Directory¬†query window.

  1. Start > Run
  2. SystemRoot%\SYSTEM32\rundll32.exe dsquery,OpenQueryWindow

SearchActiveDirectory

Use WHM CPanel as Dynamic DNS Service

By Jake Edwards | Tuesday, April 7th, 2015 | Permalink | 1 Comment

Several of the previously-free Dynamic DNS providers have gone paid. I already have¬†a cPanel-based hosting account, so I figured why not use the DNS Zone-editing mechanism to create my own personal Dynamic DNS Provider? Seems I wasn’t the only one who thought of that :).\

WHMDDNS

The following script on GitHub gives you a PHP example on how to dynamically update the zone edit files based on a request from a router or internet connected device that needs the Dynamic DNS Name.

https://github.com/TeamPalmTree/WHMDDNS

This assumes you have the domain within your cPanel account as the primary domain, or an Add-on domain, plus that you have access to the DNS Zone Editing tools.

DNSZoneEditorCpanel

The updater will need to the use the following custom URL sequence;

http://[USERNAME]:[PASSWORD]@webserver.com/WHMDDNS.php?hostname=[DOMAIN]&myip=[IP]

You’ll need to adjust the pattern to match the substitution tokens as you see fit.

OpenWRT & ddns-scripts

OpenWrt has a DDNS updater available through the means of ddns-scripts.

This is a screenshot of how the entry would need to be setup to work with the script above for the following;

Domain: sample.shadowsplace.net
Username: cpanelusername
Password: cpanelpassword

DDNS Setup on OpenWRT for WHMDDNS

Internet Connection Sharing has been disabled by the Network Administrator – Windows 8

By Jake Edwards | Tuesday, March 31st, 2015 | Permalink | 5 Comments

To manually workaround this issue you need to jump into the registry to enable ICS.
This is usually deployed via Group Policy on a domain network.

As usual, be careful editing the registry.

The Workaround

  1. Start > Run > gpedit.msc
  2. Locate;
    • Computer Configuration/Administrative Templates/Network/Network Connections
  3. Disable the following policies;
    • Prohibit installation and configuration of Network Bridge on your DNS domain network
    • Prohibit use of Internet Connection Firewall on your DNS domain network
    • Prohibit use of Internet Connection Sharing on your DNS domain network
    • Require domain users to elevate when setting a network‚Äôs location
  4. Start > Run > regedit
  5. Locate;
    • Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Network Connections
  6. Add/update a registry DWORD entry for the following, and set it to 1;
    • NC_PersonalFirewallConfig
    • NC_ShowSharedAccessUI

Thanks to Jeff for the find.

Find the BIOS Version from the Command Line and Powershell

By Jake Edwards | Tuesday, March 24th, 2015 | Permalink | No Comments

Similar to finding the Dell Service Tag via the command line, we can use WMI to retrieve the BIOS Version.

This is useful for finding out whether your PC is up-to-date with the BIOS revisions provided by the manufacturer.

Command Line

wmic bios get smbiosbiosversion

Powershell (Local)

(Get-WmiObject win32_bios).SMBIOSBIOSVersion

Powershell (Remote)

(Get-WmiObject win32_bios -computer COMPUTERNAME).SMBIOSBIOSVersion

tvheadend, Plex Media Server & Chromecast

By Jake Edwards | Tuesday, March 17th, 2015 | Permalink | 5 Comments

I use my Chromecast regularly for all my media streaming, however it never allowed me to watch Live TV.
Why not consolidate the two? As I was already running a Plex server, adding a Live TV server into the mix would be ideal rather than using another PC.

Plex handles all the transcoding, meaning Live TV can be shown on the Chromecast, as well as any other device that supports Plex channels.

Setup

DVB-T Free-to-Air -> Sony PlayTV -> tvheadend -> Plex Media Server -> Chromecast

tvheadend

The TV server package I decided to use was tvheadend. It seemed to have the best support across all of the options I was able to collate — and it’s regularly updated too.

The server is running Debian, and tvheadend is provided as a package on the following repository. You’ll want to add this to the end of your /etc/apt/sources.list. Note that it needs to be the unstable version as the stable version is quite out of date;

deb http://apt.tvheadend.org/unstable wheezy main

The configuration was straightforward, with documentation provided on their Redmine wiki.

Sony PlayTV

This works reasonable well with a Sony PlayTV (dib0700) dual-digital tv tuner which you usually pick up off Gumtree or eBay for a reasonable price and works well with Australian TV.

You’ll want to put the firmware file (dvb-usb-dib0700.1.20.fw)¬†for this tuner into the relevant /lib/firmware directory on your server;

http://www.linuxtv.org/downloads/firmware/#dibcom

I needed to disable the “Idle Scan” on each tuner through tvheadend as it was causing kernel panics after a few days of running. Power Save and Initial Scan are¬†okay to use.

DisableIdleScanTuner

Plex Channel

To get tvheadend into Plex, we need to use a channel. There have been a few, tvheadend-ng which is available on GitHub. You’ll want to clone this into your Plex channels directory;

https://github.com/realriot/tvheadend-ng.bundle

Configuration was simple, though one notable point is that if you’re using a reverse proxy with tvheadend, you’ll need to put the path after the port in the Web Port field.

TvHeadEndPlex

Channel Images & Icons

The icons for the Plex Channel don’t appear correctly with security enabled on TVHeadEnd.

It’s a permission error. The trick is to whitelist for all users connecting from 127.0.0.1/32 to have full access. This assumes your Plex is running on the same server as tvheadend. You’ll need to amend your IP filter accordinglly. More detail on Gav’s blog.

Permisison Setup TVHeadEnd Whitelist

Next Page »