MyTechnicalThoughts on Slack!

Hello there! I’ve got some good news!

I’ve created a Slack Help Channel that complements this blog, you can get help here.

Posted in Help | Tagged , , , , , | Leave a comment

Force expiry of a Linux Account

Just locking the linux account isn’t enough, since the user can use other methods to login, such as PKI.

The best solution would be to force expire the account:

sudo chage -M 0 username
Posted in Linux | Tagged , , , | Leave a comment

Search for an AD user using PBIS and userid

Let’s say I have a user id in Linux 234234234 and I need to check which user that represents in Active Directory.

All I need is:

pbis enum-users | grep -B 5 -A 5 234234234


enum-users: returns all users

grep -B and -A: returns 5 lines before and after the found search string


Posted in Linux, Uncategorized | Tagged , , | Leave a comment

Create random passwords from command line in Ubuntu

There are two handy tools that generate random passwords from the command line in Ubuntu (and other distros of course). It’s more secure to use passwords from these tools instead of online password generators.

First of which is apg and the second – which is my favorite – is pwgen

Sample output of apg:


Please enter some random data (only first 16 are significant)
(eg. your old password):>
Vefic7OjTyct (Vef-ic-SEVEN-Oj-Tyct)
BudDelorkal7 (Bud-Del-ork-al-SEVEN)
pedAfBuir1 (ped-Af-Bu-ir-ONE)
AwdaftImoat9 (Awd-aft-Im-oat-NINE)
EkWedivJaw1 (Ek-Wed-iv-Jaw-ONE)
nojIvetad0 (noj-Iv-et-ad-ZERO)

Sample output from pwgen:

Peej5Roo ahW7zahw pheiz6Ea aeP4jogh eaX7ILoh we6Oohu5 tek3Neik KaHae7wo
Shu4neil Iol8aeXo ahwu4Aef ca9asiRo AhNg6Chi iez6Eish Un4juoha neeY5phu
jut2CohY aed4eeNg eiC0joh8 AhvaiD8v beWae2im Du6tahV8 baes0Qua Queece5A
Pegh5the zaeth6Ie ieshieC7 Tu3EeJ2e ochai0De paP6Ahxe Ahta9mai Paiv7eez
phae7Ohb xohJ6voo IuhaeM2e quaiG8th Eiw3hiev kao4Eezi cie8haD7 Oyui0Iev
raey9Gie gi1loChe IPhe7bai Uju4ap4n ohsiez0S aiQu6yae zah2ooCh GeiC6ief
ieShioZ7 ee1Caung aDai4eko Aixion0J Aeca1woo Aik4rie1 eix6ahNg Uah4oovi
Ahpu6aet Nai0zeem lahSiet2 Omao8ohg Ahde3eis beesh9aG aeth8Ooh eBaen6ah
Yai6eiph Tho2phaa shoh0aeR FoeB2xuZ vaiju6Ao aomien3J aiFai2qu iesh1aeB
iz2quaiK kuhahV8o Visap6uy hai2ohHo quie5Dah Ook0yair Giesh5fa Po4pho2z
qui3eaDe ehaiZu1A Quishah3 ohhie5iK in2OoLah baTah6li Zaiwae7r aeph3Xoh
TeesooT9 aiLuph1A leufoh9A eeR2toos ugohx4Th Eekiig2h siemu4Oo GeegaTh0
Cahieg9h xapahDo4 Tii5shiR Otaefae2 eel1Aek2 chahGoo2 Ginoop6j zeiS2ohc
Uchee0po Heeh7ieW NiDa8fo9 johgi5Oo sho1gu2A pej6cooW EetuJ6Ee ahTo4hav
Geede9gi Sae9liet bo5Noo7r Eigai6uw aip3Paey Omoopho0 uFee9Aic eel3OY5S
Hoo9dah0 Ahyoh4th ohg9ai0E Oowae6ru Gah3meeX wi4theiF phuo0ieV oaSh4eim
Iexeo5oa chus5Tei eiQuoh7w oov2CeeC shie2Iap aehee7Oh IeKoh6ee Yech5Bie
YoiGhoh2 Iekiev4e Eeph0boh aiNg4ais cahS9ohd ra2iPah5 chiep0Ah ieTha1Me
daecoY5a ooFoh8ee iivo6oaP UvuSh8Oo US2da9Ie iG2exiru laW6eith biu0Weim
IN6uquei ahgeic4B aif3Cili Iez1Yohk Raeg7aiz oo2Eixoo jel2ao1A bo0Shae5

You could of course generate much stronger passwords using additional parameters, just use man apg or man pwgen.



Posted in Ubuntu, Uncategorized | Tagged , , , , | Leave a comment

How to solve vSphere Windows Client 5.1 SSL Error

In this article, I am using Windows 7 64-bit with vSphere Client 5.1.0

This issue has been bugging me for quite some time. Whenever I search for any VM inside vSphere Windows Client, I keep receiving this message, and I have to go manually to the VM I need, which is a serious pain when you have hundreds or thousands of VMs:


I could solve it (FINALLY)!!

All I did was the following:

  1. Open Regedit
  2. Navigate to
  3. Add a new DWORD (32-bit) with name ClientMinKeyBitLength and value 00000200
  4. That’s it, Enjoy!!

**If it doesn’t exist, just right click KeyExchangeAlgorithms and click New->DWORD (32-bit) Value



Posted in Uncategorized, vSphere | Tagged , , , , | Leave a comment

Use fsck with LVM

A VM’s filesystem (which was using LVM) was corrupt and it couldn’t boot.

All I did was force boot from systemrescuecd and ran the following command:

fsck.ext4 /dev/vgname/lvname

Note: Switch ext4 to any other type of filesystem you have, e.g. ext3


Posted in Linux, Uncategorized | Tagged , , , | Leave a comment

Build large environments in no time on Ubuntu using conjure-up

Whether you need to build a Kubernets cluster, an openstack instance, a hadoop cluster…etc, Canonical has developed a tool called conjure-up. This tool can build these whole environments for the purpose of development and testing, or small environments in a few minutes.

To install it on Ubuntu Xenial:

sudo snap install conjure-up --classic

To start the interactive deployment CLI, just run


or specify the exact software that you need to deploy (called spells in its terminology):

conjure-up kubernetes

That’s it, Enjoy!


Posted in Linux, Uncategorized | Tagged , , , , , , , | Leave a comment