RHCSA Exam Practice Questions with 100%
Correct Answers |Verified Latest Update
To add an additional connection profile called 'default', which uses DHCP and connect
automatically using your first onboard ethernet device, you would run: - ✔✔nmcli con add
con-name 'default' type ethernet ifname eno1
nmcli con add' adds a connection; to do so requires that you specific AT LEAST the new
connection profile name ('con-name'), type ('type') and which network interface it's attached to
('ifname').
make journalctl persistent across reboots - ✔✔make a directory to store the logs
mkdir /var/
chmod 2775 /var/log/journal
# change the group owner to systemd-journal
chgrp systemd-journal /var/log/journal
# releoad journalctl
killall -USR1 systemd-journald
# send all logs to the new dir since X reboot
journalctl -b-X
It's the last day of November, and you've been asked for a list of users who've connected to
your server via ssh in the last month. How could you gather this information? - ✔✔journalctl
-u sshd.service --since -30d
OR
last
,OR
grep 'sshd' /var/log/secure* | grep 'opened'
How are the log files created by 'rsyslog' prevented from growing until they use up all your
storage? - ✔✔They are rotated by 'logrotate', which is scheduled to run as a daily cron job.
The 'cronie' scheduler runs logrotate daily, as per '/etc/cron.daily/logrotate'. For most logs
logrotate performs weekly rotation and keeps 4 weeks of backlogs. This can be configured in
/etc/logrotate.conf
Imagine you're logging into a customer's server to resolve an issue they've logged via your
ticketing system. How would you ensure your name and the ticket number appear alongside
the log entry showing your connection -- so they know who and why the connection was made
-- should they ever perform an audit? - ✔✔logger -p authpriv.info 'Acloud Guru: Tkt #10869'
NEVER write directly to the log files. At best, your entry will be overwritten; at worst, the file
could become corrupted. Always use 'logger'. Incoming 'ssh' connections are logged under the
'authpriv' facility; therefore, to ensure your entry appears beneath the entry for your
connection, you must log to that facility with '-p authpriv.info'. Otherwise, the entry will go into
'/var/log/messages'.
How is the systemd journal prevented from filling up your storage? - ✔✔systemd-journald
handles rotation internally and can be configured using 'journalctl'.
Although it is true that by default systemd-journald only retains logs for the current boot
instance, Linux boxes can run for years between reboots, so a substantial volume of log entries
could accumulate. To view rotation settings and limits, run 'journalctl | head'.
tool used to view/manage time-related config - ✔✔timedatectl
, useful subcommands:
list-timezones # for a list of available time zones
set-timezone # to set systemc time zone
set-time # to set system time
set-ntp # to control time sync via NTP
tool used to view/set on board hardware clock - ✔✔hwclock
default NTP service - ✔✔chronyd
/etc/chrony.conf is the config file
can serve time to the network
functions as a client to sync system time
tool used to configure the NTP service on modern systems - ✔✔chronyc # used to
query/control chronyd
useful subcommand
sources # to view sources and sync status
recurring task scheduler - ✔✔cronie
master file for the task scheduler - ✔✔/etc/crontab # rarely edited but contains useful
guidelines
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Examsplug. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $12.99. You're not tied to anything after your purchase.