最新的RedHat Red Hat Certified System Administrator - RHCSA - EX200免費考試真題
Configure Network Settings
Configure node1 with the following network settings:
Hostname: node1.domain250.example.com
IP address: 172.25.250.100
Subnet mask: 255.255.255.0
Gateway: 172.25.250.254
Configure node1 with the following network settings:
Hostname: node1.domain250.example.com
IP address: 172.25.250.100
Subnet mask: 255.255.255.0
Gateway: 172.25.250.254
正確答案:
Solution:
# Connect to servera via console for IP modification, then check using the ip addr command.
# After confirming no issues, SSH to servera for hostname modification. This way, you can copy the hostname to avoid typos.
[root@clear ~] nmcli con show
[root@clear ~] nmcli con mod 'network configuration name' ipv4.method manual ipv4.addresses 172.25.0.25/24 ipv4.gateway 172.25.0.254 ipv4.dns 172.25.0.254
autoconnect yes
[root@clear ~] nmcli con up 'network configuration name'
[root@clear ~] ip a
[root@clear ~] ssh [email protected]
[root@clear ~] hostnamectl set-hostname red.lab0.example.com
# Verification
[root@node1 ~] ip a //Check if the IP is correct
[root@node1 ~] hostname //Check if the hostname is correct
# Connect to servera via console for IP modification, then check using the ip addr command.
# After confirming no issues, SSH to servera for hostname modification. This way, you can copy the hostname to avoid typos.
[root@clear ~] nmcli con show
[root@clear ~] nmcli con mod 'network configuration name' ipv4.method manual ipv4.addresses 172.25.0.25/24 ipv4.gateway 172.25.0.254 ipv4.dns 172.25.0.254
autoconnect yes
[root@clear ~] nmcli con up 'network configuration name'
[root@clear ~] ip a
[root@clear ~] ssh [email protected]
[root@clear ~] hostnamectl set-hostname red.lab0.example.com
# Verification
[root@node1 ~] ip a //Check if the IP is correct
[root@node1 ~] hostname //Check if the hostname is correct
Create User Accounts
Create the following user accounts, ensuring the checkboxes are enabled:
- Group named sysmgrs
- User natasha, belonging to the sysmgrs group as a secondary group
- User harry, belonging to the sysmgrs group as a secondary group
- User sarah, with no access to interactive shell on the system and not a member of sysmgrs
- Passwords for natasha, harry, and sarah should all be "flectrag".
Create the following user accounts, ensuring the checkboxes are enabled:
- Group named sysmgrs
- User natasha, belonging to the sysmgrs group as a secondary group
- User harry, belonging to the sysmgrs group as a secondary group
- User sarah, with no access to interactive shell on the system and not a member of sysmgrs
- Passwords for natasha, harry, and sarah should all be "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
Create a collaborative administrative directory /common/admin with group ownership admin and SGID permissions.
正確答案:
See the solution below in Explanation.
Explanation:
Solution:
groupadd admin
mkdir -p /common/admin
chgrp admin /common/admin
chmod 2770 /common/admin
Detailed Explanation:
* groupadd admin creates the group.
* chgrp admin assigns the group ownership.
* 2770 means:
* 2 = SGID
* 7 = owner rwx
* 7 = group rwx
* 0 = others no access
* This is a standard shared group-admin directory design.
Explanation:
Solution:
groupadd admin
mkdir -p /common/admin
chgrp admin /common/admin
chmod 2770 /common/admin
Detailed Explanation:
* groupadd admin creates the group.
* chgrp admin assigns the group ownership.
* 2770 means:
* 2 = SGID
* 7 = owner rwx
* 7 = group rwx
* 0 = others no access
* This is a standard shared group-admin directory design.
Install and configure tuned, determine the recommended profile, and activate it.
正確答案:
See the solution below in Explanation.
Explanation:
Solution:
dnf install -y tuned
systemctl enable --now tuned
tuned-adm recommend
tuned-adm profile virtual-guest
tuned-adm active
Detailed Explanation:
* The lab text uses yum, but on RHEL 10 dnf is the preferred package manager command. RHEL 10
documentation focuses on DNF behavior and changes.
* tuned-adm recommend shows the best-fit tuning profile.
* tuned-adm profile virtual-guest activates the profile.
* tuned-adm active confirms it.
Explanation:
Solution:
dnf install -y tuned
systemctl enable --now tuned
tuned-adm recommend
tuned-adm profile virtual-guest
tuned-adm active
Detailed Explanation:
* The lab text uses yum, but on RHEL 10 dnf is the preferred package manager command. RHEL 10
documentation focuses on DNF behavior and changes.
* tuned-adm recommend shows the best-fit tuning profile.
* tuned-adm profile virtual-guest activates the profile.
* tuned-adm active confirms it.
Set Root Password
Set the root password of node2 to "redhat." You need to gain system access to perform this operation.
Set the root password of node2 to "redhat." You need to gain system access to perform this operation.
正確答案:
Solution:
***Restart the node2 machine and wait for the screen shown in Exhibit 1.

