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

where:

enum-users: returns all users

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

Sources:

  1. https://stackoverflow.com/questions/9081/grep-a-file-but-show-several-surrounding-lines
  2. https://github.com/BeyondTrust/pbis-open/issues/11
Advertisements
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:

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:

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.

Enjoy!

Sources:

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:

ssl_error

I could solve it (FINALLY)!!

All I did was the following:

  1. Open Regedit
  2. Navigate to
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\KeyExchangeAlgorithms\Diffie-Hellman]**
  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

Source: https://communities.vmware.com/thread/538636

 

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

Source: https://forums.fedoraforum.org/archive/index.php/t-139776.html

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

Slack Support Channel

Hellooo!

I’ve got some good news.

I’ve created a Slack Support Channel that complements this blog.

Join mytechnicalthoughts.slack.com through this link.

I would love to answer your OSS-related questions.

Of course anyone who would love to spread knowledge and help others are more than welcome to join!

Posted in 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

conjure-up

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

conjure-up kubernetes

That’s it, Enjoy!

Sources:

  1. https://conjure-up.io/
Posted in Linux, Uncategorized | Tagged , , , , , , , | Leave a comment

What to do if docker on Ubuntu doesn’t recognize addition of a user to its group when using PBIS with AD

You add a user to group docker so that you can run docker commands without having to be root or a sudoer.

On an Ubuntu 16.04 server which authenticates against AD using PBIS, I added users to group docker, but wasn’t getting recognized at all and had to use sudo, which defeats the purpose.

All I did was the following:

  1. Edit /etc/group
  2. go to the bottom of the file where you will find the docker group
  3. change the name of the AD group from lower case to upper case characters and save, e.g.:
    docker:x:999:hobba\socrat to docker:x:999:HOBBA\socrat
  4. Enjoy!
Posted in Linux, Uncategorized | Tagged , , , , , | Leave a comment