Professional Documents
Culture Documents
RHCSA 9 Question and Answare
RHCSA 9 Question and Answare
RHCSA 9 Question and Answare
Reset Password
1. boot and press e to edit mode
2. add "rd.break" after kernel inofrmation
3. press CTRL+X for next
4. mount -o remount,rw /sysroot
5. chroot /sysroot
6. passwd (type password and confirm password)
7. touch /.autorelabel
8. exit
9. exit
1. change hostname
1. hostnamectl set-hostname nodea.example.com
2. hostnamectl
3. hostname
Change IP Address
ifconfig (may not work in exam mode)
ip addr show
nmcli connection show
nmcli device status
getenforce
----alternative------
url1=http://172.25.250.9/rhel9/x86_64/dvd/AppStream
url2= http://172.25.250.9/rhel9/x86_64/dvd/BaseOS
vim /etc/yum.repos.d/local.repo
[AppStream]
baseurl= http://172.25.250.9/rhel9/x86_64/dvd/AppStream
gpgcheck=0
enabled=1
[BaseOS]
baseurl= http://172.25.250.9/rhel9/x86_64/dvd/BaseOS
gpgcheck=0
enabled=1
:wq!
4. Debug selinux
Vi /etc/httpd/conf/httpd.conf
Listen 82
:wq!
# Add user daffy with user id 3458 and set the password with "glegunge"
===========================
id daffy (check if exists)
useradd -u 3458 daffy
echo "glegunge" | passwd daffy --stdin
groupadd adminusers
useradd -G adminusers natasha
useradd -G adminusers harry
useradd -s /sbin/nologin sarah
# do the crosscheck
========================
tail /etc/passwd
tail /etc/group
vim /etc/chrony.conf
pool node1.domain13.com iburst
:wq!
chronyc tracking
chronyc sources
===================27.03.2024==================
#add port
firewall-cmd --add-port=82/tcp --permanent
firewall-cmd reload
#collaborative /common/admin
mkdir -p /common/admin
# make readable
chmod 770 /common/admin
# created files automatically get the group ownership under this directory
chmod g+s /common/admin
#7
======
cp /etc/passwd /var/tmp/
chown root:root /var/tmp/passwd
add
server classroom.example.com iburst
chronyc source -v
11: Deny cronjob for user susan so that other user for this system are not effected for this cronjob.
vi /etc/cron.deny
susan
12: Find all files owned by user brain and put them into /root/brain.
find / -user brain -exec mv -t /root/brain {} +
useradd -u 3458 daffy
[root@node1 ~]# echo "glegunge" | passwd daffy --stdin