cancel
Showing results for 
Search instead for 
Did you mean: 
SubuRama
Flight Engineer
Flight Engineer
  • 612 Views

Another grading issue .. in aide lab ..

In Section 7.5 for the lab on AIDE, the very first test in the grading script /usr/local/lib/lab-aide-review has the following on line 89:

  if sshpass -p "redhat" ...    && sshpass -p "redhat" ${ssh} ${target} 'grep '"'"'^/etc[^/].*CONTENT_EX.*$'"'"' /etc/aide.conf

 

This grep expression will not match something like

 /etc/  CONTENT_EX

in /etc/aide.conf even though that entry in /etc/aide.conf works fine with aide

However, if I have (without the ending /)

/etc CONTENT_EX

the grep expression in the grading script succeeds.

What is the difference between /etc/ and /etc in the selection line?

man aide.conf doesn't tell me.

Thoughts?

Thank you

Subu

Subu

 

2 Replies
carlos_arias
Moderator
Moderator
  • 559 Views

Hi Subu, for aide configuration there is no significative difference between /etc and /etc/, and you can use them indistinctively. So don't consider the grading script as a failure if the monitoring is actually working.

Sometimes it's not possible to make scripts that consider all possible solutions. Not in this case, as the regexp could be extended to consider the final slash.

Trust your own skills, remember that during the exam you won't be provided with any grading scripts as help, and you will need to manually check that your solution is working and persistent across reboots.

 

Best regards,

Carlos

RHCA - Level III
Free software for free people
MKLegion
Mission Specialist
Mission Specialist
  • 480 Views

There is a difference if you are using directories with / or not, for an example:

/etc, then the regex will also recursively match all files and directories in the /etc directory.

With a forward slash (/) character like /etc/, the children of subdirectories will not be recursively matched. 

Best regards

0 Kudos
Join the discussion
You must log in to join this conversation.