Solved
Create new directory /docroot. SELinux context to public_content_t and survives
relabel Correct Ans-mkdir /docroot
semanage fcontext -a -t public_content_t '/docroot(/.*)?'
restorecon -RvF /docroot
http://serverx.example.com/logfile contains logs for recent project. Download file, extract all
lines ending in ERROR and FAIL to /home/student/errors.txt Correct Ans-wget
http://serverx.example.com/logfile
grep -e 'ERROR$' -e 'FAIL$' logfile >/home/student/errors.txt
Your system should have a new dir used to store temp files named /run/veryveryvolatile.
Whenever system-tmpfiles --clean is run, any file older than 5 seconds should be deleted.
Permission:1777, owner root:root Correct Ans-man tmpfiles.d
echo 'd /run/veryveryvolatile 1777 root root 5s' >/etc/tmpfiles.d/veryveryvolatile.conf
system-tmpfiles --create
Create 30 files named system_changes_machineY-month_Z.txt y=machine number
z=month Correct Ans-touch ~student/system_changes_machine{1..10}-
month_{jan,feb,mar}.txt
mkdir /home/student/syschanges{jan,feb,mar}
mv ~student/system_changes-machine*jan.txt /home/student/syschanges/jan
, Remove all files related to machine 9 and 10 Correct Ans-rm -f
/home/student/syschanges/*/system_changes-machine{9,10}*.txt
Change default system settings for newly created users Correct Ans-/etc/login.defs
Find date 60 days from now Correct Ans-date -d "+60 days"
Permission /directory GID, owner/group have rwx, others have read Correct Ans-chmod 2774
/directory
find highest cpu process / terminate Correct Ans-top
pkill process
configure SSH service, User student log in with ssh public key to student account on desktop.
disable SSH for root user and password-based SSH authentication on server Correct Ans-ssh-
keygen
ssh-copy-id desktop
/etc/ssh/sshd_config
PermitRoot no
PasswordAuthentication no
restart ssh