What Common Utility Can Provide Encryption and Encryption for Files on Linux and How Would You Use It?

Problem scenario
You want to use the same command for encryption and compression. You want to avoid installing other packages. What should you do?

Solution
Use zip. The tar command by itself does NOT do compression (according to this external posting).

One advantage of zip is that it is usually pre-installed on most Linux servers. The user and group of the files thus compressed will be retained automatically.

 » Read more..

A List of I.T. Security Books

This is a list of I.T. Security books.

Applied Cryptography: Protocols, Algorithms and Source Code in C

Building Secure and Reliable Systems: SRE and Security Best Practices

Database Security

Defend I.T.: Security by Example

Hack I.T. – Security Through Penetration Testing

Hacking Exposed Web Applications, Third Edition

Hacking Web Apps: Detecting and Preventing Web Application Security Problems

Hadoop Security: Protecting Your Big Data Platform

Hands-On Security in DevOps: Ensure continuous security,

 » Read more..

How Do You use the Built-in Exception Handling Functionality of Python?

Problem scenario
You want to use the built-in exception handling in your Python program. You know some part or parts of the code may throw an error. How do you use the “except” keyword?

Solution
Use the “try” key word. Here is an example of a program that throws an error:

commandthatdoesnotexist
x = 1 + 1
print(x)

python3 progwitherror.py
Traceback (most recent call last):
File “progwitherror.py”,

 » Read more..

How Do You Troubleshoot HBase Commands That Hang?

Problem scenarios
One of the following apply to you.

Problem #1
You run an HBase command but it hangs indefinitely, and there is no error. What could be the problem?

Problem #2
You run an HBase command but you see this:
“ERROR: KeeperErrorCode = ConnectionLoss for /hbase/master”

Solution
Has Zookeeper been started?

 » Read more..

How Do You Get the Kibana Web UI to Work?

Problem scenario
You want to try out he Kibana web UI. You are using Linux. How do you get Kibana to work?

Solution
Prerequisites

Install the ElasticStack. If you need assistance, see “How Do You Install the Elastic Stack on Any Type of Linux?

Procedures

1. Install nginx. If you need assistance,

 » Read more..

How Do You Connect to an Aurora MySQL Database from a Linux Server with a MySQL Command?

Problem scenario
You are using an Aurora or RDS MySQL database. You have a Linux server that you want to run MySQL commands from (rather than install a SQL front-end). What should you do?

Solution

1. Install a MySQL client. If you need assistance with this, see this posting.

2. Make sure the Security Group governing the Aurora or RDS region allows for incoming connections from one of the following:
a) if you are using an EC-2 server in the same region,

 » Read more..

How Do You Install the Java Compiler on Debian or Ubuntu Linux?

Problem scenario
You are using Debian or Ubuntu Linux. You want to compile Java programs. What do you do?

Solution
Run these commands:
sudo apt-get -y update
sudo apt-get -y install default-jdk

 » Read more..

How Do You Change The “From” Address in an Email Sent via the Mail Command on Linux?

Problem scenario
You want Linux to send out an email with a alias email address in the “From” field. You are using the mail command on a Linux server. You want to customize the “from” address in the emails that you send. What do you do to choose your own “from” email address (e.g., jdoe@myowndomain.com) in the email that is sent out?

Solution

Prerequisites
You need to have mailx installed.

 » Read more..

How Do You Write a Python Program to Show the Status of the Servers in AWS?

Problem scenario
You want to list the statuses of each EC-2 instance in AWS using Python. How do you do this for a given region in AWS (e.g., us-west-1)?

Solution
Prerequisites
This assumes you have installed Boto3. If you do not know how, see this posting “How do you install Boto 3 on a RHEL server in AWS?

 » Read more..

How Do You Troubleshoot This Problem “[ERROR KubeletVersion]: couldn’t get kubelet version: executable file not found in $PATH”?

Problem scenario
You run this command: sudo kubeadm init

You get this problem: “[ERROR KubeletVersion]: couldn’t get kubelet version: executable file not found in $PATH”

What should you do?

Solution
Install kubelet. See this posting you need assistance. (If it is a Red Hat distribution of Linux, you can try How Do You Install kubectl, kubeadm,

 » Read more..