問題1
Set the default password policy
Set a password policy for newly created users so that, when a user is created, the password expires by default after 25 days.
Set the default password policy
Set a password policy for newly created users so that, when a user is created, the password expires by default after 25 days.
正確答案:
Solution:
[root@node1 ~]# vim /etc/login.defs +25
Type / and search for PASS_MAX_DAYS.
Modify it to:
PASS_MAX_DAYS 25
Verify:
[root@node1 ~]# useradd user1
[root@node1 ~]# chage -l user1
[root@node1 ~]# vim /etc/login.defs +25
Type / and search for PASS_MAX_DAYS.
Modify it to:
PASS_MAX_DAYS 25
Verify:
[root@node1 ~]# useradd user1
[root@node1 ~]# chage -l user1
問題2
Extend logical volume lvbackup by 500 MiB and grow the XFS filesystem online.
Extend logical volume lvbackup by 500 MiB and grow the XFS filesystem online.
正確答案:
See the solution below in Explanation.
Explanation:
Solution:
lvextend -L +500M /dev/vgdata/lvbackup
xfs_growfs /backup
df -h /backup
Detailed Explanation:
* lvextend increases the LV size.
* xfs_growfs expands the XFS filesystem while mounted.
* This is a classic RHCSA storage task and aligns with RHEL 10 LVM/XFS workflows. ( Red Hat
Documentation )
Explanation:
Solution:
lvextend -L +500M /dev/vgdata/lvbackup
xfs_growfs /backup
df -h /backup
Detailed Explanation:
* lvextend increases the LV size.
* xfs_growfs expands the XFS filesystem while mounted.
* This is a classic RHCSA storage task and aligns with RHEL 10 LVM/XFS workflows. ( Red Hat
Documentation )
問題3
Configure User Account
Configure the user account "manalo" with the user ID 3533. The password for this user should be "flectrag".
Configure User Account
Configure the user account "manalo" with the user ID 3533. The password for this user should be "flectrag".
正確答案:
Solution:
[root@node1 ~]# useradd -u 3533 manalo
[root@node1 ~]# echo flectrag | passwd --stdin manalo
[root@node1 ~]# useradd -u 3533 manalo
[root@node1 ~]# echo flectrag | passwd --stdin manalo
問題4
Create a VDO-backed logical volume with physical size 5 GB and logical size 50 GB, then format it with XFS.
Create a VDO-backed logical volume with physical size 5 GB and logical size 50 GB, then format it with XFS.
正確答案:
See the solution below in Explanation.
Explanation:
Solution:
dnf install -y vdo kmod-kvdo lvm2
pvcreate /dev/sdc
vgcreate vdo-volumegroup /dev/sdc
lvcreate --type vdo -n vdo-logicalvolume -L 5G -V 50G vdo-volumegroup/vdo-pool
mkfs.xfs /dev/vdo-volumegroup/vdo-logicalvolume
Detailed Explanation:
* VDO provides compression and deduplication.
* -L 5G sets the physical backing size.
* -V 50G sets the logical exposed size.
* This allows thin, optimized storage presentation.
* The exact commands are taken from the RHCSA dataset embedded in the uploaded lab HTML.
Explanation:
Solution:
dnf install -y vdo kmod-kvdo lvm2
pvcreate /dev/sdc
vgcreate vdo-volumegroup /dev/sdc
lvcreate --type vdo -n vdo-logicalvolume -L 5G -V 50G vdo-volumegroup/vdo-pool
mkfs.xfs /dev/vdo-volumegroup/vdo-logicalvolume
Detailed Explanation:
* VDO provides compression and deduplication.
* -L 5G sets the physical backing size.
* -V 50G sets the logical exposed size.
* This allows thin, optimized storage presentation.
* The exact commands are taken from the RHCSA dataset embedded in the uploaded lab HTML.
問題5
Create Archive
Create a tar archive named /root/backup.tar.bz2, which should contain the contents of /usr/local. The tar archive must be compressed using bzip2.
Create Archive
Create a tar archive named /root/backup.tar.bz2, which should contain the contents of /usr/local. The tar archive must be compressed using bzip2.
正確答案:
Solution:
[root@node1 ~]# yum -y install bzip2
[root@node1 ~]# tar -jcvPf /root/backup.tar.bz2 /usr/local
# Verification
[root@node1 ~]# file /root/backup.tar.bz
[root@node1 ~]# yum -y install bzip2
[root@node1 ~]# tar -jcvPf /root/backup.tar.bz2 /usr/local
# Verification
[root@node1 ~]# file /root/backup.tar.bz
問題6
Configure the host to boot into multi-user.target by default.
Configure the host to boot into multi-user.target by default.
正確答案:
See the solution below in Explanation.
Explanation:
Solution:
systemctl set-default multi-user.target
systemctl get-default
Detailed Explanation:
* set-default changes the boot target persistently.
* get-default verifies the result.
* multi-user.target is the standard non-graphical multi-user boot target.
Explanation:
Solution:
systemctl set-default multi-user.target
systemctl get-default
Detailed Explanation:
* set-default changes the boot target persistently.
* get-default verifies the result.
* multi-user.target is the standard non-graphical multi-user boot target.
問題7
Install dnf-automatic and enable automatic daily update checks.
Install dnf-automatic and enable automatic daily update checks.
正確答案:
See the solution below in Explanation.
Explanation:
Solution:
dnf install -y dnf-automatic
systemctl enable --now dnf-automatic.timer
systemctl list-timers --all | grep dnf
Detailed Explanation:
* dnf-automatic provides automated update checking and installation features.
* The timer unit schedules the checks.
* RHEL 10 DNF documentation specifically documents the dnf-automatic timer units. ( Red Hat Documentation )
Explanation:
Solution:
dnf install -y dnf-automatic
systemctl enable --now dnf-automatic.timer
systemctl list-timers --all | grep dnf
Detailed Explanation:
* dnf-automatic provides automated update checking and installation features.
* The timer unit schedules the checks.
* RHEL 10 DNF documentation specifically documents the dnf-automatic timer units. ( Red Hat Documentation )