RedHat Red Hat Certified System Administrator - RHCSA (EX200 Korean Version) - EX200 Korean Exam Practice Test

매일 오전 2시에 backup-now.service를 실행하는 systemd 타이머를 생성하세요.
Correct Answer:
See the solution below in Explanation.
Explanation:
Solution:
Create timer unit:
cat > /etc/systemd/system/backup-now.timer < < 'EOF'
[Unit]
Description=Daily backup timer
[Timer]
OnCalendar=*-*-* 02:00:00
Persistent=true
[Install]
WantedBy=timers.target
EOF
Enable it:
systemctl daemon-reload
systemctl enable --now backup-now.timer
systemctl list-timers --all | grep backup-now
Detailed Explanation:
* OnCalendar=*-*-* 02:00:00 means daily at 02:00.
* Persistent=true runs missed jobs after boot if the system was off.
* timers.target is the normal target for timer units.
* RHEL 10 documentation includes systemd timer units as a standard scheduling mechanism. ( Red Hat
Documentation )
애플리케이션을 구성하세요
* rhcsa라는 이름의 애플리케이션을 구성합니다.
* 이 애플리케이션을 나타샤 사용자로 실행하면 "This is a rhcsa"라는 문자열이 표시되어야 합니다.
Correct Answer:
Explanation/Reference:
Solution:
su - natasha
vim .bashrc
alias rhcsa='ehco This is a rhcsa'
source .bashrc
rhcsa
'해리'라는 사용자를 생성하고, 비밀번호 만료일을 30일로 설정하며, 첫 로그인 시 비밀번호를 강제로 변경하도록 합니다.
Correct Answer:
See the solution below in Explanation.
Explanation:
Solution:
useradd harry
passwd harry
chage -M 30 -d 0 harry
chage -l harry
Detailed Explanation:
* useradd harry creates the local user.
* passwd harry sets the initial password.
* chage -M 30 sets the maximum password age to 30 days.
* chage -d 0 forces the user to change the password at next login.
* chage -l harry verifies the policy.
ops라는 이름의 그룹을 생성하고, sara라는 사용자를 생성한 다음, sara를 ops라는 보조 그룹에 추가합니다.
Correct Answer:
See the solution below in Explanation.
Explanation:
Solution:
groupadd ops
useradd sara
usermod -aG ops sara
id sara
Detailed Explanation:
* groupadd creates the group.
* useradd creates the user.
* usermod -aG adds the user to a supplementary group without removing existing memberships.
* id sara confirms the result.
논리 볼륨 크기 조정
논리 볼륨 "vo"와 해당 파일 시스템의 크기를 300MiB로 조정하되, 파일 시스템 내용은 변경하지 않도록 하십시오.
참고: 파티션 크기는 요청된 크기와 정확히 일치하는 경우가 드물기 때문에 290MiB에서 310MiB 사이의 범위는 허용됩니다.
ext4 파일 시스템의 경우 resize2fs를 사용하면 즉시 적용되고, xfs 파일 시스템의 경우 xfs_growfs를 사용하면 즉시 적용됩니다.
Correct Answer:
Solution:
# Scan logical volumes
[root@node2 ~]# lvscan
# Extend the logical volume. With -rL, the filesystem space is adjusted immediately after extending the volume.
[root@node2 ~]# lvextend -rL 300M /dev/myvol/vo
# Check the changes
[root@node2 ~]# lsblk
[root@node2 ~]# lvs
# Verification
[root@node2 ~]# df -h
사용자 john의 cron 접근 권한을 거부합니다.
Correct Answer:
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.
파일 찾기
"jacques" 사용자에게 속한 모든 파일을 찾아 루트 디렉터리 아래의 /root/findfiles 디렉터리로 이동하십시오.
Correct Answer:
Solution:
[root@node1 ~]# mkdir /root/findfiles
[root@node1 ~]# find / -user jacques
[root@node1 ~]# find / -user jacques -exec cp -a {} /root/findfiles \;
# Verification
[root@node1 ~]# ll /root/findfiles/