Is It a Best/Recommended Practice to Not Use “Make Visible” the Password when Entering It?

Problem scenario
You think that the users should not click the “make visible” option when entering a password. As an I.T. professional, you are not sure if this should be used or not. You read and think that it should not be used. Is it recommended that you have a practice of not letting the users make the password visible?

Solution
It is not clear.

…

Is It a Recommended/Best Practice to Use Email as a Component in Two Factor Authentication?

Problem scenario
You want to implement a secure protocol for authentication. You want there to be a password and a second factor of authentication. Can an email (being in possession of an inbox) be a factor in MFA?

Answer
Maybe.

No, according to NIST: https://pages.nist.gov/800-63-FAQ/
But many companies do use email as a factor in multi-factor authentication.

…

How Do You Troubleshoot a quotacheck Command Failure with “Cannot guess format from filename…Please specify format on commandline”?

One of the following apply to your situation:

Problem scenario #1
You are running a quotacheck command. You get this error:

quotacheck: Cannot guess format from filename on /dev/mapper/ubuntu–vg-ubuntu–lv. Please specify format on commandline.
quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.

What should you do?

or
Problem scenario #2
You try to run an edquota command,

…

How Do You Get quota Commands to Return Current Data?

Problem scenario
You run a quota -au or quota -ag command to see the latest/up-to-date statistics. You see the number of blocks or inodes is discrepant with what is currently on your system for the user or group. You tried rebooting, but that did not help. How do you get the use blocks and used inodes to be updated with a quota command?

Possible Solution #1
Run a command like this:

sudo quotacheck -vug

If you think something is still misleading/inaccurate,

…

How Do You Set a Date-Time Value with a Default Year in Python?

Problem scenario
You are printing out some dates with a Python program. You are using the datetime module and the strptime method. The year is always defaulting to 1900 because the log entries have no year designated in them. How do you seed the dates with a specific year of your choice?

Solution
Here is an example of how to seed the dates with the year 2021 (but it assumes you have a file name auth.log with dates without years in it):

import datetime
from datetime import datetime, …

Is It a Best/Recommended Practice to Rotate Passwords?

Problem scenario
You know hackers and malicious social engineers love passwords. You are considering enforcing password rotations temporally (as a systems administrator, security consultant, or I.T. manager). You want planned periodic password changes to happen in a mandatory way. In theory if a password was once lost, changing it mitigates the damage. This is intuitive and consistent with a variety of sources. Many OSes and LDAPs facilitate built-in password expirations based on time intervals.

…

How Do You Get a Lost Clothes Item in a GE Washer?

Problem scenario
You have a stackable GE washer. The cylindrical basin of the washing machine allows for clothes items to disappear into the cubic chasis/frame of the washing machine. You are missing a washcloth, a sock or a glove. (You may or may not have seen it fall over the cylindrical tub basin into the square body of the washer when taking out the clean clothes. Sometimes an item just spins into the crevice between the agitator basin and the external body of the washer.) You want to get this small clothes item from your washing machine.

…

How Do You Correct a /etc/fstab File That is Read Only?

Problem scenario
You boot up and log in. You cannot write to /tmp/.

What should you do?

Solution
First, mentally identify the file system in the /etc/fstab file (e.g., /dev/desk/by-id/dm-uuid-LVM-abcd1234).

Here is an example of an /etc/fstab file to determine what the file system string you need is:

/dev/disk/by-id/dm-uuid-LVM-abcd1234 / ext4 defaults,quota,grpquota 0 0
# /boot was on /dev/sda2 during curtin installation
/dev/sdc /var ext4 defaults 1 2
/dev/sda /opt ext4 defaults 0 0
/dev/disk/by-uuid/987654321 /boot ext4 defaults 0 0

Procedure
Run a command like this (but replace /dev/desk/by-id/dm-uuid-LVM-abcd1234 with the file system you need):

sudo mount -o remount,rw /dev/desk/by-id/dm-uuid-LVM-abcd1234

Now you should be able to modify the /etc/fstab file.

…

How Do You Troubleshoot the Python Problem “ValueError: time data … does not match %m”?

Problem scenario
You are trying to parse a log file with Python. The date entries use abbreviated spellings of months — not integer month values. You get an error like this:

“ValueError: time data ‘Jul 15 06:10:32’ does not match format ‘%m %d %H:%M:%S'”

What should you do?

Solution
Replace the “%m” with “%b”.

import datetime
log_reader = open(‘auth.log’, …