Author: admin

Check if user account is locked in Linux

If you ever needed to know if an account is locked in CentOS Linux, there are a few commands to find those answers. Lock a password using passwd. Additional confirmation that the password is locked.  The double !! indicates that the password is locked.  Note that this user does not have a password. Unlock the password.  Note that the password did...Read More »

A quick way to install the ELK stack

By combining the massively popular Elasticsearch, Logstash, and Kibana (what was the ELK Stack is now the Elastic Stack), Elastic has created an end-to-end stack that delivers actionable insights in real time from almost any type of structured and unstructured data source. There are many resources that offer installation procedures from simple to complex configurations.  This is my take on a simple installation...Read More »

Create a large file in Linux for testing

There are many ways to go about this.  A common favorite is the use of the dd command. This simple two letter command requires so many parameters to accomplish the simple goal of generating a file of a specific size. There is another way, and it's easier to remember too. Create a 100MB file using dd will look something like...Read More »

Reduce the number of commands with sed

Suppose there is a situation that a server has multiple files that are nearly identical and you want to remove content from them.  In this example suppose that server has multiple NIC cards.  There is content that needs to be deleted. The situation, you have five NIC cards.  Each ifcfg-ethx config file contains the values for NM_CONTROLLED, HWADDR, GATEWAY, and...Read More »

Remove the ^M from config files

Working in both Windows and Linux environments can from time to time create undesirable effects when modifying Linux configuration files on Windows boxes. After the edits and copying the file to the Linux box, a quick check of the file using the cat revealed nothing out of the ordinary.  However, the vim revealed the hidden ^M. I'm still not entirely...Read More »

Foxit Reader: Invert All Colors of Text

Foxit Reader is a fantastic alternative to Adobe Reader.  It is straightforward, not bloated, and offers functionality that I find useful.  Having used it as a replacement for several years from time to time there is something worth customizing.  The point of this article is one of those customizations, invert the text and background from black text and white background...Read More »

audit2allow error and explanation.

While troubleshooting some SELinux enforcement related issues using audit2allow, an ERROR message presented itself. After some research, a logical explanation was presented. The following error is an implication that there were no avc denials in the /var/log/uadit/audit.log and that the generated module was empty. That response was satisfactory and also correct for this situation. However, when running an all inclusive...Read More »

Add a new hard disk without rebooting in Linux

Having added a virtual hard drive to a virtual machine, the fdisk -cul command doesn't reveal any new drives.  There are a few ways to get Linux to recognize this new drive without having to reboot the computer. A tried and true method that I have used on many occasions is this approach.  The problem with this approach is that...Read More »