Categories
Server Software Ubuntu

Change hostname on Ubuntu 18.04 LTS

If you have Cloud cloud-ini installed you will have to edit

sudo nano /etc/cloud/cloud.cfg

to preserve your new hostname.

# This will cause the set+update hostname module to not operate (if true)
preserve_hostname: true

When that is done, run the rename command

sudo hostnamectl set-hostname new-hostname

Edit /etc/hosts so it corresponds with your new hostname

127.0.0.1   localhost
127.0.0.1   new-hostname

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

You can verify your changes by running

hostnamectl

At last, reboot and it should show the correct hostname.

Categories
Server Software Windows

Upgrade Windows edition with Dism

Have you downloaded the Evaluation ISO and want to make it real? Not a problem with Dism.

# Get current edition
C:\>Dism.exe /online /Get-CurrentEdition

# Get editions that you can upgrade to
C:\>Dism.exe /online /Get-TargetEditions

# Upgrade to desired edition
C:\>Dism.exe /online /Set-Edition:ServerStandard /AcceptEula /ProductKey:C3RCX-M6NRP-6CXC9-TW2F2-4RHYD

The above key is for Server 2016 Standard AVMA activation. You can find more keys for that here if you have Datacenter on your host.

Dism documentation: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/dism-windows-edition-servicing-command-line-options

Categories
Server Software Ubuntu

Upgrade Landscape On Premises to 19.10

Another release goes by and I wanted to write a short one about upgrading this time. Be sure to have the latest Ubuntu update – when I write this that would be 18.04.3 LTS. And guys, always backup first!

sudo add-apt-repository -u ppa:landscape/19.10
sudo apt-get update
sudo apt-get dist-upgrade

Refresh your Landscape site when done and see the new version. If you want to clean up the old one run this (but not necessary).

sudo add-apt-repository --remove ppa:landscape/19.01

I wrote about installing Landscape here. And you can find the Landscape documentation here.

Categories
Server Software Windows

How to safely clean up WinSxS

Windows Update may in some occasions not automatically clean up after it self. The fastest and safest way to do so is to run the following.

C:\>Dism.exe /online /Cleanup-Image /StartComponentCleanup

For more options and documentation you can read the source here;
https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/clean-up-the-winsxs-folder

Categories
Server Software Windows

Server Manager in Windows Server Core

Just because I find my self googling this every other week I have to make a short post about it.

To launch Server Manager, simply log in and type

C:\>sconfig
Categories
Server Software Ubuntu

Landscape 18.03 on Ubuntu 16.04 LTS

You can read how to upgrade your older installation here.

Install on-prem and add clients

install landscape-server

Before installing anything. Be sure to check /etc/hosts and correct your FQDN to what ever you want it to answer to. User only lower cases, or Lanscape may give errors.

sudo add-apt-repository ppa:landscape/18.03
sudo apt-get update
sudo apt-get install landscape-server-quickstart

install landscape-clients

sudo apt-get update
sudo apt-get install landscape-client

install cert

To install on other computers, it needs to trust the serve. Add the certificate to allow this.

sudo scp username@landscape.agurk.net:/etc/ssl/certs/landscape_server_ca.crt /etc/landscape/server.pem

sudo nano /etc/landscape/client.conf
ssl_public_key = /etc/landscape/server.pem

register client

The last line will guide you through the registration.

sudo landscape-config --computer-title "servername" --account-name standalone --url https://landscape.agurk.net/message-system --ping-url http://landscape.agurk.net/ping

The last step is to accept the registrations in https://landscape

https://help.landscape.canonical.com/
https://help.landscape.canonical.com/LDS/QuickstartDeployment18.03

Categories
Server Software

Two-factor Authentication with Duo Security

Duo Security two-factor authentication is a breeze to set up. And deserves a look at by everyone who wants to make their appliances or other logins more secure. Whether it is for but not limited to Microsoft RDP or WordPress. As an example you can see how the two-factor authentication works for RDP in the image below.

two-factor-rdp-network-diagram

My search for a way to use two-factor authentication began when I decided to open for any IP to my remote desktop sessions. As always, I used google to come up with several options. But Duo seems to be the best and most flexible out there. It got tons of options, great documentation, and even a free plan for personal use. What I will miss most when the trial runs out is the option for white listing IP addresses. So that when I am at home or at any of my Site-to-Site locations I can log straight in.

The account creation may be a bit more than you are used to from other sites. You are asked to set up the application on your phone and verify a few things before you are let in. After creating your account, the rest is mostly self-explanatory. I followed two guides. One to set up RDP and one for WordPress just to get me started.

When signing in to those places now, you will get a notification on your phone asking for access. If this is you, simply hit the green button and you are logged in. The process is painless and is literally over in a matter of seconds. If you are outside the cover of cellular data, you also have the option to use codes which is pre-added in the application on your phone.