Author Archives: Kaven Gagnon

avatar

About Kaven Gagnon

System Engineer / Network Administrator

Windows : How to remove license key and unregister

You may require sometimes to remove the license from a Windows installation, whatever this is to re-assign a license to another machine, or before publishing an appliance, etc.

Follow this procedure to put back your Windows installation to the original installation state, license wise.

The following commands need to be performed with the Command Prompt or PowerShell terminal with elevated privileges.

1. Uninstall the product key and unlicense Windows :

2. Remove the product key from the registry :

3. Reset the activation timer :

Following these steps, all license trace and activation will be gone.

JunOS : Upgrade return ERROR: Package signature validation failed. Aborting install.

Experiencing the following error while upgrading JunOS?

Verify the signature of the new package
verify-sig: cannot validate certs.pem
certificate is not yet valid: /C=US/ST=CA/L=Sunnyvale/O=Juniper Networks/OU=Juniper CA/CN=PackageProductionRSA_2018/emailAddress=ca@juniper.net

ERROR: Package signature validation failed. Aborting install.

This error could be caused by incorrect date and time set on your device (back in time).

To validate the current value, enter in shell mode and issue the “date” command.

Example :

To set the date and time, use the command “date YYYMMDDHH.MM” (Year | Month | Day | Hour | Minute)

Example :

Then go back in “cli” mode and attempt the upgrade again

[…]

Linux : There is no screen to be resumed matching …

Using “screen” on Linux to perform your important work? Way to go, SysAdmin ūüôā

Then you might at some point encountered the following behavior – while attempting to resume a session using “screen -r”, the following message occurred :

There is a screen on:
1610.pts-0.host (25/08/18 08:25:36 PM) (Attached)
There is no screen to be resumed matching 1610

This behavior actually result from using multi-display mode. When you detach a screen session on multi-display, it will only detach on the current terminal.

You can easily workaround this issue using “-x” option instead of the usual “-r” as followed :

Example :

Windows : How to display a message at the Windows logon

Similar as what you can do on linux with the Message Of The Day (MOTD), there is a way to display a message to users when they login to their session.

Microsoft refer to this as a “legal notice” and can be achieved through the registry.

1. Open the Windows Registry Editor with elevated privileges :

2. Browse to the following key :

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System

3. Double-click on “legalnoticecaption” and write the notice title

4.¬†Double-click on “legalnoticetext” and enter the content message of your notice

You are all set!

Linux : How to get hardware serial number

The easiest way to get hardware serial and related information is using “dmidecode“.

The command below should give you exactly what you need :

The command above does not usually work with “clone” computers/servers. Alternatively, you may use the command below, which will output all parts serial number availables :

 

Windows : Upgrade the Ubiquiti Unifi SDN Controller

This tutorial will show you the simple steps to upgrade your Ubiquiti Unifi SDN Controller running on Windows.

The software can be found on the manufacturer Web site (https://www.ubnt.com/download/unifi). We recommend using the LTS (Long Term Support) version unless you need the bleeding edge features. Upgrading to newer version might not allow downgrade in case of issue later as the database will be upgraded.

ALWAYS do and download a backup prior upgrading. The installer should take care of keeping your current settings and statistics, but just in case it does not or fail to do so, you can always install the oldest version and restore your backup.

A manual backup can be made through the WebUI (https://IP_Address:8443/) > Settings > Maintenance > Backup > Download Backup

1. Download the new software version (https://www.ubnt.com/download/unifi), again preferably the LTS version

2. Gracefully stop the Unifi Controller service or process

3. Run as administrator the new software executable

As the installer should detect your existing inferior version, it should technically ask you if you want to upgrade to the newer version, just say yes.

VMware : Unable to deploy OVF template, Next button greyed out

I was a bit stunned when I attempt to deploy the vSphere Replication Appliance on a new v6.7 cluster.

The Next button on the very first page where you select the template files just never turned blue (it always stayed grey) after selecting the files, just like if I did not selected all the files or the template is incompatible or corrupted.

No matter what I tried, it just stayed that way – trying to import the same template in a v6.5 cluster worked like a charm.

It turned out to be a bug on the initial v6.7.0.12000 release. After upgrading the vCenter appliance to 6.7.0.13000, the problem was resolved.

Windows : How to retrieve Fiber Channel interface WWNs

Here is a simple PowerShell command that will output the FC host adapter interface WWNs.

If your interface have two ports, both will be output in order.

This command have been successfully tested with QLogic adapters on Windows 2012 and 2016.

Linux : How to show domain TTL with DIG

Here is some useful commands to display a domain Time To Live (TTL) using the DIG command (which is usually included within “bind-utils” package).

To display the full information :

To display the short, default answer :

NOTE : Replace “domain.tld” by the domain you want to query.

Windows : Change DNS update frequency in Active Directory

If you are not satisfied with the refresh rate of DNS within your active directory environment, there is a way of forcing it by increasing or decreasing the default setting in the registry.

First of all, there is a command to find out your curent settings :

It should output something similar to :

It you want to change this to a different value, simply open the registry editor (regedit.exe) and browse to the following :

HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ DNS \ Parameters

Change the value of “dspollinginterval” as you see fit (the value should be in seconds).