Configure New timezone Permanently in bash

centos

In the realm of Linux server administration, managing time settings is a critical aspect that directly impacts system synchronization and overall functionality.

Whether you’re a seasoned Ubuntu administrator or a novice looking to enhance your server configuration skills, this guide is tailored to help you efficiently and effectively set up and maintain the desired timezone on your Ubuntu server.

Configuration

$ timedatectl list-timezones
output omitted...
Asia/Kolkata
Asia/Krasnoyarsk
Asia/Kuala_Lumpur
Asia/Kuching
Asia/Kuwait
Asia/Macau
output omitted...
$ sudo timedatectl set-timezone Asia/Kuala_Lumpur

Explanation

  1. list-timezones is to list all supported time zone by timedatectl
  2. set-timezone Asia/Kuala_Lumpur is to make your system to follow Kuala Lumpur’s timezone

X11 forwarding after sudo

centos
$ xauth list
<hostname>/unix:0 MIT-MAGIC-COOKIE-1 1fb2c048e3a32a3fe013c565b8422727
<hostname>/unix:12 MIT-MAGIC-COOKIE-1 29b9ba4a72136095e43540119c8da384
<hostname>/unix:11 MIT-MAGIC-COOKIE-1 99b08ccb7e8a76e75c70d7c75723505d
<hostname>/unix:10 MIT-MAGIC-COOKIE-1 b2ea07f58365b8672bea7497ffacee4f

Then execute, change user as root with sudo -i and execute xauth add followed by one entry from above output that having the highest number.

$ sudo -i
# xauth add <hostname>/unix:12 MIT-MAGIC-COOKIE-1 29b9ba4a72136095e43540119c8da384

Explanation

  1. xauth list being executed before sudoing to root to output the xauth authorization hex key
  2. after sudo as root, xauth add to add the authorization hex key from non-root into root

Installing X11 for X11 forwarding

centos
$ sudo yum install -y xorg-x11-server-common
$ sudo yum install -y  xorg-x11-xauth

Then logout, login from your shell and execute your X windows application.

Explanation

  1. xorg-x11-server-common is needed for every common file needed in x11
  2. xorg-x11-xauth is needed for X11 authorization utilities

SSH Secure Shell, Algorithm negotiation failed

windows

Its happen one of my client is using SSH Secure Shell client to connect to one of their virtual machine.

The error message sound like,

Server responded “Algorithm negotiation failed”.

Key exchange with the remote host failed. This can happen for example if the remote host computer does not support selected algorithm.

Reading this pop-up error message remind me of one of security scanning executed by our security department (obviously) to disable certain cipher and algorithm which they flag as Medium.

This SSH Secure Shell client is a very old program, and does not support modern algorithm for secure connection.

My advice, change to another SSH client instead. Putty is the first suggestion and beside the file transfer capability, it seems that he did not complain.

Problem solved!

Windows 7 64bit update problem

windows 7

Its happen now and then, Windows will screw up their Windows Update and return with funny error code. This is a very unfortunate event where’s I need my system up and running with latest available update.

Failure to do so will expose machine to vulnerability or maybe features that might useful for daily work.

I bumped one of those error as below.

failed windows update

Some updates were not installed

Spending few minutes on google.com and found out that Windows Support page suggesting to download a tool named “Windows Update Troubleshooter“.

Basically, this tool will fix Windows Update that giving error code 0x80073712, 0x800705B4, 0x80004005, 0x8024402F, 0x80070002, 0x80070643, 0x80070003, 0x8024200B, 0x80070422 and also 0x80070020.

But if you are lazy enough, just download the tool from this link and run it right away.

http://aka.ms/diag_wu