Restrict the root access to SSH service via PAM - [HELP]

Hello, can somebody please explain the solution in the 8th task? I don’t understand the process in general. Thank you.

Link: https://kodekloud.com/topic/lab-manage-access-to-the-root-account-and-configure-pam-2/

Hello @meletiop,
pam_listfile is a PAM module which provides a way to deny or allow services based on an arbitrary file.
item=[tty|user|rhost|ruser|group|shell]

What is listed in the file and should be checked for.

onerr=[succeed|fail]

What to do if something weird happens like being unable to open the file.

sense=[allow|deny]

Action to take if found in file, if the item is NOT found in the file, then the opposite action is requested.

file= /path/filename

File containing one item per line. The file needs to be a plain file and not world writable.

Hello,
Thank you for the explanation.