EX200日本語試験無料問題集「RedHat Red Hat Certified System Administrator - RHCSA (EX200日本語版) 認定」
/share/dev 上でユーザー john の ACL 権限を設定します。
正解:
See the solution below in Explanation.
Explanation:
Solution:
* Read-only access:
setfacl -m u:john:r-- /share/dev
* Read-write access:
setfacl -m u:john:rw- /share/dev
* Remove ACL permissions:
setfacl -m u:john:--- /share/dev
Detailed Explanation:
* setfacl -m modifies the ACL.
* u:john:r-- grants read only.
* u:john:rw- grants read and write.
* u:john:--- effectively removes access for that ACL entry.
* ACLs are used when standard owner/group/other permissions are not enough.
Explanation:
Solution:
* Read-only access:
setfacl -m u:john:r-- /share/dev
* Read-write access:
setfacl -m u:john:rw- /share/dev
* Remove ACL permissions:
setfacl -m u:john:--- /share/dev
Detailed Explanation:
* setfacl -m modifies the ACL.
* u:john:r-- grants read only.
* u:john:rw- grants read and write.
* u:john:--- effectively removes access for that ACL entry.
* ACLs are used when standard owner/group/other permissions are not enough.
ブートプロセスからルートパスワードをリセットします。
正解:
See the solution below in Explanation.
Explanation:
Solution:
* Reboot the system.
* Interrupt GRUB boot.
* Press e to edit the boot entry.
* On the linux line, append:
rd.break
* Boot with Ctrl+x.
* At the emergency shell:
mount -o remount,rw /sysroot
chroot /sysroot
passwd root
touch /.autorelabel
exit
exit
Detailed Explanation:
* rd.break drops you into an early emergency environment.
* /sysroot contains the real root filesystem.
* mount -o remount,rw /sysroot makes it writable.
* chroot /sysroot changes into the installed system.
* passwd root resets the password.
* touch /.autorelabel is critical so SELinux relabels files on next boot.
Explanation:
Solution:
* Reboot the system.
* Interrupt GRUB boot.
* Press e to edit the boot entry.
* On the linux line, append:
rd.break
* Boot with Ctrl+x.
* At the emergency shell:
mount -o remount,rw /sysroot
chroot /sysroot
passwd root
touch /.autorelabel
exit
exit
Detailed Explanation:
* rd.break drops you into an early emergency environment.
* /sysroot contains the real root filesystem.
* mount -o remount,rw /sysroot makes it writable.
* chroot /sysroot changes into the installed system.
* passwd root resets the password.
* touch /.autorelabel is critical so SELinux relabels files on next boot.
ops グループのメンバーに対して、/usr/bin/systemctl restart httpd のみを実行できるように、パスワードなしの sudo アクセスを設定します。
正解:
See the solution below in Explanation.
Explanation:
Solution:
groupadd ops
visudo -f /etc/sudoers.d/ops-restart-httpd
Add this line to the file:
%ops ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart httpd
Set correct permissions:
chmod 440 /etc/sudoers.d/ops-restart-httpd
visudo -cf /etc/sudoers.d/ops-restart-httpd
Detailed Explanation:
* Using /etc/sudoers.d/ is the standard safe approach.
* visudo validates syntax and helps prevent syntax errors.
* %ops applies the rule to the whole group.
* Restricting the exact command is better than granting broad sudo access. Red Hat's RHEL 10 security
hardening guide documents sudo configuration through sudoers. ( Red Hat Documentation )
Explanation:
Solution:
groupadd ops
visudo -f /etc/sudoers.d/ops-restart-httpd
Add this line to the file:
%ops ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart httpd
Set correct permissions:
chmod 440 /etc/sudoers.d/ops-restart-httpd
visudo -cf /etc/sudoers.d/ops-restart-httpd
Detailed Explanation:
* Using /etc/sudoers.d/ is the standard safe approach.
* visudo validates syntax and helps prevent syntax errors.
* %ops applies the rule to the whole group.
* Restricting the exact command is better than granting broad sudo access. Red Hat's RHEL 10 security
hardening guide documents sudo configuration through sudoers. ( Red Hat Documentation )
ユーザーアカウントを作成する
以下のユーザーアカウントを作成し、チェックボックスが有効になっていることを確認してください。
- sysmgrs という名前のグループ
- ユーザー natasha は、セカンダリ グループとして sysmgrs グループに属しています。
- ユーザー harry は、セカンダリ グループとして sysmgrs グループに属しています。
- ユーザー sarah は、システム上の対話型シェルへのアクセス権がなく、sysmgrs のメンバーでもありません。
ナターシャ、ハリー、サラのパスワードはすべて「flectrag」にしてください。
以下のユーザーアカウントを作成し、チェックボックスが有効になっていることを確認してください。
- sysmgrs という名前のグループ
- ユーザー natasha は、セカンダリ グループとして sysmgrs グループに属しています。
- ユーザー harry は、セカンダリ グループとして sysmgrs グループに属しています。
- ユーザー sarah は、システム上の対話型シェルへのアクセス権がなく、sysmgrs のメンバーでもありません。
ナターシャ、ハリー、サラのパスワードはすべて「flectrag」にしてください。
正解:
Solution:
[root@node1 ~]# groupadd sysmgrs
[root@node1 ~]# useradd -G sysmgrs natasha
[root@node1 ~]# useradd -G sysmgrs harry
[root@node1 ~]# useradd -s /bin/false sarah
[root@node1 ~]# echo tianyun |passwd --stdin natasha
[root@node1 ~]# echo tianyun |passwd --stdin harry
[root@node1 ~]# echo tianyun |passwd --stdin sarah
[root@node1 ~]# groupadd sysmgrs
[root@node1 ~]# useradd -G sysmgrs natasha
[root@node1 ~]# useradd -G sysmgrs harry
[root@node1 ~]# useradd -s /bin/false sarah
[root@node1 ~]# echo tianyun |passwd --stdin natasha
[root@node1 ~]# echo tianyun |passwd --stdin harry
[root@node1 ~]# echo tianyun |passwd --stdin sarah
サポートされているファイルシステムに対して、定期的なTRIM操作を有効にします。
正解:
See the solution below in Explanation.
Explanation:
Solution:
systemctl enable --now fstrim.timer
systemctl status fstrim.timer
Detailed Explanation:
* fstrim.timer schedules discard of unused blocks.
* This is useful on SSD-backed storage and thin-provisioned environments.
* RHEL 10 storage documentation explicitly documents enabling fstrim.timer. ( Red Hat Documentation )
Explanation:
Solution:
systemctl enable --now fstrim.timer
systemctl status fstrim.timer
Detailed Explanation:
* fstrim.timer schedules discard of unused blocks.
* This is useful on SSD-backed storage and thin-provisioned environments.
* RHEL 10 storage documentation explicitly documents enabling fstrim.timer. ( Red Hat Documentation )
コンテナをサービスとして構成する
ユーザー「wallah」として、コンテナ用のsystemdサービスを設定します。
- コンテナ名: ascii2pdf
- 以前作成したpdfという名前の画像を使用してください。
- サービス名: container-ascii2pdf
- システム再起動時に、手動操作なしでサービスを自動的に起動します。
- サービスが起動時にコンテナ内の /opt/file を /dir1 に、/opt/progress を /dir2 に自動的にマウントするように設定してください。
ユーザー「wallah」として、コンテナ用のsystemdサービスを設定します。
- コンテナ名: ascii2pdf
- 以前作成したpdfという名前の画像を使用してください。
- サービス名: container-ascii2pdf
- システム再起動時に、手動操作なしでサービスを自動的に起動します。
- サービスが起動時にコンテナ内の /opt/file を /dir1 に、/opt/progress を /dir2 に自動的にマウントするように設定してください。
正解:
Solution:
# Note: Perform the following operations by SSHing into localhost as the user "wallah"
[root@node1 ~]# ssh wallah@localhost
# Prepare the relevant mapping directories
[wallah@node1 ~]$ sudo mkdir /opt/{file,progress}
[wallah@node1 ~]$ sudo chown wallah:wallah /opt/{file,progress}
# Start the container and map directories
# :Z changes the SELinux security context of the directory to allow container access.
[wallah@node1 ~]$ podman run -d --name ascii2pdf -v /opt/file:/dir1:Z -v /opt/progress:/dir2:Z pdf
[wallah@node1 ~]$ podman ps -a
# Create systemd service file
[wallah@node1 ~]$ mkdir -p ~/.config/systemd/user
[wallah@node1 ~]$ cd ~/.config/systemd/user/
[wallah@node1 ~]$ podman generate systemd -n ascii2pdf -f --new
[wallah@node1 user]$ ll
total 4
-rw-r--r--. 1 wallah wallah 770 Dec 13 01:07 container-ascii2pdf.service
# Stop and remove the existing ascii2pdf container
[wallah@node1 ~]$ podman stop ascii2pdf
[wallah@node1 ~]$ podman rm ascii2pdf
[wallah@node1 ~]$ podman ps -a
# Enable and start the container-ascii2pdf service
[wallah@node1 ~]$ systemctl --user daemon-reload
[wallah@node1 ~]$ systemctl --user enable --now container-ascii2pdf
# Check container status
[wallah@node1 ~]$ systemctl --user status container-ascii2pdf
[wallah@node1 ~]$ podman ps
# On node1, switch to the root user to perform the following operations
# Ensure that the services for the wallah user start automatically at system boot
[root@node1 ~]# loginctl enable-linger
[root@node1 ~]# loginctl show-user wallah
# Check to ensure the container starts on boot (mandatory operation)
[root@node1 ~]# reboot
[root@node1 ~]# ssh wallah@node1
[wallah@node1 ~]# podman ps
# Note: Perform the following operations by SSHing into localhost as the user "wallah"
[root@node1 ~]# ssh wallah@localhost
# Prepare the relevant mapping directories
[wallah@node1 ~]$ sudo mkdir /opt/{file,progress}
[wallah@node1 ~]$ sudo chown wallah:wallah /opt/{file,progress}
# Start the container and map directories
# :Z changes the SELinux security context of the directory to allow container access.
[wallah@node1 ~]$ podman run -d --name ascii2pdf -v /opt/file:/dir1:Z -v /opt/progress:/dir2:Z pdf
[wallah@node1 ~]$ podman ps -a
# Create systemd service file
[wallah@node1 ~]$ mkdir -p ~/.config/systemd/user
[wallah@node1 ~]$ cd ~/.config/systemd/user/
[wallah@node1 ~]$ podman generate systemd -n ascii2pdf -f --new
[wallah@node1 user]$ ll
total 4
-rw-r--r--. 1 wallah wallah 770 Dec 13 01:07 container-ascii2pdf.service
# Stop and remove the existing ascii2pdf container
[wallah@node1 ~]$ podman stop ascii2pdf
[wallah@node1 ~]$ podman rm ascii2pdf
[wallah@node1 ~]$ podman ps -a
# Enable and start the container-ascii2pdf service
[wallah@node1 ~]$ systemctl --user daemon-reload
[wallah@node1 ~]$ systemctl --user enable --now container-ascii2pdf
# Check container status
[wallah@node1 ~]$ systemctl --user status container-ascii2pdf
[wallah@node1 ~]$ podman ps
# On node1, switch to the root user to perform the following operations
# Ensure that the services for the wallah user start automatically at system boot
[root@node1 ~]# loginctl enable-linger
[root@node1 ~]# loginctl show-user wallah
# Check to ensure the container starts on boot (mandatory operation)
[root@node1 ~]# reboot
[root@node1 ~]# ssh wallah@node1
[wallah@node1 ~]# podman ps
既存のNetworkManager接続上で、システムホスト名を設定し、静的IPアドレスを設定します。
正解:
See the solution below in Explanation.
Explanation:
Solution:
* Set the hostname:
hostnamectl set-hostname server1.example.com
* Configure the existing connection with a static IP:
nmcli connection modify ens160 ipv4.address 192.168.1.2/24 ipv4.gateway 192.168.1.1 ipv4.dns 1.1.1.1 ipv4.
method manual connection.autoconnect yes
* Bring the connection up:
nmcli connection up ens160
Detailed Explanation:
* hostnamectl is the correct modern command for changing the system hostname.
* nmcli is the correct tool for RHEL 10 network configuration because the old ifcfg style is removed in
RHEL 10, and NetworkManager keyfiles are the supported model.
* ipv4.method manual tells NetworkManager to use static addressing.
* connection.autoconnect yes ensures the profile activates automatically after reboot.
* nmcli connection up ens160 applies the changes immediately.
Explanation:
Solution:
* Set the hostname:
hostnamectl set-hostname server1.example.com
* Configure the existing connection with a static IP:
nmcli connection modify ens160 ipv4.address 192.168.1.2/24 ipv4.gateway 192.168.1.1 ipv4.dns 1.1.1.1 ipv4.
method manual connection.autoconnect yes
* Bring the connection up:
nmcli connection up ens160
Detailed Explanation:
* hostnamectl is the correct modern command for changing the system hostname.
* nmcli is the correct tool for RHEL 10 network configuration because the old ifcfg style is removed in
RHEL 10, and NetworkManager keyfiles are the supported model.
* ipv4.method manual tells NetworkManager to use static addressing.
* connection.autoconnect yes ensures the profile activates automatically after reboot.
* nmcli connection up ens160 applies the changes immediately.