Press "e" to enter the screen shown in Exhibit 2.

The original configuration is as shown in the image. Modify the original configuration to the part highlighted in red box, as shown in Exhibit 2. Then press "Ctrl+X" to
execute the following commands:
# chroot /sysroot
# echo redhat |passwd --stdin root
# touch /.autorelabel
# sync
# exit
# reboot
***Restart the node2 machine and wait for the screen shown in Exhibit 1.

Press "e" to enter the screen shown in Exhibit 2.

The original configuration is as shown in the image. Modify the original configuration to the part highlighted in red box, as shown in Exhibit 2. Then press "Ctrl+X" to
execute the following commands:
# chroot /sysroot
# echo redhat |passwd --stdin root
# touch /.autorelabel
# sync
# exit
# reboot
Deny cron access for user john.
正確答案:
See the solution below in Explanation.
Explanation:
Solution:
echo "john" > > /etc/cron.deny
Detailed Explanation:
* cron.deny blocks listed users from using cron.
* This is the simplest way to deny scheduled-job access for one user.
Explanation:
Solution:
echo "john" > > /etc/cron.deny
Detailed Explanation:
* cron.deny blocks listed users from using cron.
* This is the simplest way to deny scheduled-job access for one user.
Create a Container Image
As the user "wallah," download the Containerfile from http://classroom/Containerfile.
Do not modify the content of this file. Build an image named "pdf."
As the user "wallah," download the Containerfile from http://classroom/Containerfile.
Do not modify the content of this file. Build an image named "pdf."
正確答案:
Solution:
# Install container management tools
[root@node1 ~]# dnf -y install container-tools
# Execute operations as the user wallah
[root@node1 ~]# ssh wallah@localhost
# Download the container build file
[wallah@node1 ~]# wget http://classroom/Containerfile
# Log in to the image registry
[wallah@node1 ~]# podman login -u admin -p redhat321 registry.lab.example.com
# Build the container image using the Containerfile in the current directory, with the image name "pdf"
[wallah@node1 ~]# podman build -t pdf .
# View the images
[wallah@node1 ~]$ podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/pdf latest 1d6e7ea71460 31 seconds ago 300 MB
registry.lab.example.com/ubi9-beta/ubi latest 28b0a4b69d9b 2 years ago 229 MB
# Install container management tools
[root@node1 ~]# dnf -y install container-tools
# Execute operations as the user wallah
[root@node1 ~]# ssh wallah@localhost
# Download the container build file
[wallah@node1 ~]# wget http://classroom/Containerfile
# Log in to the image registry
[wallah@node1 ~]# podman login -u admin -p redhat321 registry.lab.example.com
# Build the container image using the Containerfile in the current directory, with the image name "pdf"
[wallah@node1 ~]# podman build -t pdf .
# View the images
[wallah@node1 ~]$ podman images
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost/pdf latest 1d6e7ea71460 31 seconds ago 300 MB
registry.lab.example.com/ubi9-beta/ubi latest 28b0a4b69d9b 2 years ago 229 MB