Is It a Best/Recommended Practice to use PAM (Pluggable Authentication Module) in SSH?

Problem scenario
You use Linux and want to configure SSH. Should PAM be enabled in your /etc/sshd/confifig file?

Answer
Maybe. This heavily-voted up answer on StackExchange says to not use PAM.
This external page says that it is turned off by default.
This source says PAM is (or was because it is from 2011) not desirable.

How Do You Search the Logs of a Website that Is Not Functioning Properly?

Problem scenario
You have a website that is not working. You tried using Fiddler on the front-end. You want to examine the logs on the backend to find the problem. What should you do?

Possible Solution #1
Use a case insensitive grep for “error” or “violation”. Search also for patterns such as “40” and “50” in separate searches.

To get help finding the logs,

Do Either Kernel Space or User Space Play a Role in Operating Systems Networking?

Question
Networking is usually very important for a Linux/Unix OS. For typical applications that use networking, do kernel space or user space play a role?

Answer
Yes, both play a role.

User space facilitates the application layer of the TCP/IP protocol suite; kernel space facilitates the network and transport layers of the TCP/IP protocol suite (this was taken from page 1181 of The Linux Programming Interface,

Without Adding New Storage Capacity, How Do You Create a Partition?

Problem scenario
You have no new physical disks, but you want to partition an existing Linux system. What do you do to benefit from logical partitions on an existing Linux machine?

Solution (with important warning)

WARNING: THIS CAN MAKE YOUR LINUX MACHINE UNBOOTABLE.

DON’T DO IT UNLESS YOU KNOW WHAT YOU ARE DOING.
(The solution below was influenced by this external site.)

sudo fdisk -l

You should see something like this:
Device Start End Sectors Size Type
/dev/sdc4 2048 4095 2048 1M BIOS boot
/dev/sdc5 4096 2101247 2097152 1G Linux filesystem
/dev/sdc6 2101248 20969471 18868224 9G Linux filesystem

Run this:
sudo fdisk /dev/sdc6

Respond to the prompts: n for new.

How Do You Troubleshoot the OpenVPN Issue “insufficient key material or header text not found in file”?

Problem scenario
You get an error message when you run openvpn. You are trying to start the client service. You get “insufficient key material or header text not found in file”. What should you do?

Possible Solution #1
Backup your client.conf file.

Find your tls-crypt.key file. If you have none, run this:

openvpn –genkey –secret /etc/openvpn/tls-crypt.key

Copy every line in the tls-crypt.key file and paste it into a particular location of the client.conf file.

What Is the Difference between the wheel Group and the admin Group?

Problem scenario
You have seen Linux distributions use wheel whereas some use admin. What is the difference?

Solution
For most purposes, there is no difference.

Many RedHat distributions use wheel (per page 429 of Fedora and RedHat by Sobell).

Ubuntu uses wheel (per this posting).

To add a Linux user to a sudoers file,

How Do You Get Sunglasses That Do Not Fog Up?

Problem scenario
You have tried different anti-fog sprays on sunglasses. Your sunglasses still fog up when you exercise. What should you do?

Solution
Find sunglasses that have a form factor that allows for more air. They do not wrap completely around your eyes, but they will provide protection as sunglasses. With more air to get around the inside of the lenses, they will not fog up as much.

What Is the Default Format for cryptsetup?

Question
You ran some cryptsetup commannds. You passed no –type flag. Was the format luks1 or luks2 or something else?

Answer
luks2.

…more recent Ubuntu releases default to version 2 (“luks2”).

https://help.ubuntu.com/community/Full_Disk_Encryption_Howto_2019

As of 2022, you may want to use luks2 when you can — but do not assume you can. That is, sometimes you still need to use luks1.

How Do You Deal with Hamstring Pain?

Problem scenario
You have been sitting for a long time (either driving or using a computer). Now a hamstring is hurting whenever you sit. What should you do?

Possible Solution #1
Talk to a medical doctor about your condition.

Possible Solution #2
You may want an ottoman to stretch your hamstrings while sitting. Some are hollow that can act as a box to not use too much real estate under your desk or in your living room.