Line Continuation in PowerShell

Usually on bash command-line, the line break character is \. So when I first started to use PowerShell, the \ didn’t work for me. It turned out that the line-break or line continuation in PowerShell is the back tick: `. Here is an exmaple of PowerShell command to create a DNS delegation in one line: PS C:\ Add-DnsServerZoneDelegation -Name "example.net" -ChildZoneName "lab.example.net." -NameServer "idm.lab.example.net." -IPAddress 172.25.250.8 -PassThru -Verbose And we can break it to mutiple line as:...

December 23, 2020 · 1 min · 99 words · kenno

Auto Connect to Hidden Wifi With Networkmanger

If you’re here to find out how to setup network connection to hidden wifi access point, you might want to check this post: How to Connect to Hidden Wifi Using nmcli instead. This post documents how I fix an issue of wifi connection on a laptop running Gentoo to a hidden access point. The problem is that the wifi connection doesn’t automatically connect despite I’ve set the autoconnect.connection yes. ❯ nmcli con show CamBlue | grep -i autoconnect connection....

December 21, 2020 · 2 min · 270 words · kenno

Systemd List Failed Units and Services

This is a quick note to list failed services on systemd system. [root@zilla ~]# systemctl status ● zilla State: degraded Jobs: 0 queued Failed: 1 units Since: Fri 2020-09-04 02:20:47 AEST; 3 months 11 days ago CGroup: / ├─1 /usr/lib/systemd/systemd --system --deserialize 22 └─system.slice ├─httpd.service │ ├─21860 /usr/sbin/httpd -DFOREGROUND │ ├─21861 /usr/sbin/httpd -DFOREGROUND │ ├─21862 /usr/sbin/httpd -DFOREGROUND │ ├─21863 /usr/sbin/httpd -DFOREGROUND │ ├─21864 /usr/sbin/httpd -DFOREGROUND │ └─21865 /usr/sbin/httpd -DFOREGROUND ... [root@zilla ~]# systemctl list-units --failed UNIT LOAD ACTIVE SUB DESCRIPTION ● ipmi....

December 15, 2020 · 2 min · 233 words · kenno

oVirt - Removing a Storage Domain

This note is, again, for me to remind myself in case I couldn’t recall how to do this in the future. To remove a storage domain from the cluster, use the following steps: Click Storage -> Domains Click on the name of the storage domain to open the details view Click on the Data Center tab Click on Maintenance button, then click on OK The Detach button becomes active, click on it....

December 14, 2020 · 1 min · 81 words · kenno

Crontab Tip

On Fedora based system, whenever I need help writing a cron task and confused which field is minute, hour, day,..etc, I usually check the /etc/crontab file. ❯ cat /etc/crontab SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root # For details see man 4 crontabs # Example of job definition: # .---------------- minute (0 - 59) # | .------------- hour (0 - 23) # | | .---------- day of month (1 - 31) # | | | ....

December 13, 2020 · 1 min · 164 words · kenno

Passed Red Hat Virtualization Exam EX318

Another month, another Red Hat exam has been ticked off the list. This time, it’s about the Red Hat Virtualization, a technology based on oVirt. The code name of the exam is EX318, and as rumours has it, it’s one of the easiest Red Hat exams; I can’t agree more. The exam’s duration is 3 hours; it’s a hand-on closed book exams. The exam is based on Red Hat Virtualization version 4....

December 9, 2020 · 1 min · 170 words · kenno

Update Firmware on Netcom NF18ACV to NC2-R6B021

I like to keep the firmware running on all my devices up to date. New firmware is released to do to main things: fixing bugs and feature enhancing. Today, I just found out that the modem/router provided by my ISP is running and out of date firmware. The installed firmware is NF18ACV.NC.AU-R6B016.EN released on 2018/05/14. There have been a few new versions of firmware released between then and now, with the latest version being: NC2-R6B021 released on 2020/11/26....

December 5, 2020 · 3 min · 478 words · kenno

FreeIPA - Adding New User

I have a FreeIPA server with the following information: FreeIPA server: utility.lab.example.com FreeIPA realm: LAB.EXAMPLE.COM FreeIPA domain: lab.example.com I want to add 2 normal users: User Login: rhvadmin, First Name: RHV, Last Name: Admin, Password: CentOS123^ User Login: normaluser, First Name: Normal, Last Name: User, Password: CentOS123^ [root@utility ~]# ipa user-add rhvadmin --first RHV --last Admin --password Password: CentOS123^ Enter Password again to verify: CentOS123^ --------------------- Added user "rhvadmin" --------------------- User login: rhvadmin First name: RHV Last name: Admin Full name: RHV Admin Display name: RHV Admin Initials: RA Home directory: /home/rhvadmin GECOS: RHV Admin Login shell: /bin/sh Principal name: rhvadmin@LAB....

December 4, 2020 · 2 min · 241 words · kenno

Attaching a Disk to KVM Guest on Command Line

Again, just a quick note to remind myself how to attach a disk to a VM guest from the command line. The following steps is based on these assumptions: A spare disk: an LVM volume name db2_data on data volume group The name/domain of the VM is db2 List the name of the VM guest and available logical volume. [root@mathvm5 ~]# virsh list | grep db2 20 db2 running [root@mathvm5 ~]# lvs | grep db2 db2 vm -wi-ao---- 80....

December 2, 2020 · 1 min · 170 words · kenno

FreeIPA - Adding New DNS Record

I have a FreeIPA server with the following information. FreeIPA server: utility.lab.example.com FreeIPA realm: LAB.EXAMPLE.COM FreeIPA domain: lab.example.com. I want to insert a few DNS records: hosta.lab.example.com - 172.25.250.10 hostb.lab.example.com - 172.25.250.11 hostc.lab.example.com - 172.25.250.12 hostd.lab.example.com - 172.25.250.13 bastion.lab.example.com - 172.25.250.254 And I’d like to use the command line to do this. Acquire the admin’s Kerberos ticket. [root@utility ~]# kinit admin Password for admin@LAB.EXAMPLE.COM: List the DNS zones. [root@utility ~]# ipa dnszone-find Zone name: 250....

December 1, 2020 · 3 min · 487 words · kenno