Category Archives: Linux

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 … Continue reading

Posted in Linux, Uncategorized | 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. … Continue reading

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 … Continue reading

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 … Continue reading

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

Install docker on multiple Ubuntu Xenial hosts with Ansible

Ansible is an amazing piece of configuration management software. Among its amazing features is that it’s totally agentless and the only 2 packages that it needs on any host are python and an SSH server. Today we will create a … Continue reading

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

How to clear your bash history

For old commands, just edit .bash_history and delete whatever you want from inside. For commands in the current session, just run this command before you exit: unset HISTFILE The $HISTFILE environment variable is the one which holds your commands and … Continue reading

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

Fix Slow SFTP/SCP File Upload Rate and Stalling caused by TCP SACK

In brief, sometimes a conflict occurs between some firewalls and the TCP SACK. In my case, the upload was severely affected and reached upload speeds of a few kilobytes over a LAN! The following command disables TCP SACK and fixes … Continue reading

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