Category Archives: Linux

A nice way to show progress when copying files

The cp command is not really good with that, there are some ways to do it, but unnecessarily complicated. The best option is to use rsync instead: rsync –progress source destination It will show you something like this: 3885367296 0% … Continue reading

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

Force PKI and Password authentication simultaneously on Ubuntu

I use AD authentication in my environment (for password-based authentication) Current Scenario A valid AD user logs in to the Ubuntu Linux server via SSH That user adds his public key to ~/.ssh/authorized_keys for passwordless login I disable/lock/delete the AD … Continue reading

Posted in Linux, Ubuntu, Uncategorized | 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 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