RHEL 8, RH134, Chapter 1, Sections 5 and 6 - errors and clarifications
In RHEL 8, RH134, Chapter 1, Section 5 there is an error:
The error is the N (capital) does not find the next match, n (lowercase) does. N finds the previous match. The lab (Chapter 1, Section 6) gets this correct.
Speaking of the Chapter 1, Section 6 lab, there is this inconsistency:
It leads the reader to think that there is a postfix user and group as well as a postdrop user and group. This is not true; postdrop is not a user.
Therefore, the student will be searching for the UID and GID for postfix and just the GID for postdrop.
Then there is this:
There are a couple of things here -- omissions:
In order to make a regex to search a file, we must know the format of the file. This is not mentioned anywhere in the content. You cannot blindly create a regex and expect it to work. I believe that this is an important point to make to students when they're introduced to regex; you need to know the format of the data being searched. (This was also an issue in the RHEL 7, RH134, Chapter 2, Section 4 lab -- the one about Dr. Zingruber.)
The format of the /var/log/secure file, as it pertains to date and time, is Mmm dd hh:mm:ss -- this is important when trying to create a regex when the dd is a single digit. The lab's instructions were done on Mar 22, so this wasn't an issue. However, I re-wrote the lab today (Feb 6th). Because the format is dd, /var/log/secure has a 2 character field for the day. In this case, it writes it as: 2 (with a leading space instead of a leading 0). This leading space is significant when creating a regex. Leave it out and the grep will return nothing.
It's this, March 22nd and Feb. 6th written one on top of another:
Mar 22 Feb 6
The regexes would be (for example):
'^Mar 22 08:2.*GID' '^Feb 6 08:2.*GID'
Program Lead at Arizona's first Red Hat Academy, est. 2005 Estrella Mountain Community College