0% found this document useful (0 votes)
262 views122 pages

EX200 Exam - 题目+答案+网友评论

Uploaded by

aiqin83
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
262 views122 pages

EX200 Exam - 题目+答案+网友评论

Uploaded by

aiqin83
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 122

2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

- Expert Verified, Online, Free.

 Custom View Settings

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 1/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Topic 1 - Single Topic

Question #1 Topic 1

SIMULATION -

Configure your Host Name, IP Address, Gateway and DNS.

Host name: station.domain40.example.com

/etc/sysconfig/network

hostname=abc.com

hostname abc.com

IP Address:172.24.40.40/24 -

Gateway172.24.40.1 -

DNS:172.24.40.1 -

Correct Answer: See explanation below.

# cd /etc/syscofig/network-scripts/

# ls

# vim ifcfg-eth0 (Configure IP Address, Gateway and DNS) IPADDR=172.24.40.40

GATEWAY=172.24.40.1 -

DNS1=172.24.40.1 -

# vim /etc/sysconfig/network

(Configure Host Name)

HOSTNAME= station.domain40.example.com

OR -

Graphical Interfaces:

System->Preference->Network Connections (Configure IP Address, Gateway and DNS) Vim /etc/sysconfig/network

(Configure Host Name)

  QuangTruong Highly Voted  3 years, 5 months ago

#cd /etc/sysconfig/network-scripts/
#ls
#vi ifcfg-eth0
IPADDR=172.24.40.40
PREFIX=24
GATEWAY=172.24.40.1
DNS1=172.24.40.1

#hostnamectl set-hostname station.domain40.example.com


upvoted 19 times

  xXxM__JxXx 2 years ago


hi, how do you make this configuration in effect? it tried systemctl restart networkmanager but the service is not found. i tried nmcli networking
off and on but this does not take effect also. i did systemctl reboot for this to work. thank you for the advise. btw using nmcli con mod enables
me to use nmcli networking off and on to make the changes in effect.
upvoted 2 times

  eddiemy 1 year, 12 months ago


Either way using ifdown eth0;ifup eth0 or nmcli conn up eth0
upvoted 2 times

  kathee 1 year ago


systemctl restart network.service
upvoted 1 times

  scarylucky 10 months, 3 weeks ago


should be systemctl restart NetworkManager

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 2/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

upvoted 2 times

  Luca_D 1 year ago


It's true up to Rhel 8 , in Rhel 9 configuration files are in /etc/NetworkManager/system-connections/
upvoted 4 times

  anon201 10 months, 2 weeks ago


nmcli con reload
afterwards and it works like charm !
upvoted 2 times

  PERjham Highly Voted  3 years, 1 month ago


There is many ways to achieve the tasks, remember! In this case, for this question all the commands working in rhel 7 also work in rhel 8. Again,
remember, there is many ways to resolve the questions. For example, if you can change the hostanme, you can use the cli (hostnamectl) or
modifying directly the archive for that purpose: /etc/hostname. If you can modify the network details, you can use, nmcli (cli for network
mannager), nmtui (TUI for network manager) or modify the archives directly. You can choose any of the ways you want!
upvoted 16 times

  thomasstate Most Recent  4 months, 1 week ago

after i config, can't ping anymore ist normal?


upvoted 1 times

  dunia 5 months, 3 weeks ago


hello all , in the exam there is two connections which connection we should edit ?the active one ( the first connection ) we modify the existing OR
we edit the second connection ? please anyone can answer?
upvoted 1 times

  E4ellis 6 months, 1 week ago


My recent success in my professional career is passing EX200 exam and it all happened because of Pass4surehub. Pass4surehub was recommended
to me by a friend of mine but at that time I hadn’t the idea that Pass4surehub Study Guide could be this much fruitful. However, within days, I felt
confident that I can ace the exam and I passed EX200 certification exam getting a huge score! Pass4surehub really works!
GET MORE INFO: https://www.pass4surehub.com/redhat/ex200-dumps.html
upvoted 5 times

  Akira_Goketsu 6 months, 2 weeks ago


you can use nmtui it is more faster way, it work for exam version 8
upvoted 2 times

  ACM13 7 months, 4 weeks ago


"nmtui" is easier to remember and can achieve both goals.
"nmcli" is also easy but required a bit more of remembering the right order of the commands for exemple
upvoted 3 times

  shubby12 9 months, 3 weeks ago


#cd /etc/sysconfig/network-scripts/
#ls
upvoted 1 times

  Rahul95 10 months ago


#hostnamectl set-hostname station.domain40.example.com
#hostnamectl - to verify
#nmcli connection modify eth0 ipv4.addresses 172.24.40.40/24 ipv4.gateway 172.24.40.1 ipv4.dns 172.24.40.1 ipv4.method static
#nmcli connection down eth0
#nmcli connection up eth0
# ping 172.24.40.1 - to verify
upvoted 8 times

  shamySx 9 months, 2 weeks ago


Love you Rahul
upvoted 1 times

  jahmad0730 10 months, 2 weeks ago


Do you need mask of 24 in the network-scripts vi? As in...
IPADDR=172.24.40.40/24
or
IPADDR=172.24.40.40
???
upvoted 1 times

  Ozarsif 6 months, 1 week ago


yes, you do. otherwise you will get IP of 172.24.40.40/32
upvoted 1 times

  cloudsinair 10 months, 2 weeks ago


RHEL 9.1
root]#
root]# hostnamectl set-hostname station.domain40.example.com

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 3/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

root]#
root]# cat /etc/hostname
root]# nmcli connection add con-name MyExam ifname ens224 type ethernet ipv4.addresses 172.24.40.50/24 ipv4.gateway 172.24.40.1
root]#
root]#nmcli connection modify MyExam ipv4.dns 172.24.40.1
root]#
root]# nmcli connection modify MyExam ipv4.method manual
root]#
root]# nmcli connection up MyExam
root]#
root]# nmcli device
upvoted 3 times

  duracell 3 months ago


hostnamectl hostname station.domain40.example.com is correct, whithout set-
upvoted 1 times

  DBrown 1 year ago


Option 1 - #sudo nmtui (gui configuration)
Option 2 - #nmcli connection modify ipv4.method manual ipv4.addresses 172.24.40.40/24 ipv4.gateway 172.24.40.1 ipv4.dns 172.24.40.1
#hostnamectl set-hostname station.domain40.example.com
#sudo nmcli connection down enp0s3 && sudo nmcli connection up enp0s3
upvoted 5 times

  Luca_D 1 year ago


DBrown, why enp0s3? I took the exam and there are two connections, eth0 (active) and enp0s3. I couldn't understand if I had to modify eth0 or
add an address to enp0s3.
Thanks
upvoted 1 times

  dunia 5 months, 3 weeks ago


so which connection you have edit on the exam ?
upvoted 1 times

  rhcsa_conqueror 1 year, 1 month ago


For RHCSA 9 we can use nmtui right. I feel this is very easy. Any one please confirm
upvoted 3 times

  Kengoudy 1 year, 3 months ago


When ls in the network-scripts, I get readme- ifcfg- rh.txt. Am I suppose to touch ifcfg-etho into network-scripts?
upvoted 2 times

  Dewitts68 10 months, 2 weeks ago


it has moved.
Read the readme for more information.
/etc/NetworkManager/system-connections/ <--- is the new location of the config files
upvoted 1 times

  SachinRao 1 year, 7 months ago


vi /etc/hostname
station.domain40.example.com
upvoted 1 times

  crystal_star 1 year, 10 months ago


Solution: hostnamectl set-hostname station.domain40.example.com
nmcli connection add con-name ens160 ifname ens160 ipv4.method manual ipv4.addresses 172.24.40.40/24 ipv4.gateway 172.24.40.1 ipv4.dns
172.24.40.1 connection.autoconnect yes type ethernet
upvoted 8 times

  feidhlimx 1 year, 9 months ago


hostnamectl without admin privileges is ok.
Does the nmcli command also work in this way?
upvoted 1 times

  mattd81 1 year, 10 months ago


Is this question asking you to add these settings to your current network or create a new network name with those settings to use? I'm confused it
it would need to be modified or an addition like "+ipv4.address"
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 4/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #2 Topic 1

SIMULATION -

Add 3 users: harry, natasha, tom.

The requirements: The Additional group of the two users: harry, Natasha is the admin group. The user: tom's login shell should be non-interactive.

Correct Answer: See explanation below.

# useradd -G admin harry

# useradd -G admin natasha

# useradd -s /sbin/nologin tom

# id harry;id Natasha (Show additional group)

# cat /etc/passwd

(Show the login shell)

OR -

# system-config-users

  cloudsinair Highly Voted  10 months, 2 weeks ago

RHEL 9.1
[root@server9 ~]#
[root@server9 ~]#groupadd admin
[root@server9 ~]#
[root@server9 ~]# useradd harry -G admin
[root@server9 ~]# useradd natasha -G admin
[root@server9 ~]#
[root@server9 ~]# useradd -s /sbin/nologin tom
[root@server9 ~]#
upvoted 5 times

  thomasstate Most Recent  4 months, 1 week ago

apart from the shell /sbin/nologin, which other is mostly use for user
upvoted 1 times

  dunia 5 months, 3 weeks ago


hello all , in the exam there is two connections which connection we should edit ?the active one ( the first connection ) we modify the existing OR
we edit the second connection ? please anyone can answer?
upvoted 1 times

  thiruppathij 6 months, 2 weeks ago


[root@servera ~]# groupadd admin
[root@servera ~]# useradd harry
[root@servera ~]# useradd natasha
[root@servera ~]# useradd tom -s /sbin/nologin
verify- commands
[root@servera ~]# cat /etc/passwd
[root@servera ~]# cat /etc/group
or else
#cat /etc/group | grep admin
#cat /etc/passwd | grep tom
upvoted 1 times

  Rahul95 10 months ago


#useradd harry
#useradd natasha
#useradd tom -s /sbin/nologin
#groupadd admin
#usermod -G admin harry
#usermod -G admin natasha
#cat /etc/group | grep admin - to verify
#cat /etc/passwd | grep tom
upvoted 1 times

  dehemox355 1 year ago


Is this dump still valid and up to date? I can't see questions about container or VDO and Stratis
upvoted 2 times

  BitterOldMan 1 year, 1 month ago


Oops, answering my own question, capital -G does the append.
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 5/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

  BitterOldMan 1 year, 1 month ago


The task says to add additional group admin, so shouldn't the command be:
useradd -aG admin harry
upvoted 1 times

  wajdi005 1 year ago


You can do that, but the -G is also correct because the users are new. So you wont overnight any permissions.
upvoted 2 times

  nailimvali 1 year, 5 months ago


***
useradd -s /sbin/nologin tom
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 6/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #3 Topic 1

SIMULATION -

Create a catalog under /home named admins. Its respective group is requested to be the admin group. The group users could read and write,

while other users are not allowed to access it. The files created by users from the same group should also be the admin group.

Correct Answer: See explanation below.

# cd /home/

# mkdir admins /

# chown .admin admins/

# chmod 770 admins/

# chmod g+s admins/

  Moram Highly Voted  3 years, 6 months ago

If the group should only have read and write shouldn't the command be:
chmod 760 /admins
upvoted 12 times

  kitkat 1 year, 10 months ago


Permissions on the folder works different to that of files. Permissions needed are 2770 with 2760 users member of admin group will not be able
to enter the folder.
upvoted 2 times

  Mari685 1 year, 10 months ago


Hi can you give me some details about redhat
upvoted 1 times

  Joeytechn9t Highly Voted  2 years, 10 months ago

#mkdir /home/admins
#groupadd admin
#chown root:admin /admins
#chmod 770 /admins
#chmod g+s
upvoted 10 times

  yajala Most Recent  1 month ago

I passed the RHSCA exam last week. This dump was useful but needs update for questions on writing simple shell scripts, container, Stratis and
VDO. Thanks. Also, I think Redhat has increased the number of questions from 20 - 24. Mine were 24 questions on the exam. Thanks.
https://medium.com/@darekhale91/latest-redhat-ex200-exam-dumps-2023-acd1c1922729
upvoted 2 times

  Rahul95 10 months ago


#mkdir -p /home/admins
#chgrp admin /home/admins
#chmod 770 /home/admins - 7 is for max permission for dir and 6 is for files
#chmod g+s /home/admins
#su - harry
#touch /home/admins/testfile
#ls-ltr /home/admins/ - to verify
upvoted 3 times

  techzideas 1 year, 2 months ago


mkdir -p /home/admins
chown -R :admin /home/admins
chmod 2070 /home/admins
touch /home/admins/office.txt
ll /home/admins

Please Give me your views on this...


upvoted 1 times

  radwan_maazon 1 year, 1 month ago


/home actualy exist so that you don't neet put -p
upvoted 1 times

  syed2020 1 year, 9 months ago


Without granting x permissions, group users will not be able to access the folder so it should be chmod 770 /home/admins
upvoted 1 times

  AbidBajwa 2 years, 5 months ago

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 7/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

mkdir admins
groupadd admin
chown :admin /home/admins
chmod g+rw /home/admins
chmod o-rwx /home/admins
chmod g+s /homeadmins
upvoted 3 times

  cloudyhr 2 years, 2 months ago


Did implemented practically and 770 is the correct answer
chmod 2770 /home/admin
same as above 3 chmod commands
upvoted 3 times

  stoobie 2 years, 1 month ago


@cloudyhr Why do you have 2770 instead of just 770?
And why is g+s necessary?
upvoted 1 times

  stoobie 2 years, 1 month ago


I figured out the answer to my second question about g+s. The "s" (special permissions) is necessary so that files _created_ by users from
the `admin` group are also _owned_ by the `admin` group.
upvoted 1 times

  kitkat 1 year, 7 months ago


your first question's answer is same. 2 is equivalent of g+s
upvoted 1 times

  sugisho 2 years, 8 months ago


which is correct permission /home/admin 760 or 770 ?
upvoted 2 times

  AluBhorta 2 years, 4 months ago


2770 to be precise.
it's because without exec permission, even group users won't be able to enter the dir (i.e. cd requires rx permission).
upvoted 1 times

  Mari685 1 year, 9 months ago


can you help me in redhat need some details about it if possible dm me on instagram lvukhan123
upvoted 1 times

  RHEL 3 years, 1 month ago


The right answer is chmod 770 because you need to have execution permission on the directory to have access to its content, so you can perform
write and read process.
upvoted 4 times

  golem1987 2 years, 11 months ago


2770 should be to allow also inheritance for group permissions
upvoted 3 times

  adolfoale 3 years, 2 months ago


For all of the above to work, the user must have the admin group as an additional group. Do the test.
upvoted 3 times

  RedQuasar 3 years, 3 months ago


mkdir /home/admins
chown :admin /home/admins
chmod u=rw,o=--- /home/admins
chmod g+s /home/admins
upvoted 3 times

  Nhan 3 years, 6 months ago


2=Write 4 = read therefore r+w=6, Moran has the correct answer for setting chmod
upvoted 1 times

  Darion81 3 years, 5 months ago


Depends. For directories - r - list files, w - add/del files, x - cd to that directory
If yser should be able to enter it this dir should have x
upvoted 7 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 8/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #4 Topic 1

SIMULATION -

Configure a task: plan to run echo hello command at 14:23 every day.

Correct Answer: See explanation below.

# which echo

# crontab -e

23 14 * * * /bin/echo hello

# crontab -l (Verify)

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 9/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

  surac Highly Voted  3 years, 6 months ago

crontab -u mary -e
23 14 * * * echo "Hello World."
upvoted 7 times

  datboy16 2 years, 1 month ago


why are u user mary? this that necessary
upvoted 4 times

  Mayowa15 1 year, 4 months ago


there is no user for this question so no need to use -u and any user.
upvoted 1 times

  PENNSHARK Most Recent  2 months, 3 weeks ago

vim /etc/crontab
23 14 * * * echo "hello "
upvoted 1 times

  [Removed] 4 months, 3 weeks ago


echo '23 14 * * * /bin/echo hello' | crontab -
upvoted 1 times

  Rahul95 10 months ago


crontab -e
min hr * * * /bin/echo "hello"
crontab -l #to verify

vi /etc/cron.deny #to stop a user from creating a cron job


username #add the username in the file
upvoted 1 times

  zqc 10 months, 3 weeks ago


23 14 * * * echo "hello" can't display hello on terminal. should force echo "hello" > /dev/pts/0(may different to your tty). I test on RockyLinux Rocky
Linux 8.4 (Green Obsidian). Please correct if I am wrong.
upvoted 1 times

  cloudsinair 10 months, 2 weeks ago


Question doesn't ask to echo on specific terminal, user could be log in to tty2 or pts/0.
to make it simple, don't add more input.
upvoted 1 times

  2022G 1 year, 11 months ago


#crontab -e
23 14 * * * echo "hello"
:wq!
#crontab -l =>to check the cronjob
upvoted 2 times

  AbidBajwa 2 years, 5 months ago


23 14 * * * user echo "hello"
upvoted 1 times

  DANG257315 3 years, 2 months ago


crontab -e
"open editor vi" --> key i insert text
23 14 * * * echo "test"
save --> esc :x
upvoted 2 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 10/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #5 Topic 1

SIMULATION -

Find the files owned by harry, and copy it to catalog: /opt/dir

Correct Answer: See explanation below.

# cd /opt/

# mkdir dir

# find / -user harry -exec cp -rfp {} /opt/dir/ \;

  airphreak Highly Voted  3 years, 3 months ago

find / -user Harry -type f -exec cp {} /opt/dir \;


upvoted 17 times

  thomasstate Most Recent  4 months, 1 week ago

why does it take time to process the command


upvoted 1 times

  MichaelChapoco 3 months, 1 week ago


add -rf to the exec command
upvoted 1 times

  Abhilashasok 7 months, 1 week ago


# cd /opt/
# mkdir dir
# find / -user harry -type f -exec cp -rfp {} /opt/dir/ \;
upvoted 1 times

  ertgrty 7 months, 1 week ago


#mkdir /opt/dir
#find / -type f -user Harry -exec cp {} -ar /opt/dir \;
upvoted 1 times

  ertgrty 7 months, 1 week ago


sorry
#mkdir /opt/dir
#find / -type f -user Harry -exec cp -ar {} /opt/dir/ \;
upvoted 1 times

  Rahul95 10 months ago


#mkdir -p /opt/dir
#find / -user harry -exec cp -rfp {} /opt/dir/ \;
#ls ltr /opt/dir - to verify if files appeared or not
upvoted 1 times

  jahmad0730 10 months, 1 week ago


What is the answer please? Syntax in the example is not working.
[root@station /]# find / -user tom -exec cp {} /opt/dir/ \;
cp: '/opt/dir/.bash_logout' and '/opt/dir/.bash_logout' are the same file
cp: '/opt/dir/.bash_profile' and '/opt/dir/.bash_profile' are the same file
cp: '/opt/dir/.bashrc' and '/opt/dir/.bashrc' are the same file
cp: '/opt/dir/tom' and '/opt/dir/tom' are the same file
cp: -r not specified; omitting directory '/home/tom'
find: ‘/proc/8531/task/8531/fd/6’: No such file or directory
find: ‘/proc/8531/task/8531/fdinfo/6’: No such file or directory
find: ‘/proc/8531/fd/5’: No such file or directory
find: ‘/proc/8531/fdinfo/5’: No such file or directory
upvoted 1 times

  tinythings 12 months ago


mkdir -p /opt/dir
cp -nr --parents $(find / /home -xdev -user harry) /opt/dir
upvoted 1 times

  Mayowa15 1 year, 4 months ago


after copy them to /opt/dir , how can I verify that is really copy to that? please. I run #cat /opt/dir but don't really see what make me sure. thanks
upvoted 1 times

  Ghassen0008 1 year, 5 months ago


plz i need account exam topics plzzz
[email protected]

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 11/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

upvoted 1 times

  robust993 1 year, 5 months ago


it's very easy
# find / -user harry -exec cp {} /opt/dir/ \;
upvoted 1 times

  Hayder_Alobaidi 1 year, 8 months ago


find / -user hayder -type f 2>/dev/null -exec cp '{}' /opt/dir \;
upvoted 3 times

  maxim_sk 1 year, 10 months ago


for i in $(find / -user harry -type -f);do cp -rpvf $i /opt/dir;done
upvoted 1 times

  maxim_sk 1 year, 9 months ago


i cannot edit, but the same as solution is:
for i in $(find / -user harry);do cp -rpvf $i /opt/dir;done
upvoted 1 times

  brahmimedamine 2 years, 1 month ago


find / -user harry -type f -exec cp -rpvf {} /opt/dir \; 2> /dev/null
upvoted 3 times

  kenkct 2 years, 1 month ago


find / -type f -user harry -exec cp {} /opt/dir \;
upvoted 2 times

  eid 2 years, 3 months ago


find / -user Harry -type f -exec cp -fp {}/opt/dir \;
or
cp -fp $(find / -user Harry -type f) /opt/dir
upvoted 1 times

  eid 2 years, 3 months ago


find / -user Harry -type f -exec cp -fp /opt/dir \;
or
cp -fp $(find / -user Harry -type f) /opt/dir
upvoted 1 times

  eldny 2 years, 4 months ago


find . -type d -user tester ! -path "./.*" -exec cp -rf {}

I am excluding all the hidden files with ! -path "./.*"


upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 12/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #6 Topic 1

SIMULATION -

Find the rows that contain abcde from file /etc/testfile, and write it to the file/tmp/testfile, and the sequence is requested as the same as

/etc/testfile.

Correct Answer: See explanation below.

# cat /etc/testfile | while read line;

do

echo $line | grep abcde | tee -a /tmp/testfile

done

OR -

grep `abcde' /etc/testfile > /tmp/testfile

  airphreak Highly Voted  3 years, 3 months ago

grep abcde /etc/testfile > /tmp/testfile


upvoted 22 times

  adolfoale Highly Voted  3 years, 2 months ago

cat /etc/testfile | grep "abcde" > /tmp/testfile


upvoted 12 times

  Bittercampari Most Recent  1 month, 4 weeks ago

awk '/abcde/ {print}' /etc/testfile >> /tmp/testfile


upvoted 1 times

  thomasstate 4 months, 1 week ago


this is my error message after i executed the command grep abcde /etc/testfile > /tmp/testfil "grep : /etc/testfile: Is a directory"
upvoted 1 times

  ertgrty 7 months, 1 week ago


#grep "abcde" /etc/testfile > /tmp/testfile
upvoted 1 times

  Rahul95 10 months ago


#touch /tmp/testfile - if file doesn't exists
#grep abcde /etc/testfile > /tmp/testfile
#cat /tmp/testfile - to verfy
upvoted 1 times

  Velda 1 year ago


There is no specified if the content of destination file can be replaced. So i suppose that it can.. in that case these commands are correct:
cat /etc/testfile | grep abcde > /tmp/testfile
OR
grep abcde /etc/testfile > /tmp/testfile

In case that content of destination file should not be replaced, following command will work:
cat /etc/testfile | while read line; do echo $line | grep abcde | tee -a /tmp/testfile; done

There is missing ";" in "correct answer" here, so the command from there will work if you will copy paste it but if you need to write it on your own,
you must add the ";" or use bash script!
upvoted 2 times

  techzideas 1 year, 2 months ago


grep -w "abcde" /etc/testfile >> /tmp/testfile
upvoted 1 times

  ktd971 1 year, 2 months ago


grep ^abcde$ /etc/testfile > /tmp/testfile
upvoted 1 times

  ptmude 2 years, 2 months ago


grep abcde /etc/testfile | tee /tmp/testfile
upvoted 1 times

  eid 2 years, 3 months ago


cat /etc/testfile | grep abcde > /tmp/testfile
OR

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 13/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

grep abcde /etc/testfile > /tmp/testfile


upvoted 4 times

  MELO225 2 years, 6 months ago


cat /etc/tesfile | grep abcde > /tmp/testfile
upvoted 3 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 14/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #7 Topic 1

SIMULATION -

Create a 2G swap partition which take effect automatically at boot-start, and it should not affect the original swap partition.

Correct Answer: See explanation below.

# fdisk /dev/sda

(check Partition table)

(create new partition: press e to create extended partition, press p to create the main partition, and the extended partition is further divided into

logical partitions)

Enter -

+2G

W-

partx -a /dev/sda

partprobe

mkswap /dev/sda8

Copy UUID -

swapon -a

vim /etc/fstab

UUID=XXXXX swap swap defaults 0 0

(swapon -s)

  cloudyhr Highly Voted  2 years, 2 months ago

create a partition for given size(2G)


#fdisk /dev/sdb
#n
#+2G
#w
#partprobe
check the present free memory
#free -h
#mkswap /dev/sdb5
#swapon /dev/sdb5
check the swap space and compai with privious value
#free -h

exit /etc/fstab and add below line


/dev/sdb5 swap swap defaults 0 0
wright and exit /etc fstab

# swapon -a
upvoted 6 times

  ertgrty Most Recent  7 months, 1 week ago

first check available swap


#free -m

second partions available


#lsblk
#parted -s /dev/vdb mklabel msdos
#parted -s /dev/vdb mkpart primary 2048S 2200MB
#mkswap /dev/vdb1
#vim /etc/fstab
/dev/vdb1 swap swap defaults 0 0
#swapon -a
upvoted 1 times

  Rahul95 10 months ago

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 15/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

lsblk #to check partition


fdisk /dev/sdb #to sda or sdb depending on the disk
n # for new
p #primary
1 #default partition number
enter #first sector
+2G #last sector
t #to change type and select 82 for swap
82 #code for hex
w #save changes
partprobe #to update partition table

lsblk #to confirm


mkswap /dev/sbd1 #to generate UUID, we need UUID to make it permanent
lsblk -f #to see file system, should be swap
vi /etc/fstab #to make it permanent
UUID=xxxxxxxxxxxx swap swap defaults 0 0
free -h
swapon -a
free -h #swap value must be increased by 2G
upvoted 4 times

  ktd971 1 year, 2 months ago


#lsblk
#free -h
#mkswap /dev/sdb
#swapon /dev/sdb
#free -h
#vim /etc/fstab
#/dev/sdb swap defaults 0 0
upvoted 1 times

  ktd971 1 year, 2 months ago


if sdb it's more than 2G you have to use fstab
upvoted 1 times

  Brabus 1 year, 3 months ago


if it is a swap partition the appropriate partition type (Linux swap) must be set -> t (use l to get a list of known partition types) -> 82
upvoted 1 times

  Stunomatic 1 year, 4 months ago


echo $(blkid /dev/sdb5) >> /etc/fstab
use this command to copy uid to fstab.
upvoted 1 times

  memonic 1 year, 2 months ago


blkid is a good comand to know partition UUID but with your command literally the swap partition dont start at boot time
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 16/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #8 Topic 1

SIMULATION -

Create a user named alex, and the user id should be 1234, and the password should be alex111.

Correct Answer: See explanation below.

# useradd -u 1234 alex

# passwd alex

alex111

alex111

OR -

echo alex111|passwd -stdin alex

  ogwogwo 6 months ago


With The answers I see, it makes the uid and the gid the same while the question asks only the uid to be changed.
upvoted 1 times

  Rahul95 10 months ago


#useradd -u 1234 alex
#passwd alex - it will ask for new password for user alex
#cat /etc/passwd | grep alex or id alex - to verify
upvoted 2 times

  ktd971 1 year, 2 months ago


useradd -u 1234 -p alex111 -m alex
upvoted 3 times

  Mayowa15 1 year, 4 months ago


#useradd alex -u 1234
#passwd alex
#alex111
#alex111
upvoted 1 times

  SOAPGUY 1 year, 6 months ago


one more '-' needed;
echo alex111 | passwd --stdin alex
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 17/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #9 Topic 1

SIMULATION -

Install a FTP server, and request to anonymous download from /var/ftp/pub catalog. (it needs you to configure yum direct to the already existing

file server.)

Correct Answer: See explanation below.

# cd /etc/yum.repos.d

# vim local.repo

[local]

name=local.repo

baseurl=file:///mnt

enabled=1

gpgcheck=0

# yum makecache

# yum install -y vsftpd

# service vsftpd restart

# chkconfig vsftpd on

# chkconfig --list vsftpd

# vim /etc/vsftpd/vsftpd.conf

anonymous_enable=YES

  jujuonbeat Highly Voted  3 years, 4 months ago

FTP stuff no longer on RHCSA from 2019


upvoted 19 times

  Rahul95 Highly Voted  10 months ago

Not valid for RHCSA 9


upvoted 5 times

  [Removed] Most Recent  1 year, 10 months ago

Are you guys certain that this isn't a question asking you to configure a local YUM repo? If so, the first half of the solution is correct (except for the
base URL):

# cd /etc/yum.repos.d
# vim local.repo
[local] (can be any name in brackets)
name=local.repo (any name you want)
baseurl=/var/ftp/pub (local repo's network location)
enabled=1 (duh, enabled)
gpgcheck=0 (doesn't perform check)
upvoted 3 times

  Mari685 1 year, 9 months ago


need some details about redhat can you please dm me on my instagram luvkhan123 please
upvoted 1 times

  qolani 8 months, 1 week ago


How do you check if your configuration is done correctly?
upvoted 1 times

  14_aman 1 year, 10 months ago


WHY FTP WAS NOT ADDED IN FIREWALLD?
IS FIREWALL DISABLED ALREADY IN MACHINE?
upvoted 2 times

  Mari685 1 year, 9 months ago


can i have some details about redhat? can you dm me in my insta page luvkhan123 plz
upvoted 1 times

  corpio 2 years, 10 months ago


Thts correct
upvoted 2 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 18/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #10 Topic 1

SIMULATION -

Configure a HTTP server, which can be accessed through

http://station.domain40.example.com.

Please download the released page from http://ip/dir/example.html.

Correct Answer: See explanation below.

# yum install -y httpd

# chkconfig httpd on

# cd /var/www/html

# wget http://ip/dir/example.html

# cp example.com index.html

# vim /etc/httpd/conf/httpd.conf

NameVirtualHost 192.168.0.254:80

<VirtualHost 192.168.0.254:80>

DocumentRoot /var/www/html/

ServerName station.domain40.example.com

</VirtualHost>

  corpio Highly Voted  2 years, 10 months ago

This is Discontinued in rhcsa in 2021


upvoted 12 times

  airphreak Highly Voted  3 years, 3 months ago

dnf install -y httpd


systemctl enable httpd
cd /var/www/html
wget http://ip/dir/example.html
mv example.html index.html
systemctl start httpd
upvoted 11 times

  Mayowa15 1 year, 4 months ago


I think it is a good idea to use #cp instead of #mv
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 19/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #11 Topic 1

SIMULATION -

Configure the verification mode of your host account and the password as LDAP. And it can login successfully through ldapuser40. The password

is set as

"password". And the certificate can be downloaded from http://ip/dir/ldap.crt. After the user logs on the user has no host directory unless you

configure the autofs in the following questions.

Correct Answer: See explanation below.

system-config-authentication

LDAP Server: ldap//instructor.example.com (In domain form, not write IP)

OR -

# yum groupinstall directory-client (1.krb5-workstation 2.pam-krb5 3.sssd)

# system-config-authentication

1.User Account Database: LDAP

2.LDAP Search Base DN: dc=example,dc=com

3.LDAP Server: ldap://instructor.example.com (In domain form, not write IP) 4.Download CA Certificate

5.Authentication Method: LDAP password

6.Apply

getent passwd ldapuser40

  Rahul95 10 months ago


Confirmed - LDAP is removed from RHCSA9
upvoted 4 times

  ALBY19 3 years, 6 months ago


This still works on Rhel 8?
upvoted 2 times

  juliansaccount 3 years, 6 months ago


No LDAP questions are gone (thankfully)
upvoted 5 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 20/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #12 Topic 1

SIMULATION -

Configure autofs to make sure after login successfully, it has the home directory autofs, which is shared as /rhome/ldapuser40 at the ip:

172.24.40.10. and it also requires that, other ldap users can use the home directory normally.

Correct Answer: See explanation below.

# chkconfig autofs on

# cd /etc/

# vim /etc/auto.master

/rhome /etc/auto.ldap

# cp auto.misc auto.ldap

# vim auto.ladp

ldapuser40 -rw,soft,intr 172.24.40.10:/rhome/ldapuser40

* -rw,soft,intr 172.16.40.10:/rhome/&

# service autofs stop

# server autofs start

# showmount -e 172.24.40.10

# su - ladpuser40

  AbidBajwa Highly Voted  2 years, 5 months ago

yum install autofs


showmount -e 172.24.40.10
##Create user without a home directory
useradd -M ldapuser40
##Create file
vi /etc/auto.master.d/autohome.autofs
##add this line
/- /etc/auto.home
##create this file
vi /etc/auto.home
##Add this line and save file
/home/ldapuser40 -rw,sync 172.24.40.10:/rhome/ldapuser40

systemctl enable --now autofs.service


upvoted 10 times

  lgu Most Recent  2 years, 5 months ago

Something like :

dnf install autofs -y


systemctl enable autofs

vi /etc/auto.master
/rhome/ldapuser40 /etc/auto.examtopic

vi /etc/auto.examtopic
ldapdir 172.24.40.10:/rhome/ldapuser40

systemctl start autofs

mount
upvoted 4 times

  safodz 2 years, 4 months ago


what do you means by ldapdir? should be ldapuser40 172.24.40.10:/rhome/ldapuser40
upvoted 4 times

  wizojlo 1 month, 1 week ago


I understood the task differently, like we need to mount server path to ldapuser40 folder under /home. Might be wrong, correct me if so.

#dnf install -y autofs (installs required package)


#systemctl enable --now autofs (enable service at next boot and start it immediately)
#showmount -e 172.24.40.10 (to check existing NFS export on the server)
#vim /etc/auto.master (edit master file)
#/home /etc/test.mapfile (add this line, configures /home as main mount point where everything defined in test.mapfile will be mounted under)
#vim /etc/test.mapfile (creates and starts editing the mapfile)
#ldapuser40 172.24.40.10:/rhome/ldapuser40 (add this line, first part is the folder which will be created under /home defined previously in
master, and contents will be retrieved from server path on the right).
#systemctl reload autofs (reloads all autofs configs)
https://www.examtopics.com/exams/redhat/ex200/custom-view/ 21/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

upvoted 1 times

  wizojlo 1 month, 1 week ago


Forgot to add
#useradd -M ldapuser40 (after showmount in 3rd line - this will create the user without home folder)
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 22/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #13 Topic 1

SIMULATION -

Configure the system synchronous as 172.24.40.10.

Correct Answer: See explanation below.

Graphical Interfaces:

System-->Administration-->Date & Time

OR -

# system-config-date

  mariuszz Highly Voted  3 years, 5 months ago

FOR RHEL8:
sudo yum -y install chrony
$ sudo vi /etc/chrony.conf
server 192.168.25.3
sudo timedatectl set-ntp true
sudo systemctl enable --now chronyd
upvoted 19 times

  RedHatStudent 3 years, 2 months ago


Don't forget iburst option
server 192.168.25.3 iburst
and to check the server that ntp is synchronized with use the command , chronyc sources -v.
upvoted 3 times

  ms200 3 years ago


iburst option not required. Need only server <hostname or ip>
upvoted 3 times

  tck123 2 years, 9 months ago


server 172.24.40.10?
upvoted 3 times

  chyaba 2 years, 10 months ago


where did "server 192.168.25.3" come from?
upvoted 2 times

  kenkct Highly Voted  2 years, 1 month ago


For RHEL8:
#chkconfig chronyd on
#sudo vim /etc/chrony.conf
allow 172.24.40.0/24
server 172.24.40.10
#sudo systemctl restart chronyd
#sudo chronyc sources -v
upvoted 5 times

  gunwantk Most Recent  2 years, 5 months ago

Do you guys this "Configure the system synchronous as 172.24.40.10." This is a incomplete question statement?
upvoted 2 times

  AbidBajwa 2 years, 5 months ago


yum install chrony.x86_64
vi /etc/chrony.conf
pool 172.24.40.10 iburst

timedatectl status
##check if NTP service is not active
timedatectl set-ntp true
systemctl enable --now chronyd.service
##check status of chrony sync
chronyc sources -v
upvoted 4 times

  nickoftime 2 years, 11 months ago


why we need to "timedatectl set-ntp true"?
can we just strart chronyd alone?
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 23/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

  nickoftime 2 years, 11 months ago


(i just wondering why need that... i think 'mariuszz' is right answer )
upvoted 1 times

  eddiemy 1 year, 12 months ago


I never did that, what's use for? timedatectl set-ntp true
usually
$ sudo yum -y install chrony
$ sudo vi /etc/chrony.conf
server 192.168.25.3
$ systemctl restart chronyd
$ chronyc sources
upvoted 1 times

  KreaP 1 year, 10 months ago


its required to tell the system to use the ntp configuration.
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 24/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #14 Topic 1

SIMULATION -

Change the logical volume capacity named vo from 190M to 300M. and the size of the floating range should set between 280 and 320. (This

logical volume has been mounted in advance.)

Correct Answer: See explanation below.

# vgdisplay

(Check the capacity of vg, if the capacity is not enough, need to create pv , vgextend , lvextend)

# lvdisplay (Check lv)

# lvextend -L +110M /dev/vg2/lv2

# resize2fs /dev/vg2/lv2

mount -a

(Verify)

-------------------------------------------------------------------------------

(Decrease lvm)

# umount /media

# fsck -f /dev/vg2/lv2

# resize2fs -f /dev/vg2/lv2 100M

# lvreduce -L 100M /dev/vg2/lv2

# mount -a

# lvdisplay (Verify)

OR -

# e2fsck -f /dev/vg1/lvm02

# resize2fs -f /dev/vg1/lvm02

# mount /dev/vg1/lvm01 /mnt

# lvreduce -L 1G -n /dev/vg1/lvm02

# lvdisplay (Verify)

  Stunomatic Highly Voted  1 year, 4 months ago

lvextend -r -L +110M /dev/vg2/lv2


use -r to resize FS
upvoted 8 times

  Brabus 1 year, 4 months ago


that is correct: You can use the -r option of the lvextend command to extend the logical volume and resize the underlying file system with a
single command!
upvoted 2 times

  ertgrty Most Recent  7 months, 1 week ago

check details of lv
#lvdisplay
#lvextend -L 230MB /dev/(vg)/vo
#resizes2fs , if using xfs (xfs_growfs)
upvoted 1 times

  techzideas 1 year, 2 months ago


Could anyone share the way we should get on to Exam-Topics server to practice these questions ?
Thanks...
upvoted 1 times

  Dewitts68 10 months, 2 weeks ago


Install fedora on your machine and try them out there :)
There is no test server that will check these answers for you
upvoted 1 times

  ACM13 8 months, 1 week ago


Download Red Hat for developers and create a test server in your machine using UTM, you can add virtual disk, even register for a developer
subscription and use yum
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 25/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #15 Topic 1

SIMULATION -

Create a volume group, and set 16M as a extends. And divided a volume group containing 50 extends on volume group lv, make it as ext4 file

system, and mounted automatically under /mnt/data.

Correct Answer: See explanation below.

# pvcreate /dev/sda7 /dev/sda8

# vgcreate -s 16M vg1 /dev/sda7 /dev/sda8

# lvcreate -l 50 -n lvm02

# mkfs.ext4 /dev/vg1/lvm02

# blkid /dev/vg1/lv1

# vim /etc/fstab

# mkdir -p /mnt/data

UUID=xxxxxxxx /mnt/data ext4 defaults 0 0

# vim /etc/fstab

# mount -a

# mount

(Verify)

  MELO225 Highly Voted  2 years, 6 months ago

Assuming /dev/sda1 and /dev/sda2 partitions already exist:


# pvcreate /dev/sda1 /dev/sda2
# vgcreate -s 16M vg01 /dev/sda1 /dev/sda2
# lvcreate -l 50 -n lv01 vg01
# mkfs.ext4 /dev/vg01/lv01
# mkdir -p /mnt/data
# blkid /dev/vg01/lv01
copy the UUID of /dev/vg01/lv01 in the output of that command.
# vim /etc/fstab
UUID="paste the UUID of /dev/vg01/lv01 here" /mnt/data ext4 defaults 0 0
# mount -ahttps://www.examtopics.com/exams/redhat/ex200/view/3/#
upvoted 13 times

  RedQuasar Highly Voted  3 years, 3 months ago

ERRATA:
vgcreate -s 16M vg01 /dev/sda1 /dev/sda2
lvcreate -l 50 -n lv01 vg01
mkfs.ext4 /dev/mapper/vg01_lv01
lsblk -pf (UUID=dde8c40f-fa74-4290-8ff9-252c614e8307)
echo “UUID=dde8c40f-fa74-4290-8ff9-252c614e8307 /mnt/data xfs defaults 0 0” >> /etc/fstab
upvoted 7 times

  kemculka 2 years, 8 months ago


don't forget:
mkdir /mnt/data
upvoted 1 times

  kysj 2 years ago


it should be ext4 instead of xfs in /etc/fstab
upvoted 2 times

  ktd971 Most Recent  1 month, 1 week ago

I don't understand why you used 2 "/dev/" instead of just one.


upvoted 1 times

  Rahul95 10 months ago


Assuming dev/sda1 exist
#lsblk -t check
#vgcreate -s 16M testvg /dev/sda1
#vgdisplay
#lvcreate -l 50 -n testlv testvg
#lvdisplay
#mkfs.ext4 /dev/test/test1
#mkdir /mnt/data
#vi /etc/fstab
#/dev/test/test1 /mnt/data ext4 defaults 0 0
#mount -a
#df -hT - to verify
https://www.examtopics.com/exams/redhat/ex200/custom-view/ 26/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

#
upvoted 1 times

  kenkct 2 years, 1 month ago


lsblk -pfs (locate the 2 empty HDD, sdb sdc)
sudo pvcreate /dev/sdb /dev/sdc (2 empty HDD)
sudo vgcreate -s 16M vg01 /dev/sdb /dev/sdc
sudo lvcreate -l 50 -n lv01 vg01
sudo mkfs.ext4 /dev/mapper/vg01-lv01
lsblk -pfs
sudo mkdir -p /mnt/data
sudo su
echo "UUID=XXXX-XXXX-XXXX /mnt/data ext4 defaults 0 0" >> /etc/fstab
mount -a
upvoted 1 times

  eid 2 years, 3 months ago


what is the correct
lvcreate -l 50 -n lv01 vg01 or lvcreate -n lv1 -L 50 vg1
upvoted 1 times

  zqc 10 months, 3 weeks ago


the -L option to set the LV size in bytes or the -l option to set the LV size in extents
upvoted 1 times

  Roger95 2 years, 5 months ago


assume that /dev/sdb2 and /dev/sdb3 were created (lsblk to verify it)

#pvcreate /dev/sdb{2,3}
#pvdisplay /dev/sdb* (verify)

#vgcreate VG01 --physicalextentsize 16M /dev/sdb{2,3}


#vgdisplay /dev/VG01 (verify)

#lvcreate --extents 50 --name LV01 VG01


#lvdisplay /dev/VG01 (verify)

#blkid /dev/VG01/LV01 (get UUID=XXX-XX-XX)


#mkdir -p /mnt/data
#echo "UUID=XXX-XX-XX /mnt/data ext4 defaults 0 0" | tee -a /etc/fstab
#mount -a
upvoted 3 times

  kitkat 1 year, 10 months ago


mkfs before getting UUID with help of blkid is missing.
#lvdisplay /dev/VG01 (verify)
#mkfs.ext4 /dev/VG01/LV0
#blkid /dev/VG01/LV01 (get UUID=XXX-XX-XX)
upvoted 1 times

  gunwantk 2 years, 5 months ago


why question statement are so confusing?
upvoted 3 times

  jmm18 2 years, 10 months ago


Where do we get UUID value?
upvoted 2 times

  cb52 2 years, 2 months ago


run lsblk -fs
upvoted 1 times

  sugisho 2 years, 9 months ago


just blkid
upvoted 1 times

  RedQuasar 3 years, 3 months ago


vgcreate -s 16M vg01 /dev/sda1 /dev/sda2
lvcreate -l 50 -n lv01 vg01
mkfs.xfs /dev/mapper/vg01_lv01
lsblk -pf (UUID=dde8c40f-fa74-4290-8ff9-252c614e8307)
echo “UUID=dde8c40f-fa74-4290-8ff9-252c614e8307 /mnt/data xfs defaults 0 0” >> /etc/fstab
upvoted 3 times

  xinivat265 3 years, 4 months ago


This question have no sense only for me ? What means "And divided a volume group containing 50 extends on volume group lv".... Divided a
volume group in another volume group !? Moreover the size of the volume group is not specified (50 extends or more !?), the size of the logical

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 27/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

volume neither..
upvoted 5 times

  fullbenz 3 years, 5 months ago


lvcreate -n lv1 -L 50 vg1
upvoted 4 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 28/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #16 Topic 1

SIMULATION -

Upgrading the kernel as 2.6.36.7.1, and configure the system to Start the default kernel, keep the old kernel available.

Correct Answer: See explanation below.

# cat /etc/grub.conf

# cd /boot

# lftp it

# get dr/dom/kernel-xxxx.rpm

# rpm -ivh kernel-xxxx.rpm

# vim /etc/grub.conf

default=0

  Roldo97 Highly Voted  3 years, 2 months ago

To update Kernel:
#rpm -ivh [kernel.rmp] --> Install a rpm package in verbose mode
OR
#yum install kernel --> (If you're using repositories)

It's important to know that this doesn't replace the actual kernel. It is installed along the actual kernel and you can select any available kernel to
boot the system in case of troubleshooting.
Also, the system onlny saves a maximum of 4 kernels. If you already have 4, and install a 5th kernel, this one will replace the oldest kernel.
-----------
To set a default kernel:
- We can use grubby command tool.
#grubby --default-kernel --> Get default kernel (It's probably that the latest installed be selected)
#grubby --info=ALL | grep ^kernel --> This command list all kernel paths for the available kernels.
#grubby --set-default=[kernel path obtained from the above command]

Reboot and verify


#uname -r --> Get the loaded kernel
upvoted 20 times

  AbidBajwa 2 years, 5 months ago


well explained and very informative
upvoted 1 times

  adolfoale Highly Voted  3 years, 2 months ago


# yum update kernel
upvoted 7 times

  kitkat 1 year, 9 months ago


Although what Roldo97 mentioned above is detailed, this should also work because once new Kernel is installed it automatically becomes the
first one to boot with.
upvoted 1 times

  kitkat 1 year, 9 months ago


It would be different story if a specific version will be mentioned and we need to make that as the first one. Then we need to use the options
with grubby to set to defined kernel number.
upvoted 1 times

  sovafal192 Most Recent  1 year, 6 months ago

rpm -ivh [kernel.rpm]


###* change the default kernel: https://access.redhat.com/solutions/4326431
###* fastest to my mind:
grep ^id /boot/loader/entries/*
###* select the id of the installed kernel
grub2-set-default <ID>
upvoted 1 times

  noobasty 2 years, 5 months ago


Is this still part of syllabus?
upvoted 3 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 29/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #17 Topic 1

SIMULATION -

Create a 512M partition, make it as ext4 file system, mounted automatically under /mnt/data and which take effect automatically at boot-start.

Correct Answer: See explanation below.

# fdisk /dev/vda

+512M

# partprobe /dev/vda

# mkfs -t ext4 /dev/vda5

# mkdir -p /data

# vim /etc/fstab

/dev/vda5 /data ext4 defaults 0 0

# mount -a

  nickoftime Highly Voted  2 years, 11 months ago

lsblk (checkin empty disk)


parted /dev/vdb mkpart primary ext4 2048s 512MB
udevadm settle
mkfs.ext4 /dev/vdb1
lsblk --fs(fp..whatever u can get UUID.. for /dev/vdb1 )
append /etc/fstab
UUID=xxxx /mnt/data ext4 defaults 0 0
systemctl daemon-reload
mount -a
upvoted 5 times

  chyaba 2 years, 7 months ago


I think "parted /dev/vdb mkpart primary ext4 2048s 513MB" is correct. size will be 512MB
upvoted 3 times

  kenkct Most Recent  2 years, 1 month ago

#sudo su
#lsblk -psf (to check for empty disk)
#fdisk /dev/sd[] (format disk in question)
#n (new partition)
#p (for primary)
#Enter (use the first sector by default)
#+size 512M (to specify the size)
#Enter
#w (to write the changes)
#lsblk -psf(to verify partition has been created)
#mkfs.ext4 /dev/sd[]1 (to format the partition with ext4 file system)
#mkdir /mnt/data (to create the mount point)
#lsblk -psf (to show the UUID for the newly created file system)
#echo 'UUID=XXX /mnt/data ext4 defaults 0 0' >> /etc/fstab
#systemctl daemon-reload
#mount -a
upvoted 3 times

  STFN2019 2 years, 6 months ago


Another solution to this is to use fdisk utility so:
#fdisk -l (to check for empty disk)
#fdisk /dev/sdd (format disk in question)
#n (new partition)
#p (for primary)
#Enter (use the first sector by default)
#+size 512M (to specify the size)
#Enter
#w (to write the changes)
#fdisk -l /dev/sdd1 (to verify partition has been created)
#mkfs.ext4 /dev/sdd1 (to format the partition with ext4 file system)
#mkdir /mnt/data (to create the mount point)
#mount /dev/sdd1 (mount the partition)
#vi /etc/fstab (to configure auto mount after each boot)
Press Shift G to go to the last line and press O to start in new line in Insert mode. Enter the following (ensure you press TAB for each part of the
entry):
/dev/sdd1 /mnt/data /ext4 defaults 0 0
Exit out of the Insert mode and type: :wq!
https://www.examtopics.com/exams/redhat/ex200/custom-view/ 30/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Job done!
upvoted 4 times

  pipolo1113 3 years ago


And finally:
systemctl daemon-reload
mount -a
upvoted 2 times

  RedQuasar 3 years, 3 months ago


parted /dev/sda mkpart primary 2048s 512M
mkfs.ext4 /dev/sda1
mkdir /mnt/data2
lsblk -pf (UUID= 36721aac-2a8a-457f-927c-446bbb805753)
echo “UUID= 36721aac-2a8a-457f-927c-446bbb805753 /mnt/data2 ext4 defaults 0 0” >> /etc/fstab
upvoted 2 times

  Sameer 3 years, 3 months ago


Hi RedQuasar, was going thru ur comment and the answer posted with question. Refered to exam preparation guide of RHCSA 8 and realised i
can still use the method written in the answer. Your answer is right but the provided answer is also acceptable. Can u guide if i choose the above
answer or the method with answer is correct.
upvoted 1 times

  Roldo97 3 years, 2 months ago


Hi Sameer. In the exam, you can use any tool that you prefer to make partitions on block devices (gdisk, fdisk, parted). The only exception
may be, when thay ask you tu use an specific partition table for de device. In example: If the question says that you must use a GUID
partition table, you'll be forced to use parted o gdisk.
upvoted 2 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 31/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #18 Topic 1

SIMULATION -

Create a volume group, and set 8M as a extends. Divided a volume group containing 50 extends on volume group lv (lvshare), make it as ext4 file

system, and mounted automatically under /mnt/data. And the size of the floating range should set between 380M and 400M.

Correct Answer: See explanation below.

# fdisk

# partprobe

# pvcreate /dev/vda6

# vgcreate -s 8M vg1 /dev/vda6 -s

# lvcreate -n lvshare -l 50 vg1 -l

# mkfs.ext4 /dev/vg1/lvshare

# mkdir -p /mnt/data

# vim /etc/fstab

/dev/vg1/lvshare /mnt/data ext4 defaults 0 0

# mount -a

# df -h

  RedQuasar Highly Voted  3 years, 3 months ago

vgcreate -s 8M vg02 /dev/sda3


lvcreate -l 50 -n lv02
mkfs.ext4 /dev/mapper/vg02_lv02
mkdir /mnt/data3
lsblk -pf (UUID=…457f-446bbb805753)
echo “UUID=…457f-446bbb805753 /mnt/data3 ext4 defaults 0 0” >> /etc/fstab
upvoted 5 times

  badguy001djh 2 years, 8 months ago


Your lvcreate command lacks VG option.
upvoted 5 times

  STFN2019 2 years, 6 months ago


Yep second line should be: lvcreate -l 50 -n lv02 vg02
upvoted 3 times

  kitkat Most Recent  1 year, 9 months ago

We need to set partition size between 380M and 400M


upvoted 1 times

  kitkat 1 year, 9 months ago


50 extends of 8MB each will be close to 400MB.
upvoted 2 times

  kitkat 1 year, 9 months ago


Which means we do not need to define anything special setting vgcreate to 8M and lvcreate extends to 50 is doing what question asks for.
upvoted 1 times

  kenkct 2 years, 1 month ago


sudo su
lsblk -psf
pvcreate /dev/sd[]
vgcreate -s 8M vg1 /dev/sd[]
lvcreate -l 50 -n lvshare vg1
lsblk -psf
mkfs.ext4 /dev/mapper/vg1-lvshare
mkdir -p /mnt/data
echo '/dev/mapper/vg1-lvshare /mnt/data ext4 defaults 0 0' >> /etc/fstab
systemctl daemon-reload
mount -a
upvoted 1 times

  vira5489 2 years, 4 months ago


-- lets say we are going to work on /dev/vda3 ,
make sure this disk has no mount point,if any than unmount them
ex. umount /mnt/data

vgcreate -s 8M vg1 /dev/vda3

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 32/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

lvcreate -n lvshare -l 50 vg1


mkfs.ext4 /dev/vg1/lvshare
mkdir -p /mnt/data
vim /etc/fstab
/dev/vg1/lvshare /mnt/data ext4 defaults 0 0
mount -a
partprobe
df -h
upvoted 3 times

  xXxM__JxXx 2 years ago


hi just want to ask. what part of the command line addresses this requirement

And the size of the floating range should set between 380M and 400M
upvoted 2 times

Question #19 Topic 1

SIMULATION -

Download ftp://192.168.0.254/pub/boot.iso to /root, and mounted automatically under /media/cdrom and which take effect automatically at

boot-start.

Correct Answer: See explanation below.

# cd /root; wget ftp://192.168.0.254/pub/boot.iso

# mkdir -p /media/cdrom

# vim /etc/fstab

/root/boot.iso /media/cdrom iso9660 defaults,loop 0 0

# mount -a

mount [-t vfstype] [-o options] device dir

  jahmad0730 10 months, 1 week ago


Is this on the exam in 2023 May? Earlier post says FTP stuff is not on exam???
upvoted 1 times

  JAlley1403 6 months ago


Did you ever receive a response? I take the exam soon and would like to know how I should best prepare.
upvoted 1 times

  AdhamObada95 5 months, 3 weeks ago


I think that using wget or something like lftp to download a file from an FTP server does not equate to configuring an FTP server.
It is just a simple command to download a file anyway, so just learn it.
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 33/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #20 Topic 1

SIMULATION -

Add admin group and set gid=600 -

Correct Answer: See explanation below.

# groupadd -g 600 admin

  RedQuasar Highly Voted  3 years, 3 months ago

groupadd -g 600 admin


upvoted 9 times

  Hayder_Alobaidi Most Recent  1 year, 8 months ago

if the group already exist do this


groupmod admin --gid 600
upvoted 1 times

  zizu1 2 years, 1 month ago


to create:
sudo groupadd -g 600 admin

to verify:
grep 600 /etc/group
upvoted 1 times

  ExamNam 2 years, 1 month ago


also you can use the following to check:
cat /etc/group
upvoted 1 times

  noobmaster96 2 years, 4 months ago


To check you can use
#getent group
upvoted 2 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 34/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #21 Topic 1

SIMULATION -

Add user: user1, set uid=601 -

Password: redhat -

The user's login shell should be non-interactive.

Correct Answer: See explanation below.

# useradd -u 601 -s /sbin/nologin user1

# passwd user1

redhat

  Dadash 2 weeks, 5 days ago


In RHEL 9 standart UID start from 1000. You can't create user with UID 601
upvoted 1 times

  deepbrown 10 months, 1 week ago


useradd -u 601 -s /sbin/nologin user1 ; echo "redhat" | passwd --stdin user1
upvoted 3 times

  lgu 2 years, 5 months ago


useradd -u 601 -s /sbin/nologin user1
passwd user
(enter redhat)

cat /etc/passwd to check shell


upvoted 2 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 35/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #22 Topic 1

SIMULATION -

Add users: user2, user3.

The Additional group of the two users: user2, user3 is the admin group Password: redhat

Correct Answer: See explanation below.

# useradd -G admin user2

# useradd -G admin user3

# passwd user2

redhat

# passwd user3

redhat

  RedQuasar Highly Voted  3 years, 3 months ago

useradd -G admin user2


useradd -G admin user3
echo “redhat” | passwd --stdin user2
echo “redhat” | passwd --stdin user3
upvoted 7 times

  gunwantk Highly Voted  2 years, 5 months ago

Make steps simple, more complex commands are confusing,

[root@station ~]# cat /etc/group | grep -i admin


[root@station ~]#
[root@station ~]# groupadd admin
[root@station ~]#
[root@station ~]# useradd user2
[root@station ~]# passwd user2
[root@station ~]# useradd user3
[root@station ~]# passwd user3
[root@station ~]#
[root@station ~]#
[root@station ~]# id user2
uid=1004(user2) gid=1007(user2) groups=1007(user2)
[root@station ~]# id user3
uid=1005(user3) gid=1008(user3) groups=1008(user3)
[root@station ~]#
[root@station ~]# usermod -a -G admin user2
[root@station ~]# usermod -a -G admin user3
[root@station ~]#
[root@station ~]# id user3
uid=1005(user3) gid=1008(user3) groups=1008(user3),1006(admin)
[root@station ~]# id user2
uid=1004(user2) gid=1007(user2) groups=1007(user2),1006(admin)
[root@station ~]#
upvoted 6 times

  sugisho Most Recent  2 years, 8 months ago

[root@abc ~]# passwd user2 --stdin


Changing password for user user2.
redhat
passwd: all authentication tokens updated successfully.
[root@abc ~]#
upvoted 1 times

  sugisho 2 years, 8 months ago


useradd user2 -G admin
id user2
this syntax is vaild
upvoted 1 times

  ionix 3 years ago


for i in 2 3; do useradd -G admin user$i; echo "redhat"|passwd --stdin user$i; done
upvoted 4 times

  juliansaccount 3 years, 6 months ago


usermod -aG admin
Using just G makes it the default group
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 36/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

  cytron 3 years, 4 months ago


This is correct when you modifying existing user and adding more supplementary groups but if you creating new user you can use just -G for
supplementary/additional group.
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 37/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #23 Topic 1

SIMULATION -

Copy /etc/fstab to /var/tmp name admin, the user1 could read, write and modify it, while user2 without any permission.

Correct Answer: See explanation below.

# cp /etc/fstab /var/tmp/

# chgrp admin /var/tmp/fstab

# setfacl -m u:user1:rwx /var/tmp/fstab

# setfacl -m u:user2:--- /var/tmp/fstab

# ls -l

-rw-rw-r--+ 1 root admin 685 Nov 10 15:29 /var/tmp/fstab

  adolfoale Highly Voted  3 years, 2 months ago

# cp /etc/fstab /var/tmp/
# setfacl -m u:user1:rw- /var/tmp/fstab
# setfacl -m u:user2:--- /var/tmp/fstab
upvoted 12 times

  safodz 2 years, 5 months ago


to mainte the right I think need use cp with the -r option ?
upvoted 1 times

  Testo321 4 months, 2 weeks ago


To mainte owner/group/right it is -p option.
upvoted 1 times

  Gbecker 2 years, 11 months ago


I agree with you. The question never says that you must change owner group.
upvoted 3 times

  STFN2019 2 years, 6 months ago


Exactly. Perhaps it says with file named admin but then you never know. Will stick with adolfoale's answer for now.
upvoted 1 times

  maxim_sk Highly Voted  1 year, 8 months ago


# I think that in question is to name the file admin
cp /etc/fstab /var/tmp/admin
#to check try: cat /var/tmp/admin
setfacl -m u:user1:rw-,u:user2:--- /var/tmp/admin
#check correct permission with getfacl
getfacl /var/tmp/admin
upvoted 6 times

  14_aman Most Recent  1 year, 10 months ago


I have many doubts in this question . the question does not say for making owner to admin.
and I think question says admin and user1 give r w x permission, after seeing this question.
upvoted 1 times

  mattd81 2 years ago


Why are the setfacl changes being made to the /var/tmp/fstab folder? Isn't it just asking to change the permissions on /var/tmp?
upvoted 1 times

  vira5489 2 years, 4 months ago


-- lets assume you do not have any user yet.

useradd -M user1
useradd -M user2
cp /etc/fstab /vat/tmp/
setfacl -m u:user1:rw- /var/tmp/fstab
setfacl -m u:user2:--- /vat/tmp/fstab
upvoted 2 times

  xXxM__JxXx 2 years ago


why include do not create home on the user creation? is this required?
upvoted 1 times

  gunwantk 2 years, 5 months ago


Please correct the question statement.

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 38/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

upvoted 3 times

Question #24 Topic 1

SIMULATION -

Configure a task: plan to run echo "file" command at 14:23 every day.

Correct Answer: See explanation below.

(a) Created as administrator

# crontab -u natasha -e

23 14 * * * /bin/echo "file"

(b)Created as natasha

# su - natasha

$ crontab -e

23 14 * * * /bin/echo "file"

  Stachomir Highly Voted  2 years, 8 months ago

If you want to see output in your console:


ps -a (e.x. tt1)
crontab -e
23 14 * * * echo "file" > /dev/tt1
upvoted 5 times

  xXxM__JxXx 2 years ago


i tried to tweak the time and check if it will create an output on my terminal. but it does not show after the time pass. does crontab follow local
time, universal time or rtc time?
upvoted 1 times

  14_aman Most Recent  1 year, 10 months ago

Configure a task: plan to run echo "file" command at 14:23 every day.
question never say run echo " file" in natasha user. please confirm i have to take exam next month.
upvoted 3 times

  mattd81 1 year, 10 months ago


If you need help remembering the crontab details run:
cat /etc/crontab
It will remind you what each column is for, minute, hour, etc
upvoted 4 times

  Ares23 2 years, 2 months ago


cat <<EOF> /etc/cron.d/echo_file
23 14 * * * /usr/bin/echo 'file'
EOF
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 39/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #25 Topic 1

SIMULATION -

Configure a default software repository for your system.

One YUM has already provided to configure your system on http://server.domain11.example.com/pub/ x86_64/Server, and can be used normally.

Correct Answer: See explanation below.

Yum-config-manager --add-repo=http://content.example.com/rhel7.0/x86-64/dvd‫ג‬€ is to generate a file vim

content.example.com_rhel7.0_x86_64_dvd.repo, Add a line gpgcheck=0

Yumcleanall -

Yumrepolist -

Almost 4305 packages are right, Wrong Yum Configuration will lead to some following questions cannot be worked out.

  QuangTruong Highly Voted  2 years, 9 months ago

#dnf repolist
#cd /etc/yum.repos.d
#vi local-rhel8.repo
[LocalRepo_BaseOS]
name=LocalRepo_BaseOS
metadata_expire=-1
enabled=1
gpgcheck=0
baseurl=http://server.domain11.example.com/pub/ x86_64/Server/BaseOS/

[LocalRepo_AppStream]
name=LocalRepo_AppStream
enabled=1
gpgcheck=0
baseurl=http://server.domain11.example.com/pub/ x86_64/Server/AppStream/

save and exit


#dnf clean all
#dnf repolist
upvoted 14 times

  urWaifu 1 year, 6 months ago


I already had 1 try with the exam and you have to create a new file in /etc/yum.repos.d/ in order to use the repos and install stuff.
This is the most accurate answer
upvoted 5 times

  sazz82 Highly Voted  2 years, 8 months ago

dnf config-manager --add-repo=http://server.domain11.example.com/pub/ x86_64/Server/BaseOs


add gpgcheck=0 in the config file
upvoted 11 times

  jahmad0730 Most Recent  10 months ago

where do you get the URL for this?


yum-config-manager --add-repo="XXXXXXX"

???
upvoted 2 times

  mattd81 1 year, 10 months ago


Are we supposed to add the repo along with the other repos already installed or do we remove the other repos and only run this for the default
repo?
upvoted 2 times

  kenkct 2 years, 1 month ago


sudo su
yum config-manager --add-repo [URL]
yum repolist (To obtain the Repo ID and Repo Name)
yum config-manger --enable [Repo ID]
vim /etc/yum.conf (edit the yum.conf to enable non-signed repo)
gpgcheck=0 (:wq! save this value and quit)
upvoted 4 times

  Stunomatic 1 year, 4 months ago


I think when we use --enable we set that repo default.

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 40/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

upvoted 1 times

  adolfoale 3 years, 2 months ago


In RHEL 8:
# subscription-manager repos --list
# subscription-manager repos --enable=rhel-8-for-x86_64-sap-netweaver-rpms
upvoted 6 times

Question #26 Topic 1

SIMULATION -

Adjust the size of the Logical Volume.

Adjust the size of the vo Logical Volume, its file system size should be 290M. Make sure that the content of this system is complete.

Note: the partition size is rarely accurate to the same size as required, so in the range 270M to 320M is acceptable.

Correct Answer: See explanation below.

Addition -

df -hT

lvextend -L +100M /dev/vg0/vo

Lvscan -

xfs_growfs /home/ //home is the mounted directory of the LVM, this step just need to do in the practice environment, and test EXT4 does not

need this step. resize2fs /dev/vg0/vo// use this command to update in examination. df -hT

OR -

Subtraction -

e2fsck -f/dev/vg0/vo

umount /home

resize2fs /dev/vg0/vo // the final required partition capacity is 100M lvreduce -l 100M /dev/vg0/vo mount /dev/vg0/vo/home df -hT

  kamilzeynal7 Highly Voted  3 years, 2 months ago

rhel8
umount /dev/mapper/my_vol2-lvshare /mnt/data
lvreduce -r -L 290M /dev/my_vol2/lvshare
upvoted 8 times

  kenkct Highly Voted  2 years, 1 month ago

sudo su
df -hT (list the volume)
umount [logical volume] (unmount the logical volume)
lvresize -r -L 290M [logical Volume] (-r to resize, -L to specify the size)
mount -a (remount the volume)
df -hT (to verify the volume)
upvoted 6 times

  cb52 Most Recent  2 years, 2 months ago

lvresize -r -L 290M /dev/vo/lvshare


lsblk
mount -a
upvoted 5 times

  thulasi 3 years, 1 month ago


On what filesystem
upvoted 4 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 41/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #27 Topic 1

SIMULATION -

Create User Account.

Create the following user, group and group membership:

Adminuser group -

User natasha, using adminuser as a sub group

User Harry, also using adminuser as a sub group

User sarah, can not access the SHELL which is interactive in the system, and is not a member of adminuser, natasha harry sarah password is

redhat.

‫¼ן‬
‫¼ן‬

Correct Answer: See explanation below.

groupadd adminuser

useradd natasha -G adminuser

useradd haryy -G adminuser

useradd sarah -s /sbin/nologin

Passwd user name // to modify password or echo redhat | passwd --stdin user name id natasha // to view user group.

  PENNSHARK 2 months, 3 weeks ago


lets assume natasha harry and sarah arent made yet which you can check using id "their usernames" lets also assume adminuser isnt created yet if
it isnt you can run grep adminuser /etc/group to check
if they arent
groupadd adminuser
useradd -G adminuser natasha
useradd -G adminuser Harry
useradd -s /sbin/nologin sarah
passwd natasha
passwd Harry
passwd sarah
grep adminuser /etc/group to verify if the two users are in there
upvoted 1 times

  deepbrown 10 months, 1 week ago


# groupadd Adminuser
# for i in natasha Harry ; do useradd -G Adminuser $i ; echo "redhat" | passwd --stdin $i ; done
# useradd -s /sbin/nologin sarah ; echo "redhat" | passwd --stdin sarah
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 42/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #28 Topic 1

SIMULATION -

Configure /var/tmp/fstab Permission.

Copy the file /etc/fstab to /var/tmp/fstab. Configure var/tmp/fstab permissions as the following:

Owner of the file /var/tmp/fstab is Root, belongs to group root

File /var/tmp/fstab cannot be executed by any user

User natasha can read and write /var/tmp/fstab

User harry cannot read and write /var/tmp/fstab

All other users (present and future) can read var/tmp/fstab.

Correct Answer: See explanation below.

cp /etc/fstab /var/tmp/

/var/tmp/fstab view the owner setfacl -m u:natasha:rw- /var/tmp/fstab setfacl -m u:haryy:--- /var/tmp/fstab

Use getfacl /var/tmp/fstab to view permissions

  jahute27 Highly Voted  2 years, 6 months ago

cp /etc/fstab /var/tmp/fstab
chown root:root /var/tmp/fstab
chmod 770 /var/tmp/fstab
setfacl -m u:natasha:rw- /var/tmp/fstab
setfacl -m u:harry:rw- /var/tmp/fstab
setfacl -m o::r--,m:r /var/tmp/fstab
getfacl /var/tmp/fstab
upvoted 7 times

  kitkat 1 year, 9 months ago


harry is not suppose to have rw permissions as per the question.

setfacl -m u:harry:--- /var/tmp/fstab


upvoted 2 times

  midhun_das 2 years, 4 months ago


770 or 660 ?
upvoted 4 times

  maxam20 1 month, 3 weeks ago


chmod 664 /var/tmp/fstab
upvoted 1 times

  14_aman 1 year, 10 months ago


question says all other users can read [r=4 ]
upvoted 1 times

  mattd81 Highly Voted  1 year, 11 months ago

Wouldn't it be chmod 664 /var/tmp/fstab


It says all other users should have read access but non should be able to execute??
upvoted 6 times

  riddie78 5 months, 4 weeks ago


can not be executed by any user... execute is 1 so 1 is taken from every ugo
natasha can read and write ...setfacl -m u:user:rw- /var/tmp/fstab
harry cannot read and write ...setacl -m u:user:--- /var/tmp/fstab
all other users can write (444)... I dont think this means other as in users,groups,others
so setfacl 000 for harry ... if they can write they can read so 666??? idk
upvoted 1 times

  riddie78 5 months, 4 weeks ago


sorry for confusion, and write is 222 for write only so read and write is 666
upvoted 1 times

  kenkct Most Recent  2 years, 1 month ago

sudo su
cp /etc/fstab /var/tmp/fstab
chown root:root /var/tmp/fstab
chmod oug-x /var/tmp/fstab
setfacl -m u:natasha:rw /var/tmp/fstab
setfacl -m u:harry:-- /var/tmp/fstab

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 43/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

chmod o+r /var/tmp/fstab


getfacl /var/tmp/fstab (to verify)
upvoted 6 times

  xXxM__JxXx 2 years ago


i used chmod o-w to make sure that others has no write access.
upvoted 1 times

Question #29 Topic 1

SIMULATION -

Configure a cron Task.

User natasha must configure a cron job, local time 14:23 runs and executes: */bin/echo hiya every day.

Correct Answer: See explanation below.

crontab ‫ג‬€"e ‫ג‬€"u natasha

23 14/bin/echo hiya

crontab -l -u natasha // view

systemctlenable crond

systemcdlrestart crond

  rsisalima 4 months, 4 weeks ago


crontab -e -u natasha
23 14 * * * /bin/echo hiya
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 44/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #30 Topic 1

SIMULATION -

Create a Shared Directory.

Create a shared directory /home/admins, make it has the following characteristics:

/home/admins belongs to group adminuser

This directory can be read and written by members of group adminuser Any files created in /home/ admin, group automatically set as adminuser.

Correct Answer: See explanation below.

mkdir /home/admins

chgrp -R adminuser /home/admins

chmodg+w /home/admins

chmodg+s /home/admins

  jahute27 Highly Voted  2 years, 6 months ago

mkdir -p /home/admins
groupadd adminuser
chown :adminuser /home/admins
setfacl -m g:adminuser:rwx /home/admins
chmod g+s /home/admins/
upvoted 8 times

  sazz82 11 months ago


chmod -R g+s /home/admins/ > what about this option ?
upvoted 1 times

  Brabus 1 year, 1 month ago


This directory can be read and written, so setfacl -m g:adminuser:rw- /home/admins
upvoted 3 times

  kitkat Most Recent  1 year, 9 months ago

mkdir -p /home/admins
cd /home
chown :adminuser /home/admins
chmod g+rws/home/admins

--to test
useradd -g adminuser test
su - test
cd /home/admins
touch testfile
ls -ltr
upvoted 3 times

  Javier_Cruz 1 year, 11 months ago


groupadd adminuser
mkdir /home/admins
chown :adminuser /home/admins
chmod 770 /home/admins
chmod g+s /home/admins

With any user in adminuser group


touch /home/admins/file
ls -ltr /home/admins
-rw-r--r--. 1 test1 adminuser 0 Apr 9 20:19 file
upvoted 1 times

  kenkct 2 years ago


$ sudo su
# mkdir -p /home/admins
# groupadd adminuser
# chown :adminuser /home/admins
# chmod g+rws /home/admins
# getfacl /home/admins
upvoted 3 times

  kenkct 2 years, 1 month ago


$ sudo su
# mkdir /home/admins
# groupadd adminuser
# chown :adminuser /home/admins
https://www.examtopics.com/exams/redhat/ex200/custom-view/ 45/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

# chmod g+rws /home/admins


# getfacl /home/admins
upvoted 1 times

  Harvard 2 years, 8 months ago


why not use chown :adminuser /admins

as opposed to chgrp?
upvoted 2 times

  tester27 1 year, 10 months ago


they're the same
upvoted 1 times

  blackmrx 2 years, 9 months ago


mkdir /home/admins
groupadd adminuser
chgrp adminuser /home/admins
chmod g=rwx /home/admins
chmod g+s /home/admins

To test for it :
useradd -g adminuser test
sudo -u test touch /home/admins/test
sudo -u test ls
upvoted 3 times

  kitkat 1 year, 9 months ago


question only talks about read, write and there is no mention of execute. Why were we giving execute permission ?
upvoted 2 times

  Dewitts68 10 months, 2 weeks ago


execute permissions on a folder = Can Access
upvoted 1 times

  dax 3 years, 3 months ago


mkdir /home/admins
groupadd adminuser
ls -ld /home/admins
chgrp adminuser /home/admins
ls -ld /home/admins
chmod g+w /home/admins
upvoted 3 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 46/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #31 Topic 1

SIMULATION -

Install the Kernel Upgrade.

Install suitable kernel update from:

http://server.domain11.example.com/pub/updates.

Following requirements must be met:

Updated kernel used as the default kernel of system start-up.

The original kernel is still valid and can be guided when system starts up.

Correct Answer: See explanation below.

Using the browser open the URL in the question, download kernel file to root or home directory. uname ‫ג‬€"r// check the current kernel version

rpm ‫ג‬€"ivh kernel-*.rpm vi /boot/grub.conf// check

Some questions are: Install and upgrade the kernel as required. To ensure that grub2 is the default item for startup.

Yum repo : http://content.example.com/rhel7.0/x86-64/errata

OR -

uname -r // check kernel

Yum-config-manager --add-repo=‫ג‬€http://content.example.com/rhel7.0/x86-64/ errata‫ג‬€

Yum clean all -

Yum list kernel// install directly

Yum -y install kernel// stuck with it, do not pipe! Please do not pipe!

Default enable new kernel grub2-editenv list// check

Modify grub2-set-default ‫ג‬€kernel full name‫ג‬€

Grub2-mkconfig ‫ג‬€"o/boot/grub2/grub.cfg// Refresh

  PENNSHARK 2 months, 3 weeks ago


wget http://server.domain11.example.com/pub/updates/kernel-package.rpm
sudo yum install kernel-package.rpm
grub2-mkconfig -o /boot/grub2/grub.cfg
grubby --info=ALL (to check which kernel index it is)
grubby --set-default-index (change to what index the kernel is)
uname -a (to see current kernel)
reboot
uname -a to check for proof
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 47/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #32 Topic 1

SIMULATION -

Binding to an external validation server.

System server.domain11.example.com provides a LDAP validation service, your system should bind to this service as required:

Base DN of validation service is dc=example,dc=com

LDAP is used for providing account information and validation information Connecting and using the certification of

http://server.domain11.example.com/pub/

EXAMPLE-CA-CERT to encrypt -

After the correct configuration, ldapuser1 can log into your system, it does not have HOME directory until you finish autofs questions, ldapuser1

password is password.

Correct Answer: See explanation below.

yum -y install sssd authconfig-gtk krb5-workstation authconfig-gtk // open the graphical interface

Modify user account database to ldap, fill up DN and LDAP SERVER as questions required, use TLS to encrypt connections making tick, write

http:// server.domain11.example.com/pub/EXAMPLE-CA-CERT to download ca, authentication method choose ldap password.

You can test if the ldapuser is added by the following command:

Id ldapuser1 -

Note: user password doesn't not need to set

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 48/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #33 Topic 1

SIMULATION -

Configure NTP.

Configure NTP service, Synchronize the server time, NTP server: classroom.example.com

Correct Answer: See explanation below.

Configure the client:

Yum -y install chrony -

Vim /etc/chrony.conf -

Add: server classroom.example.com iburst

Start: systemctl enable chronyd -

systemctl restart chronyd

Validate: timedatectl status

  Stachomir Highly Voted  2 years, 8 months ago

yum -y install chrony


systemctl enable --now chronyd
vim etc/chrony.conf
(change on server classroom.example.com iburs)
systemctl reload chronyd
timedatectl set-ntp true
upvoted 6 times

  Rahul95 Most Recent  9 months, 2 weeks ago

dnf install chrony* -y


vi /etc/chrony.conf
server <servername or IP> iburst
systemctl restart chronyd.service
chronyc sources #to verify
upvoted 2 times

  kenkct 2 years ago


sudo su
yum install chrony
echo 'server [url] iburst' >> /etc/chrony.conf
systemctl enable --now chronyd
systemctl start chronyd
timedatectl set-ntp true
systemctl restart chronyd
chronyc sources -v
timedatectl
upvoted 2 times

  KimoHasNoBalls 1 year, 7 months ago


when i do chronyc sources after setting /etc/chrony.conf to :
classroom.example.com iburst

I do not get any results. Does anyone else ?


upvoted 1 times

  brahmimedamine 2 years, 1 month ago


yum install chrony -y
vim etc/chrony.conf
(change on server classroom.example.com iburs)
systemctl enable --now chronyd
systemctl start chronyd
timedatectl set-ntp true
chronyc sources -c
timedatectl
upvoted 2 times

  RedQuasar 3 years, 3 months ago


yum -y install chrony
systemctl enable cronyd.service
systemctl start chronyd.service

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 49/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

timedatectl -H classroom.example.com
timedatectl set-ntp on
upvoted 1 times

  badguy001djh 2 years, 7 months ago


timedatectl -H [user@]hostname means it will connect to the remote host with ssh and execute the operation remotely. So what you did is
wrong at all.
upvoted 2 times

  ms200 3 years, 2 months ago


why timedatectl -H classroom.example.com?
upvoted 1 times

  unbreakble 2 years, 11 months ago


I do not understand it too
upvoted 1 times

  sazz82 2 years, 10 months ago


timedatactl -H works but will not survive a reboot
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 50/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #34 Topic 1

SIMULATION -

Configure autofs.

Configure the autofs automatically mount to the home directory of LDAP, as required: server.domain11.example.com use NFS to share the home

to your system. This file system contains a pre configured home directory of user ldapuserX.

Home directory of ldapuserX is:

server.domain11.example.com /home/guests/ldapuser

Home directory of ldapuserX should automatically mount to the ldapuserX of the local /home/guests Home directory's write permissions must be

available for users ldapuser1's password is password

Correct Answer: See explanation below.

yum install -y autofs

mkdir /home/rehome

/etc/auto.master

/home/rehome/etc/auto.ldap

Keep then exit -

cp /etc/auto.misc /etc/auto.ldap

/etc/auto.ldap

ldapuserX -fstype=nfs,rw server.domain11.example.com:/home/guests/

Keep then exit -

systemctl start autofs

systemctl enable autofs

su - ldapuserX// test

If the above solutions cannot create files or the command prompt is -bash-4.2$, it maybe exist multi-level directory, this needs to change the

server.domain11.example.com:/home/guests/ to server.domain11.example.com:/home/guests/ldapuserX. What is multi-level directory? It

means there is a directory of ldapuserX under the /home/guests/ldapuserX in the questions. This directory is the real directory.

  PENNSHARK 2 months, 3 weeks ago


yum install autofs nfs-utils -y

/home/guests /etc/auto.ldap
ldapuserX -fstype=nfs,rw,nosuid,softserver.domain11.example.com:/home/guests/ldapuserX

chown -R ldapuser1:ldapuser1 /home/guests/ldapuserX


chmod -R 700 /home/guests/ldapuserX

systemctl enable --now autofs


upvoted 1 times

  VforVodoo 7 months, 2 weeks ago


vi /etc/auto.master
add "/home/guests /etc/auto.ldap

vi /etc/auto.ldap
add "ldapuserX server.domain11.example.com:/home/guests/ldapuserX"

#No need to specify -fstype since it was NFS, see 'man autofs'
upvoted 1 times

  VforVodoo 7 months, 2 weeks ago


vi /etc/auto.master
add "/home/guests /etc/auto.ldap

vi /etc/auto.ldap
add "ldapuserX server.domain11.example.com:/home/guests/ldapuserX"

#No need to specify -fstype since it was NFS, see 'man autofs'
upvoted 1 times

  Hayder_Alobaidi 1 year, 8 months ago


Is this still valid in REL8 ?
upvoted 3 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 51/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

  urWaifu 1 year, 6 months ago


I had 1 try on the exam and yes, we have to set a home directory for a user using autofs
upvoted 2 times

  Stachomir 2 years, 8 months ago


vim /etc/auto.master.d/demo.autofs
(/home/guestes /etc/auto.demo)
vim /etc/auto.demo
(ldapuserX -fstype=nfs,rw,sync server.domain11.example.com:/home/guests/ldapuserX)
systemctl enable --now autofs
upvoted 4 times

  cloudyhr 2 years, 2 months ago


we also have to edit /etc/exports and added below line
/home/guests/ldapuserX 192.168.0.0/24(rw,sync,no_root_squash)
upvoted 2 times

Question #35 Topic 1

SIMULATION -

Configure a user account.

Create a user iar uid is 3400. Password is redhat

‫¼ן‬

Correct Answer: See explanation below.

useradd -u 3400 iar

passwd iar

  rajat3204 4 months, 3 weeks ago


useradd -u 3400 iar ; echo "redhat" | passwd --stdin iar
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 52/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #36 Topic 1

SIMULATION -

Add a swap partition.

Adding an extra 500M swap partition to your system, this swap partition should mount automatically when the system starts up. Don't remove and

modify the existing swap partitions on your system.

Correct Answer: See explanation below.

fdisk -cu /dev/vda// in the way of expanding the partition, don't make main partition partx ‫ג‬€"a /dev/vda mkswap /dev/vdax swapon /dev/vdax

swapon ‫ג‬€"s vi /etc/fstab

/dev/vdaxswapswapdefaults0 0

mount -a

  Testo321 4 months, 2 weeks ago


sudo parted /dev/sdb print (partition table unknown)
sudo parted /dev/sdb mklabel gpt
sudo parted /dev/sdb mkpart swap1 linux-swap 2084s 501M
sudo parted /dev/sdb print
sudo udevadm settle
sudo mkswap /dev/sdb
sudo vim /etc/fstab
UUID=XXXXXXXXXXXXXXXXXXX swap swap defaults 0 0
sudo systemctl daemon-reload
sudo swapon -a
sudo swapon --show
upvoted 1 times

  cloudyhr 2 years, 2 months ago


create a partition for given size(500M)
#fdisk /dev/sdb
#n
#+500M
#w
#partprobe
check the present free memory
#free -h
#mkswap /dev/sdb5
#swapon /dev/sdb5
check the swap space and compai with privious value
#free -h

exit /etc/fstab and add below line


/dev/sdb5 swap swap defaults 0 0
wright and exit /etc fstab

# swapon -a
upvoted 2 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 53/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #37 Topic 1

SIMULATION -

Search files.

Find out files owned by jack, and copy them to directory /root/findresults

Correct Answer: See explanation below.

mkdir/root/findfiles

find / -user jack -exec cp -a {} /root/findfiles/ \; ls /root/findresults

  kenkct Highly Voted  2 years ago

sudo su
mkdir /root/findresults (create folder if doesn't exist)
find / -user jack -type f -exec cp {} /root/findresults/ \;
ls /root/findresults (to verify)
upvoted 9 times

  wizojlo Most Recent  2 weeks, 5 days ago

I have heard from several people that they encountered a slightly modified version of this question, where it was required to include all files with
SUID permission. Just add -perm u=s in the command to do so. One person also had this question made so that it must be made into a shell script.
So take note ;)
upvoted 1 times

  schwarztrinker 2 years ago


sudo -i
for file in $(find / -user jack -type f); do cp $file /root/findresults/; done
upvoted 1 times

  brahmimedamine 2 years, 1 month ago


find / -user jack -type f -exec cp -rpvf {} /root/findresults\; 2> /dev/null
upvoted 1 times

  cb52 2 years, 2 months ago


mkdir -p /root/findresults
find / -user jack -type f -exec cp -avrf {} /root/findresults/ \;
ls -l /root/findresults
upvoted 2 times

  ifbaibz 2 years, 3 months ago


mkdir /root/findresults
find / -user jack -type f -exec cp -a {}/root/findresults/\:
ls /root/findresults
upvoted 1 times

  vira5489 2 years, 4 months ago


useradd -m jack
mkdir /root/findresults
find / -u jack -type f -exec cp -rfp {} /root/findresults \;
upvoted 1 times

  ANI_04 2 years, 5 months ago


Can't we just do " find / -u jack -type f >> /root/findfiles " ?
upvoted 1 times

  sirasdf 1 year, 8 months ago


No that won't copy the files that will just copy the results from the find command to a file. The solution is: find / -type f -user jack -exec cp -v {}
/root/findresults \;
upvoted 1 times

  sugisho 2 years, 8 months ago


[root@abc ~]# find / -user jack -type f -exec cp -rp {} /root/findfiles/ \;
find: ‘/proc/3337/task/3337/fdinfo/6’: No such file or directory
find: ‘/proc/3337/fdinfo/7’: No such file or directory
cp: cannot create regular file '/root/findfiles/': Not a directory
cp: cannot create regular file '/root/findfiles/': Not a directory
cp: cannot create regular file '/root/findfiles/': Not a directory
cp: cannot create regular file '/root/findfiles/': Not a directory

# find / -user jack -type f -exec cp -rp {} /root/findfiles/\;


find: missing argument to `-exec'
upvoted 3 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 54/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

  Stachomir 2 years, 8 months ago


cp -rfp $(find / -type f -user jack) /root/findfiles/
upvoted 1 times

  xXxM__JxXx 2 years ago


whats the negative impact if i don't include -type f in the command?
upvoted 1 times

  Leepipes101 3 years ago


find / -user jack -exec cp -rfp /root/findfiles/ {} \;
upvoted 1 times

  rsebayang 3 years, 6 months ago


find / -user jack -exec cp -rfp {} /root/findfiles/
upvoted 1 times

  cytron 3 years, 4 months ago


You've forgotten the line termination \;
Line should look like this
find / -user jack -exec cp -rfp {} /root/findfiles/ \;
# RHEL8
upvoted 2 times

  danielmaziarczyk 3 years, 3 months ago


Also should be -type f "for files only"
find / -user test -type f -exec cp -rp {} /root/findfiles/ \;
upvoted 2 times

  danielmaziarczyk 3 years, 3 months ago


mistake should be: find / -user jack -type f -exec cp -rp {} /root/findfiles/ \
upvoted 4 times

  ms200 3 years, 2 months ago


miss ; at the the end of the line
upvoted 1 times

  PTom 3 years ago


When you search for files only why do you need -r for cp command.
The cp -r mean recursively copy directories. It's not an error but why?
upvoted 4 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 55/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #38 Topic 1

SIMULATION -

Search a String -

Find out all the columns that contains the string seismic within /usr/share/dict/words, then copy all these columns to /root/lines.tx in original

order, there is no blank line, all columns must be the accurate copy of the original columns.

Correct Answer: See explanation below.

grep seismic /usr/share/dict/words > /root/lines.txt

  KimoHasNoBalls 1 year, 7 months ago


Do they want "rows" or "columns" ? No idea how to find and redirect columns but rows is easy
upvoted 1 times

  14_aman 1 year, 10 months ago


IF I do run this command : grep seismic -w /usr/share/dict/words > /root/lines.tx .
please explain . Am I saying right ?
upvoted 1 times

  noobmaster96 2 years, 4 months ago


cat /usr/share/dict/words | grep seismic > /lines.tx
upvoted 1 times

  STFN2019 2 years, 6 months ago


grep seismic /usr/share/dict/words > /root/lines.tx
cat /root/lines.tx
upvoted 2 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 56/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #39 Topic 1

SIMULATION -

Create a backup -

Create a backup file named /root/backup.tar.bz2, contains the content of /usr/local, tar must use bzip2 to compress.

Correct Answer: See explanation below.

cd /usr/local

tar ‫ג‬€"jcvf /root/backup.tar.bz2

mkdir /test

tar ‫ג‬€"jxvf /root/backup.tar.bz2 ‫ג‬€"C /test// Decompression to check the content is the same as the /usr/loca after

If the questions require to use gzip to compress. change ‫ג‬€"j to ‫ג‬€"z.

  adolfoale Highly Voted  3 years, 2 months ago

# tar -cjvf /root/backup.tar.bz2 /usr/local


upvoted 30 times

  lordstans 2 years, 9 months ago


This is the right answer
upvoted 3 times

  gunwantk 2 years, 5 months ago


Simple to understand and execute,

[root@station ~]# yum install bzip2


[root@station ~]# tar -cvf /root/backup.tar /usr/local/
[root@station ~]# du -sh /root/backup.tar
20K /root/backup.tar
[root@station ~]# bzip2 /root/backup.tar
[root@station ~]# du -sh /root/backup.tar.bz2
4.0K /root/backup.tar.bz2
[root@station ~]#
upvoted 4 times

  Hmenu0s 1 year, 8 months ago


I don't think this is right answer as the question explicitly asks "tar must use bzip2 to compress". Apart from that the answer provided is
perfectly valid.
upvoted 2 times

  VforVodoo 7 months, 2 weeks ago


file /root/backup.tar.bz2 ##to check file information, it should show "bzip2 compressed data..."
upvoted 1 times

  hitode Most Recent  6 months, 3 weeks ago


#tar -cavf /root/backup.tar.bz2 /usr/local
upvoted 1 times

  Gustavo_13 2 years, 1 month ago


tar -jcvf /root/backup.tar.bz2 /usr/local
upvoted 2 times

  Hammer84 2 years, 4 months ago


tar -cjf /root/backup.tar.bz2 /usr/local
upvoted 4 times

  brahmimedamine 2 years, 4 months ago


can you explain more please
upvoted 1 times

  Ares23 2 years, 10 months ago


tar -cvf /root/backup.tar /usr/local && bzip2 /root/backup.tar
upvoted 3 times

  ms200 3 years, 2 months ago


# tar -cjvf /root/backup.tar /usr/local
# bzip2 backup.tar
upvoted 3 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 57/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

  Rizos 3 years, 4 months ago


Answer for RHEL8

# cd /usr/local
# tar -jcvf /root/backup.tar.bz2 /usr/local
# mkdir /test
# tar -jxcf /root/backup.tar.bz2 -C /usr/local

If you do it the way the original answer says it will return the "cowardly refusing" error
upvoted 2 times

  Rizos 3 years, 4 months ago


Last command should be: tar -jxcf /root/backup.tar.bz2 -C /test
upvoted 2 times

Question #40 Topic 1

SIMULATION -

Create a logical volume -

Create a new logical volume as required:

Name the logical volume as database, belongs to datastore of the volume group, size is 50 PE.

Expansion size of each volume in volume group datastore is 16MB.

Use ext3 to format this new logical volume, this logical volume should automatically mount to /mnt/database

Correct Answer: See explanation below.

fdisk -cu /dev/vda// Create a 1G partition, modified when needed partx ‫ג‬€"a /dev/vda pvcreate /dev/vdax vgcreate datastore /dev/vdax ‫ג‬€"s

16M lvcreate‫ג‬€" l 50 ‫ג‬€"n database datastore mkfs.ext3 /dev/datastore/database mkdir /mnt/database mount /dev/datastore/database

/mnt/database/ df ‫ג‬€"Th vi /etc/fstab

/dev/datastore /database /mnt/database/ ext3 defaults 0 0 mount ‫ג‬€"a

Restart and check all the questions requirements.

  ionix Highly Voted  2 years, 12 months ago

# vgcreate -s 16M datastore /dev/sdxx


# lvcreate -l 50 -n database datastore
# lvs
# mkdir /mnt/database
# mkfs.ext3 /dev/datastore/database
# echo "/dev/datastore/database /mnt/database/ ext3 defaults 0 0" >> /etc/fstab
# mount -a
# df -h
upvoted 18 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 58/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #41 Topic 1

SIMULATION -

Configure your Host Name, IP Address, Gateway and DNS.

Host name: dtop5.dn.ws.com -

IP Address: 172.28.10.5/4 -

Gateway: 172.28.10.1 -

DNS: 172.28.10.1 -

Correct Answer: See explanation below.

1. Configure Host Name

vim /etc/sysconfig/network NETWORKING=yes HOSTNAME=dtop5.dn.ws.com GATEWAY=172.28.10.1

2. Configure IP Address, Gateway and DNS

Configure the network by Network Manager:

Note: Please remember to choose two options:

Connect automatically -

Available to all users -

Click "Apply", save and exit, and restart your network services:

# Service network restart

3. Validate these profiles:

a) Check gateway: # vim / etc / sysconfig / network

NETWORKING=yes -

HOSTNAME=dtop5.dn.ws.com -

GATEWAY=172.28.10.1 -

b) Check Host Name: # vim /etc/hosts

c) Check DNS: # vim /etc/resolv.conf

# Generated by NetworkManager

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 59/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Search dn.ws.com -

Nameserver 172.28.10.1 -

d) Check Gateway: # vim /etc/sysconfig/network-scripts/ifcfg-eth0

  afloret 2 weeks, 2 days ago


# hostnamectl hostname dtop5.dn.ws.com
# nmcli con add con-name net1 type ethernet ifname eth0 \
ipv4.addresses 172.28.10.5/24 ipv4.dns 172.28.10.1 \
ipv4.gateway 172.28.10.1 ipv4.method manual
# nmcli con up net1
OR
Modify --> /etc/NetworkManager/system-connections/"IFNAME".nmconnection
upvoted 1 times

  MichaelChapoco 4 months, 1 week ago


nmcli con add con-name "Exam" ifname enx1x type ethernet ipv4.addresses 172.28.10.5/24 ipv4.gateway 172.28.10.1 ipv4.dns 172.28.10.1
ipv4.method manual connection.autoconnect yes
upvoted 2 times

  MichaelChapoco 4 months, 1 week ago


hostnamectl set-hostname dtop5.dn.ws.com
hostnamectl (verify)
ip addr show (verify)
upvoted 2 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 60/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #42 Topic 1

SIMULATION -

Create a 2G swap partition which take effect automatically at boot-start, and it should not affect the original swap partition.

Correct Answer: See explanation below.

# fdisk /dev/sda

(check Partition table)

(create new partition: press e to create extended partition, press p to create the main partition, and the extended partition is further divided into

logical partitions)

Enter -

+2G t

8I

82

W-

partx -a /dev/sda

partprobe

mkswap /dev/sda8

Copy UUID -

swapon -a

vim /etc/fstab

UUID=XXXXX swap swap defaults 0 0

(swapon -s)

  MichaelChapoco 4 months, 1 week ago


free -m
lsblk
gdisk /dev/nvmxx
n
1
(default)
+2G
8e00
w
partprobe
mkswap /dev/nvmxx
vim /etc/fstab
/dev/nvmxx swap swap defaults 0 0
:wq
swapon -a
upvoted 1 times

  lgu 2 years, 5 months ago


fdisk /dev/sdX
n (new)
p (primary)
enter
+2G
t
82
wq

partprobe or reboot

free -m

mkswap /dev/sdX1

echo "/dev/sdX1 swap swap default 0 0"

swapon -a
free -m
https://www.examtopics.com/exams/redhat/ex200/custom-view/ 61/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

upvoted 2 times

  kitkat 1 year, 8 months ago


echo "/dev/sdX1 swap swap defaults 0 0" >> /etc/fstab
upvoted 2 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 62/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #43 Topic 1

SIMULATION -

Please open the ip_forward, and take effect permanently.

Correct Answer: See explanation below.

vim /etc/sysctl.conf net.ipv4.ip_forward = 1

sysctl ‫ג‬€"w (takes effect immediately)

If no ‫ג‬€sysctl.conf‫ג‬€ option, use these commands:

sysctl ‫ג‬€"a |grep net.ipv4

sysctl ‫ג‬€"P net.ipv4.ip_forward = 1

sysctl -w

  cytron Highly Voted  3 years, 4 months ago

There is no option -P in RHEL8. You need to use the -w option followed by the argument
sysctl -w net.ipv4.ip_forward=1
NOTE: No space before or after "=" sign.
upvoted 9 times

  kitkat 1 year, 9 months ago


Would this survive reboot? Remember exam needs all changes that survives reboot.
upvoted 2 times

  Testo321 4 months, 2 weeks ago


No,
This will
echo net.ipv4.ip_forward=1 >> /etc/sysctl.conf
sysctl -p
upvoted 1 times

  sugisho Highly Voted  2 years, 7 months ago

[root@station ~]# sysctl -a | grep net.ipv4.ip_forward


net.ipv4.ip_forward = 0
net.ipv4.ip_forward_update_priority = 1
net.ipv4.ip_forward_use_pmtu = 0
[root@station ~]# sysctl -w net.ipv4.ip_forward=1
net.ipv4.ip_forward = 1
[root@station ~]# sysctl -a | grep net.ipv4.ip_forward
net.ipv4.ip_forward = 1
net.ipv4.ip_forward_update_priority = 1
net.ipv4.ip_forward_use_pmtu = 0
[root@station ~]#
upvoted 8 times

  tinythings Most Recent  12 months ago

echo "net.ipv4.ip_forward = 1" > /etc/sysctl.d/ipforward.conf


systemctl reboot
upvoted 1 times

  kenkct 2 years ago


echo net.ipv4.ip_forward=1 >> /etc/sysctl.conf
sysctl -p
upvoted 5 times

  ANI_04 2 years, 5 months ago


echo " net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
upvoted 1 times

  AbidBajwa 2 years, 5 months ago


vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
upvoted 2 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 63/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

  ionix 2 years, 12 months ago


# grep ip_forward /etc/sysctl.d/*
/etc/sysctl.d/60-gce-network-security.conf:net.ipv4.ip_forward=0
# vi /etc/sysctl.d/60-gce-network-security.conf
net.ipv4.ip_forward=0
# sysctl -w net.ipv4.ip_forward=1
upvoted 3 times

Question #44 Topic 1

SIMULATION -

Open kmcrl value of 5 , and can verify in /proc/ cmdline

Correct Answer: See explanation below.

# vim /boot/grub/grub.conf

kernel/vmlinuz-2.6.32-71.el6.x86_64 ro root=/dev/mapper/GLSvg-GLSrootrd_LVM_LV=GLSvg/GLSroot

rd_LVM_LV=GLSvg/GLSswaprd_NO_LUKSrd_NO_MDrd_NO_DM

LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet kmcrl=5

Restart to take effect and verification:

# cat /proc/cmdline

ro root=/dev/mapper/GLSvg-GLSroot rd_LVM_LV=GLSvg/GLSroot rd_LVM_LV=GLSvg/GLSswap rd_NO_LUKS rd_NO_MD rd_NO_DM

LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet kmcrl=5

  corpio Highly Voted  2 years, 10 months ago


this is not found in rhcsa 2021
upvoted 15 times

  ionix Highly Voted  2 years, 12 months ago

grubby --update-kernel=ALL --args="kmcrl=5"


cat /boot/grub2/grubenv
systemctl reboot
cat /proc/cmdline
upvoted 7 times

  Hmenu0s 1 year, 8 months ago


I think this is correct except that the /boot/grub2/grubenv file does not show the update.
We need to check the bootloader entries config files in `/boot/loader/entries/` directory. There will be one for each boot entry. grubby updates
these files. So here is a slightly modified commands -

grubby --update-kernel=ALL --args="kmcrl=5"


ls /boot/loader/entries/
# check if the kernel args are updated in the conf files. added in the end of the line
grep options /boot/loader/entries/8cxxxxx.conf
sytemctl reboot
cat /proc/cmdline
upvoted 1 times

  VforVodoo Most Recent  7 months, 2 weeks ago

#grubby --update-kernel=DEFAULT --args="kmcrl=5"


#grubby --info=DEFAULT
#reboot
#cat /proc/cmdline
upvoted 1 times

  ruben_mv 1 year, 8 months ago


# vim /etc/default/grub
GRUB_CMDLINE_LINUX=... kmcrl=5"
# grub2-mkconfig -o /boot/grub2/grub.cfg
upvoted 1 times

  adolfoale 3 years, 2 months ago


In RHEL8
# grub2-editenv - list | grep kernelopts
# grub2-editenv - set "kernelopts=root=/dev/mapper/rhel-root ..... kmcrl=5
# systemctl reboot
upvoted 4 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 64/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #45 Topic 1

SIMULATION -

Upgrade the kernel, start the new kernel by default. kernel download from this address:

ftp://server1.domain10.example.com/pub/update/new.kernel

Correct Answer: See explanation below.

Download the new kernel file and then install it.

[root@desktop8 Desktop]# ls

kernel-2.6.32-71.7.1.el6.x86_64.rpm

kernel-firmware-2.6.32-71.7.1.el6.noarch.rpm

[root@desktop8 Desktop]# rpm -ivh kernel-*

Preparing... ###########################################

[100%]

1:kernel-firmware

########################################### [ 50%]

2:kernel

########################################### [100%]

Verify the grub.conf file, whether use the new kernel as the default boot. [root@desktop8 Desktop]# cat /boot/grub/grub.conf default=0 title

Red Hat Enterprise Linux Server (2.6.32-71.7.1.el6.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32-71.7.1.el6.x86_64 ro root=/dev/mapper/vol0-

root rd_LVM_LV=vol0/root rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc

KEYTABLE=us crashkernel=auto rhgb quiet initrd /initramfs-2.6.32-71.7.1.el6.x86_64.img

  cloudyhr Highly Voted  2 years, 2 months ago

#wget ftp://server1.domain10.example.com/pub/update/new.kernel
find the name of the new.kerrnal
#ls
#rpm -ivh new.kernel
list all install kernels
#dnf list installed kernel
#grubby --info=ALL
#grubby --set-default="/boot/vmlinuz-4.18.0-348.7.1.el8_5.x86_64"
#grubby --set-default-index=0
upvoted 5 times

  mdtjan 2 years ago


can we update it via yum?
upvoted 5 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 65/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #46 Topic 1

SIMULATION -

Configure iptables, there are two domains in the network, the address of local domain is 172.24.0.0/16 other domain is 172.25.0.0/16, now refuse

domain

172.25.0.0/16 to access the server.

Correct Answer: See explanation below.

iptables -F

service iptables save

iptables -A INPUT -s 172.25.0.0/16 -j REJECT

service iptables save

service iptables restart

  adolfoale Highly Voted  3 years, 2 months ago

In RHEL8
# firewall-cmd --zone=block --add-source=172.25.0.0/16 --permanent
# firewall-cmd --reload
upvoted 11 times

  ArchBishop 2 years, 10 months ago


This answer seems to be incorrect, by the documentation standards I printed above.
Unless I am interpreting wrong, your entry would do the following if the block zone was enabled:
Block ALL Incoming Traffic except for that which exists within subnet 172.25.0.0/16.. all outgoing established connections are permitted.

For this solution to work, you would need to permit the .24 subnet and all of the necessary ports utilized in this exam. the rich-rules are a
better/quicker solution.
upvoted 1 times

  badguy001djh 2 years, 7 months ago


--zone=block --add-source=172.25.0.0/16 means that rules of block zone would apply to the packets from 172.25.0.0/16. While other
packets would still be applied the rule of public zone.Because the target of block zone is reject, any connection from 172.25.0.0/16 will be
rejected.
upvoted 3 times

  mdtjan 2 years ago


this must be configure on the server side. Try to ping from the client, if it's configured successfully, it will show "packet filtered".
upvoted 1 times

  Roldo97 Highly Voted  3 years, 2 months ago

To do this in RHEL8, you must use the command firewall-cmd.


#firewall-cmd --permanent --add-rich-rule="rule family='ipv4' source address='172.25.0.0/16' reject" --> Add the permanent rule to reject the
whole network
#firewall-cmd --reload --> Reload firewall rules
#firewall-cmd --list-all --> List all loaded rules
upvoted 10 times

  STFN2019 2 years, 6 months ago


This seems to be the most correct answer.
upvoted 1 times

  hanienarimani Most Recent  1 year, 5 months ago

The correct answer is :

# firewall-cmd --zone=block --add-source=172.25.0.0/16 --permanent


# firewall-cmd --reload

Every packet that comes into a system is analyzed


for its source address, and based on that source address, Firewalld analyzes whether
or not the packet belongs to a specific zone. If not, the zone for the incoming network interface is used. If no specific zone is available, the packet
is handled by the
settings in the default zone.
upvoted 4 times

  sugisho 2 years, 9 months ago


I think it's need only refuse access 172.25.0.0/16.so
firewall-cmd --zone=drop --permanent --add-source=172.25.0.0/16
upvoted 1 times

  ArchBishop 2 years, 10 months ago

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 66/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

After some research in the firewalld documentation:


Block Zone: Any incoming network connections are rejected [...]. Only network connections initiated within this system are possible.
upvoted 1 times

  ArchBishop 2 years, 10 months ago


Here is the thing that confuses me about the 2 solutions that have been provided in this discussion:
adolfoale: Is this zone always active, or do you have to change the default/active zone to zone=block for this to work? As I understand it, this
would only work if the block zone was active.
Roldo: Your solution seems correct, I've just never used this solution before. what are your thoughts on adolfoale's solution?

any other comments is really helpful.


thanks much
upvoted 1 times

  badguy001djh 2 years, 7 months ago


If you add source/interface to a zone, then that zone will active.
upvoted 1 times

  adolfoale 3 years, 2 months ago


In RHEL8
# firewall-cmd --zone=block --add-source=172.25.0.0/16 --permanent
# firewall-cmd --reload
upvoted 6 times

  cytron 3 years, 4 months ago


There is no iptables in RHEL8 this need updating.
upvoted 8 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 67/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #47 Topic 1

SIMULATION -

A YUM source has been provided in the

http://instructor.example.com/pub/rhel6/dvd

Configure your system and can be used normally.

Correct Answer: See explanation below.

/etc/yum.repos.d/base.repo

[base]

name=base

baseurl=http://instructor.example.com/pub/rhel6/dvd

gpgcheck=0

yum list

  Sz0p3n Highly Voted  2 years, 10 months ago

enabled=1
is missing
upvoted 7 times

  kuome 8 months, 2 weeks ago


name and baseurl are the mandatory fields
upvoted 1 times

  Kindolos1 Highly Voted  1 year, 1 month ago


wtf is even this question? is that even in english?
upvoted 7 times

  jahmad0730 9 months, 3 weeks ago


this question needs to be edited to make sense, also answered properly
upvoted 1 times

  gcalcaterra Most Recent  2 months, 1 week ago

To configure a repo in RHEL9, this is an easy way:


dnf config-manager --add-repo http://instructor.example.com/pub/rhel6/dvd
Then just add to the generated file in /etc/yum.repos.d/
gpgcheck=0

Usually in RHEL9, repos to configure are BaseOS and AppStream.


upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 68/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #48 Topic 1

SIMULATION -

There are two different networks, 192.168.0.0/24 and 192.168.1.0/24. Your System is in 192.168.0.0/24 Network. One RHEL6 Installed System is

going to use as a Router. All required configuration is already done on Linux Server. Where 192.168.0.254 and 192.168.1.254 IP Address are

assigned on that Server. How will make successfully ping to 192.168.1.0/24 Network's Host?

Correct Answer: See explanation below.

vi /etc/sysconfig/network GATEWAY=192.168.0.254

OR -

vi /etc/sysconf/network-scripts/ifcfg-eth0 DEVICE=eth0

BOOTPROTO=static -

ONBOOT=yes -

IPADDR=192.168.0.?

NETMASK=255.255.255.0 -

GATEWAY=192.168.0.254 -

service network restart

Gateway defines the way to exit the packets. According to question System working as a router for two networks have IP Address

192.168.0.254 and

192.168.1.254.

  cookieb Highly Voted  1 year, 4 months ago

nmtui -> edit connection -> routing <edit> -> add route
much easier to remember
upvoted 6 times

  STFN2019 Highly Voted  2 years, 6 months ago


Question unclear, propably just to setup a default gateway for connection to work between these 2 networks, fair enough.
upvoted 5 times

  Hmenu0s Most Recent  1 year, 8 months ago


Assuming the default gateway here is different and we need to add additional route to reach the 192.168.1.0/24 network.

# get the connection holding the ip of 192.168.0.0/24 network


ip -br a
nmcli con show

# Ping the router ip to check connectivity


ping 192.168.0.254

# Add a permanent route to 192.168.1.0/24 via 192.168.0.254 on the connection identified above. in this example that connection is static-enp0s3
sudo nmcli con modify static-enp0s3 +ipv4.routes "192.168.1.0/24 198.168.0.254"
sudo nmcli con up static-enp0s3

# check the routes and test the connectivity


ip r
nmcli con show static-enp0s3 | grep routes
ping 192.168.1.254
upvoted 2 times

  AbidBajwa 2 years, 5 months ago


I think we need to allow IP Forwarding to allow traffic to access each other.
sysctl -w net.ipv4.ip_forward=1
upvoted 5 times

  wizojlo 3 weeks, 3 days ago


True, it is about IP forwarding, but above solution will not survive reboot.

echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.d/ipforward.conf


sysctl -p
reboot
sysctl net.ipv4.ip_forward (to verify; should return a value of 1)
https://www.examtopics.com/exams/redhat/ex200/custom-view/ 69/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 70/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #49 Topic 1

SIMULATION -

Make a swap partition having 100MB. Make Automatically Usable at System Boot Time.

Correct Answer: See explanation below.

Use fdisk /dev/hda ->To create new partition.

Type n-> For New partition -

It will ask for Logical or Primary Partitions. Press l for logical.

It will ask for the Starting Cylinder: Use the Default by pressing Enter Key.

Type the Size: +100M ->You can Specify either Last cylinder of Size here.

Press P to verify the partitions lists and remember the partitions name. Default System ID is 83 that means Linux Native.

Type t to change the System ID of partition.

Type Partition Number -

Type 82 that means Linux Swap.

Press w to write on partitions table.

Either Reboot or use partprobe command.

mkswap /dev/hda? ->To create Swap File system on partition.

swapon /dev/hda? ->To enable the Swap space from partition.

free -m ->Verify Either Swap is enabled or not.

vi /etc/fstab/dev/hda? swap swap defaults 0 0

Reboot the System and verify that swap is automatically enabled or not.

  cytron Highly Voted  3 years, 4 months ago

In RHEL8 for fstab configuration is not more recommended to use absolute patch to the device like /dev/sda7.
The recommendation is to use the UUID identifier instead.
To get the swap or any other filesystem's UUID use the command blkid.
This will show you all filesystems UUIDs in example:
/dev/sda7: UUID="361ed5b5-872a-4e49-ba70-91efb28b2bb4" TYPE="swap" PARTUUID="caa5e8f6-01"

Copy the section UUID="361ed5b5-872a-4e49-ba70-91efb28b2bb4" and use it in fstab as follows.


UUID="361ed5b5-872a-4e49-ba70-91efb28b2bb4" swap swap defaults 0 0

reboot and verify swap is on


free -m
upvoted 5 times

  kitkat 1 year, 9 months ago


We will need to create 100MB partition. Those steps are missing.
upvoted 1 times

  kitkat 1 year, 9 months ago


However what you mentioned is correct that we should use UUID in fstab.
upvoted 1 times

  kenkct Highly Voted  2 years ago

$sudo su
#lsblk -psf
#fdisk /dev/sd[x]
#n
#t
#82
#mkswap /dev/sd[x]
#swapon /dev/sd[x]
#echo '/dev/sd[v] swap swap defaults 0 0' >> /etc/fstab
#systemctl daemon-reload
#mount -a
#lsblk -psf
upvoted 5 times

  ANI_04 Most Recent  2 years, 5 months ago

$ fdisk /dev/sda
# change the partition type to swap
$ partprobe
$ echo " /dev/sdb1 swap swap defaults 0 0 " >> /etc/fstab

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 71/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

$ mkswap /dev/sdb1
$ swapon -a
upvoted 2 times

  nickoftime 2 years, 11 months ago


parted /dev/sdx mklabel msdos
parted /dev/sdx mkpart linux-swap 1MiB 100Mib
udevadm settle
mkswap /dev/sdx1
(UUID checked)
fstab add
UUID=XXX swap swap defaults 0 0
systemctl daemon-reload
swapon -a
swapon --show
upvoted 4 times

  noobmaster96 2 years, 4 months ago


my problem with parted is that if i do 1MiB to 100Mib, will that be just 99MiB? Are they particular with that area?
upvoted 1 times

Question #50 Topic 1

SIMULATION -

There are two different networks 192.168.0.0/24 and 192.168.1.0/24. Where 192.168.0.254 and

192.168.1.254 IP Address are assigned on Server. Verify your network settings by pinging 192.168.1.0/24 Network's Host.

Correct Answer: See explanation below.

vi /etc/sysconfing/network NETWORKING=yes HOSTNAME=station?.example.com GATEWAY=192.168.0.254 service network restart

2.vi /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0

ONBOOT=yes -

BOOTPROTO=static -

IPADDR=X.X.X.X -

NETMASK=X.X.X.X -

GATEWAY=192.168.0.254 -

ifdown eth0

ifup eth0

  PENNSHARK 2 months, 3 weeks ago


ip -br a
ping 192.168.1.0
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 72/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #51 Topic 1

SIMULATION -

One Logical Volume is created named as myvol under vo volume group and is mounted. The Initial Size of that Logical Volume is 400MB. Make

successfully that the size of Logical Volume 200MB without losing any data. The size of logical volume 200MB to 210MB will be acceptable.

Correct Answer: See explanation below.

First check the size of Logical Volume: lvdisplay /dev/vo/myvol

Make sure that the filesystem is in a consistent state before reducing:

# fsck -f /dev/vo/myvol

Now reduce the filesystem by 200MB.

# resize2fs /dev/vo/myvol 200M

It is now possible to reduce the logical volume. #lvreduce /dev/vo/myvol -L 200M

Verify the Size of Logical Volume: lvdisplay /dev/vo/myvol

Verify that the size comes in online or not: df -h

  Darion81 Highly Voted  3 years, 5 months ago

Why not just lvreduce /dev/vo/myvol -r -L 200M?

-r - resize filesystem
upvoted 13 times

  ntcct 3 years, 2 months ago


Resizing the LV is just step1. It resize the "holder". To make it be regconized at the "upper" ilesystem lelvel, we need to resize2fs. Im short, there
are 5 key components related to LVM disk/volume mgmt: physical storage -> physical partition --> vol group -> logical vol --> file system.
upvoted 1 times

  Hmenu0s 1 year, 8 months ago


"-r / --resizefs" option of lvreduce is the recommended approach. Excerpt from RHEL 8 docs - If the logical volume you are reducing contains
a file system, to prevent data loss you must ensure that the file system is not using the space in the logical volume that is being reduced. For
this reason, it is recommended that you use the --resizefs option of the lvreduce command when the logical volume contains a file system.

When you use this option, the lvreduce command attempts to reduce the file system before shrinking the logical volume. If shrinking the file
system fails, as can occur if the file system is full or the file system does not support shrinking, then the lvreduce command will fail and not
attempt to shrink the logical volume.
upvoted 5 times

  ms200 Highly Voted  3 years ago

lvresize -r -L 200M /dev/vo/myvol


upvoted 11 times

  VforVodoo Most Recent  7 months, 2 weeks ago

# umount /mnt/myvol
#e2fsck -f /dev/mapper/vo-myvol
#resize2fs /dev/mapper/vo-myvol 200M
#lvreduce -l -50 vo/myvol (if PE size was 4.00 MiB)
#lvdisplay vo/myvol
--LV Path /dev/vo/myvol
--LV Size 200.00 MiB
--Current LE 50
----
#mount -a
upvoted 1 times

  cloudsinair 10 months, 2 weeks ago


[root@dtop5 ~]# lvreduce -r -L 100M /dev/datastore1/fs1
fsadm: Xfs filesystem shrinking is unsupported.
/usr/sbin/fsadm failed: 1
Filesystem resize failed.
[root@dtop5 ~]#
[root@dtop5 ~]# lvremove /dev/datastore1/fs1
[root@dtop5 ~]#
[root@dtop5 ~]# lvcreate -L 150M -n fs1 datastore1
Rounding up size to full physical extent 152.00 MiB
WARNING: xfs signature detected on /dev/datastore1/fs1 at offset 0. Wipe it? [y/n]: y
Wiping xfs signature on /dev/datastore1/fs1.
Logical volume "fs1" created.
[root@dtop5 ~]#
[root@dtop5 ~]#
[root@dtop5 ~]#

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 73/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

[root@dtop5 ~]# mkfs.xfs /dev/datastore1/fs1


[root@dtop5 ~]# xfsrestore -f newdump.img /mnt/
[root@dtop5 ~]#
upvoted 1 times

  hanienarimani 1 year, 5 months ago


-r option is important when using lvreduce , it will resize firesystem too
lvresize -r /dev/vgdata/lvbetoche -L 200M
upvoted 1 times

  kitkat 1 year, 9 months ago


Anywhere in the question somehow it is not mentioned if file system is ext based or xfs. In both cases steps will be different. I think it would be
important to check first that what type of file system is in use before we write answer.
upvoted 1 times

  kenkct 2 years ago


umount /dev/vo/myvol
e2fsck -f /dev/vo/myvol
resize2fs /dev/vo/myvol 200M
mount -a
df -hT
upvoted 4 times

  kitkat 1 year, 9 months ago


This should work in case of ext2,3,4 file system.
upvoted 1 times

  eid 2 years, 3 months ago


in RH8
#df -Th
#xfsdump -l 0 -f /myvol.image /dev/vo/myvol
#umount /dev/vo/myvol
#lvremove /dev/vo/myvol
#lvcreate -L 200M -n myvol vo
#blkid /dev/vo/myvol
#vim /etc/fstab
#edit UUID for /dev/vo/myvol
#mount -a
#xfsrestore -f /myvol.image /myvol
#df -Th
upvoted 7 times

  cloudyhr 2 years, 2 months ago


To srink the XFS, never use lvreduce command. the above steps by @eid are the correct process.
https://logic.edchen.org/how-to-shrink-xfs-file-system-on-enterprise-linux-7-2/
upvoted 2 times

  kim_ke 2 years, 10 months ago


This works as well
lvreduce --resizefs -L 200M /dev/vo/myvol
upvoted 8 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 74/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #52 Topic 1

SIMULATION -

One Logical Volume named /dev/test0/testvolume1 is created. The initial Size of that disk is 100MB now you required more 200MB. Increase the

size of Logical

Volume, size should be increase on online.

Correct Answer: See explanation below.

lvextend -L+200M /dev/test0/testvolume1 Use lvdisplay /dev/test0/testvolume1) ext2online -d /dev/test0/testvolume1 lvextend command is

used the increase the size of Logical Volume. Other command lvresize command also here to resize. And to bring increased size on online we

use the ext2online command.

  rajat3204 4 months, 2 weeks ago


lvextend -r -L 200M /dev/vo/myvol
upvoted 1 times

  Kicod 7 months, 3 weeks ago


lvresize -r -L 200M /dev/test0/testvolume1
upvoted 1 times

  mattd81 1 year, 10 months ago


lvextend -L 200M -r /dev/test0/testvolume1
lvdisplay or lvs to verify
upvoted 4 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 75/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #53 Topic 1

SIMULATION -

We are working on /data initially the size is 2GB. The /dev/test0/lvtestvolume is mount on /data. Now you required more space on /data but you

already added all disks belong to physical volume. You saw that you have unallocated space around 5 GB on your harddisk. Increase the size of

lvtestvolume by 5GB.

Correct Answer: See explanation below.

Create a partition having size 5 GB and change the syste id '8e'. use partprobe command pvcreate /dev/hda9 Suppose your partition number is

hda9. vgextend test0 /dev/hda9 vgextend command add the physical disk on volume group. lvextend -L+5120M /dev/test0/lvtestvolume verify

using lvdisplay /dev/test0/lvtestvolume.

  ArchBishop Highly Voted  2 years, 10 months ago

They identify the LVM as mounted; which indicates that there is an associated FS.
You'll wanna make sure that unmount first, and then resize the FS as well.
This can easily be done by adding the additional -r switch in the command:
lvextend -L +5G -r [/dev/vg/lvm]

If you forget this step, you can also run resize2fs or xfs_growfs
upvoted 6 times

  larsmattim Most Recent  3 months, 2 weeks ago

https://access.redhat.com/solutions/24770
upvoted 1 times

  kitkat 1 year, 9 months ago


--assume new disk is src
pvcreate /dev/sdc
vgextend test0 /dev/sdc
vgs
lvs
lvextend -r -l +100%FREE /dev/test0/lvtestvolume

--in above command because we are going to use 100% of 5GB disk we specified +100%FREE.

Below two commands i am adding however i didn't have to use the because while using -r in above command volume is already resized and
automatically fle system type is matched to that of the existing volume.

xfs_growfs /dev/test0/lvtestvolume -----in case of xfs file system


resize2fs /dev/test0/lvtestvolume -----in case of ext2, 3 or 4

running above command will produce following:


The file system is alread ________ blocks long. Nothing to do!

--run df -Th command to check size.


upvoted 3 times

  kitkat 1 year, 9 months ago


Reference: https://www.redhat.com/sysadmin/resize-lvm-simple
upvoted 1 times

  kysj 2 years ago


Assume the /dev/sda is 5GB
#parted -s /dev/sda mklabel gpt mkpart primary 0% 100%
#parted -s /dev/sda set 1 lvm on
# partprobe
# vgextend test0 /dev/sda1
# lvextend -r -l 100%FREE /dev/test0/lvtestvolume
For xfs file system:
# xfs_growfs /data // the mount point
For ext file system:
# resize2fs /dev/test0/lvtestvolume // the lv path

#df -h /data
upvoted 2 times

  ANI_04 2 years, 5 months ago


$ fdisk /dev/sda
# create a partition of that free 5G space
# change it's type to lvm
$ partprobe

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 76/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

$ vgextent test0 /dev/sdaX


$ lvextend -r -l 100%FREE -n dev/test0/lvtestvolume test0
upvoted 1 times

  sugisho 2 years, 7 months ago


[root@station ~]# lvextend --help
lvextend - Add space to a logical volume

Extend an LV by a specified size.


lvextend -L|--size [+]Size[m|UNIT] LV
[ -l|--extents [+]Number[PERCENT] ]
[ -r|--resizefs ]
[ -i|--stripes Number ]
[ -I|--stripesize Size[k|UNIT] ]
[ --poolmetadatasize [+]Size[m|UNIT] ]
[ COMMON_OPTIONS ]
[ PV ... ]
upvoted 1 times

Question #54 Topic 1

SIMULATION -

One Domain RHCE is configured in your lab, your domain server is server1.example.com. nisuser2001, nisuser2002, nisuser2003 user are created

on your server

192.168.0.254:/rhome/stationx/nisuser2001. Make sure that when NIS user login in your system automatically mount the home directory. Home

directory is separately shared on server /rhome/stationx/ where x is your Station number.

Correct Answer: See explanation below.

use the authconfig --nisserver=<NIS SERVER> --nisdomain=<NIS DOMAIN> -- update

Example: authconfig --niserver=192.168.0.254 --nisdomain=RHCE --update or system-config-authentication

Click on Enable NIS -

Type the NIS Domain: RHCE -

Type Server 192.168.0.254 then click on next and ok

You will get a ok message.

Create a Directory /rhome/stationx where x is your station number. vi /etc/auto.master and write at the end of file /rhome/stationx

/etc/auto.home --timeout=60 vi /etc/auto.home and write

* -rw,soft,intr 192.168.0.254:/rhome/stationx/&

Note: please specify your station number in the place of x.

Service autofs restart -

Login as the nisuser2001 or nisuser2002 on another terminal will be Success. According to question, RHCE domain is already configured. We

have to make a client of RHCE domain and automatically mount the home directory on your system. To make a member of domain, we use the

authconfig with option or system- config authentication command. There a are lots of authentication server i.e NIS, LDAB, SMB etc. NIS is a

RPC related Services, no need to configure the DNS, we should specify the NIS server address.

Here Automount feature is available. When user tried to login, home directory will automatically mount. The automount service used the

/etc/auto.master file. On

/etc/auto.master file we specified the mount point the configuration file for mount point.

  novac1111 3 years, 2 months ago


If I am not wrong, the command, authconfig is gone for rhel 8.
upvoted 4 times

  Rizos 3 years, 4 months ago


So is this question for RHCSE? Because it says that the domain is configured for RHCE. Im confused?
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 77/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #55 Topic 1

SIMULATION -

Make on data that only the user owner and group owner member can fully access.

Correct Answer: See explanation below.

chmod 770 /data

Verify using : ls -ld /data Preview should be like:

drwxrwx--- 2 root sysadmin 4096 Mar 16 18:08 /data

To change the permission on directory we use the chmod command.

According to the question that only the owner user (root) and group member (sysadmin) can fully access the directory so: chmod 770 /data

  ruben_mv 1 year, 8 months ago


chmod ug+rwx,o= /data
upvoted 1 times

  eagleeye1 2 years, 3 months ago


chmod ug+rwx /mnt/data
chmod o-rwx /mnt/data
upvoted 2 times

Question #56 Topic 1

SIMULATION -

Who ever creates the files/directories on a data group owner should automatically be in the same group owner as data.

Correct Answer: See explanation below.

1. chmod g+s /data

2. Verify using: ls -ld /data

Permission should be like this: drwxrws--- 2 root sysadmin 4096 Mar 16 18:08 /data

If SGID bit is set on directory then who every users creates the files on directory group owner automatically the owner of parent directory. To set

the SGID bit: chmod g+s directory To Remove the SGID bit: chmod g-s directory

  cloudyhr 2 years, 2 months ago


As per my understanding, files and folders created under /data should inherit the owner: group permission.
we can achieve this by setting GUID.
chmod 2770 /data
2 –setGUID
7 –Set users full perissions
7 –set group full permission
0 –set other no permissions
upvoted 1 times

  kitkat 1 year, 9 months ago


It is not mentioned that group has 7 permission set. Simply 'chmod g+s /data' is enough it would automatically take care what current
permissions are on the folder for group.
upvoted 4 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 78/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #57 Topic 1

SIMULATION -

Your System is going to use as a Router for two networks. One Network is 192.168.0.0/24 and Another Network is 192.168.1.0/24. Both network's

IP address has assigned. How will you forward the packets from one network to another network?

Correct Answer: See explanation below.

echo "1" >/proc/sys/net/ipv4/ip_forward

vi /etc/sysctl.conf

net.ipv4.ip_forward = 1

If you want to use the Linux System as a Router to make communication between different networks, you need enable the IP forwarding. To

enable on running session just set value 1 to

/proc/sys/net/ipv4/ip_forward. As well as automatically turn on the IP forwarding features on next boot set on /etc/sysctl.conf file.

  syed2020 1 year, 7 months ago


If you want your change to survive the reboot, insert below line
vi /etc/sysctl.conf
net.ipv4.ip_forward=1
reboot the machine and check
cat /proc/sys/net/ipv4/ip_foward
upvoted 2 times

  wizojlo 3 weeks, 3 days ago


Directly editing sysctl.conf is not recommended anymore, configs now go to /etc/sysctl.d directory.

echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.d/ipforward.conf


sysctl -p
reboot
sysctl net.ipv4.ip_forward (to verify; should return a value of 1)
upvoted 1 times

  badguy001djh 2 years, 7 months ago


Firewalld had been added a new option,--add-forward, in version 0.9.0 .With this option packects from one interface can be forwarded to another
interface. https://firewalld.org/2020/04/intra-zone-forwarding
upvoted 2 times

  badguy001djh 2 years, 7 months ago


By the way, two interfaces must be in the same zone.
upvoted 2 times

  QuangTruong 2 years, 9 months ago


sysctl -w net.ipv4.ip_forward=1
sysctl net.ipv4.ip_forward
upvoted 4 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 79/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #58 Topic 1

SIMULATION -

Create the user named eric and deny to interactive login.

Correct Answer: See explanation below.

useradd eric

passwd eric

vi /etc/passwd

eric:x:505:505::/home/eric:/sbin/nologin

Which shell or program should start at login time is specified in /etc/passwd file? By default, Redhat Enterprise Linux assigns the /bin/bash

shell to the users. To deny the interactive login, you should write /sbin/nologin or /bin/ false instead of login shell.

  cloudyhr Highly Voted  2 years, 2 months ago

#useradd eric -s /sbin/nologin


upvoted 5 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 80/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #59 Topic 1

SIMULATION -

/data Directory is shared from the server1.example.com server. Mount the shared directory that:

Correct Answer: See explanation below.

1. vi /etc/auto.master

/mnt /etc /auto.misc --timeout=50

vi /etc/auto.misc

data -rw,soft,intr server1.example.com:/data

service autofs restart

chkconfig autofs on

When you mount the other filesystem, you should unmount the mounted filesystem, Automount feature of linux helps to mount at access time

and after certain seconds, when user unaccess the mounted directory, automatically unmount the filesystem.

/etc/auto.master is the master configuration file for autofs service. When you start the service, it reads the mount point as defined in

/etc/auto.master.

  adolfoale Highly Voted  3 years, 2 months ago

In RHEL8 and because de request is not with autofs, we can proceed in this way:
# mount server1.example.com server:/data /mnt
upvoted 8 times

  kitkat 1 year, 9 months ago


One rule for the exam is that all changes we are making should survive reboot. Which is why autofs would be a good option.
upvoted 2 times

  kitkat Highly Voted  1 year, 9 months ago


yum -y install nfs-utils
showmount -e server1
mkdir -p /mnt/data
sudo mount -t nfs server1.example.com:/data /mnt/data
echo 'server1.example.com:/data /mnt/data nfs defaults 0 0' >> /etc/fstab
upvoted 5 times

  kenkct Most Recent  2 years ago

Server1
assume /data already share from server1.example.com, otherwise
#echo '/data *(rw)' >> /etc/exports
#exportfs -a

Server2
#systemctl enable --now nfs-server
#mkdir /mnt/shared
#mount -t nfs server1.example.com:/data mnt/shared
upvoted 1 times

  kysj 2 years ago


At server1:
# yum install -y nfs-utils
# systemctl enable --now nfs-server
# echo “/data server2(rw)” >> /etc/exports
# exportfs -av

At server2:
#mount -o rw,sync server1.example.com:/data /mnt
#df -h /mnt
upvoted 1 times

  sugisho 2 years, 8 months ago


Is it should install cif-utils,or nfs-utils?
upvoted 1 times

  sugisho 2 years, 8 months ago


mount server1.example.com:/data /mnt
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 81/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #60 Topic 1

SIMULATION -

One Logical Volume named lv1 is created under vg0. The Initial Size of that Logical Volume is 100MB. Now you required the size 500MB. Make

successfully the size of that Logical Volume 500M without losing any data. As well as size should be increased online.

Correct Answer: See explanation below.

The LVM system organizes hard disks into Logical Volume (LV) groups. Essentially, physical hard disk partitions (or possibly RAID arrays) are

set up in a bunch of equal sized chunks known as Physical Extents (PE). As there are several other concepts associated with the LVM system,

let's start with some basic definitions:

Physical Volume (PV) is the standard partition that you add to the LVM mix. Normally, a physical volume is a standard primary or logical

partition. It can also be a

RAID array.

Physical Extent (PE) is a chunk of disk space. Every PV is divided into a number of equal sized PEs. Every PE in a LV group is the same size.

Different LV groups can have different sized PEs.

Logical Extent (LE) is also a chunk of disk space. Every LE is mapped to a specific PE.

Logical Volume (LV) is composed of a group of LEs. You can mount a file system such as /home and /var on an LV.

Volume Group (VG) is composed of a group of LVs. It is the organizational group for LVM. Most of the commands that you'll use apply to a

specific VG.

Verify the size of Logical Volume: lvdisplay /dev/vg0/lv1

Verify the Size on mounted directory: df -h or df -h mounted directory name

Use: lvextend -L+400M /dev/vg0/lv1

ext2online -d /dev/vg0/lv1 to bring extended size online.

Again Verify using lvdisplay and df -h command.

  mattd81 1 year, 10 months ago


lvextend -L 500M -r /dev/vg0/lv1
user the -r and you won't have to do the additional step to resize2fs
upvoted 3 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 82/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #61 Topic 1

SIMULATION -

Create one partitions having size 100MB and mount it on data.

Correct Answer: See explanation below.

1. Use fdisk /dev/hda to create new partition.

2. Type n For New partitions.

3. It will ask for Logical or Primary Partitions. Press l for logical.

4. It will ask for the Starting Cylinder: Use the Default by pressing Enter

Key.

5. Type the Size: +100M you can specify either Last cylinder of size here.

6. Press P to verify the partitions lists and remember the partitions name.

7. Press w to write on partitions table.

8. Either Reboot or use partprobe command.

9. Use mkfs -t ext3 /dev/hda?

OR -

mke2fs -j /dev/hda? To create ext3 filesystem.

vi /etc/fstab

Write:

/dev/hda? /data ext3 defaults 1 2

Verify by mounting on current Sessions also: mount /dev/hda? /data

  PENNSHARK 2 months, 3 weeks ago


mkdir /mnt/data
fdisk /dev/nvme1n1
n
+100MB
w
partprobe
mkfs.ext4 /dev/nvme1n1
blkid
echo " UUID /mnt/data ext4 defaults 0 0 " >> /etc/fstab
mount -a
sysctl daemon-reload
mount
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 83/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #62 Topic 1

SIMULATION -

You are new System Administrator and from now you are going to handle the system and your main task is Network monitoring, Backup and

Restore. But you don't know the root password. Change the root password to redhat and login in default Runlevel.

Correct Answer: See explanation below.

When you Boot the System, it starts on default Runlevel specified in /etc/inittab:

Id:?:initdefault:

When System Successfully boot, it will ask for username and password. But you don't know the root's password. To change the root password

you need to boot the system into single user mode. You can pass the kernel arguments from the boot loader.

1. Restart the System.

2. You will get the boot loader GRUB screen.

3. Press a and type 1 or s for single mode ro root=LABEL=/ rhgb queit s

4. System will boot on Single User mode.

5. Use passwd command to change.

6. Press ctrl+d

  adolfoale Highly Voted  3 years, 2 months ago

In RHEL8
- reboot the system
- press "e" letter
- Add "rd.break" at the end of de line thet begening with "Linux" in grub menu
- ctrl + x
- # mount -o remount,rw /sysroot
- # chroot /sysroot
- # passwd
- # touch /.autorelabel
- # exit
- # logout
upvoted 28 times

  urWaifu 1 year, 6 months ago


Know this by heart, because you won't be able to log in on the second server during the exam.
upvoted 3 times

  syed2020 Most Recent  1 year, 8 months ago

In RHEL 9
- Reboot the system
- Press 'e' and modify line starting with Linux with rw and add init=/bin/bash
- Press F10
- Enter passwd to reset root passwrod
- touch /autorelable
- exec /sbin/init
upvoted 2 times

  STFN2019 2 years, 6 months ago


You can also do the following (slight variation to adolfoale's solution):

- Reboot
- At GRUB2 press e for the primary (default) kernel
- Replace ro with rw init=/sysroot/bin/sh
- Ctrl+X
- chroot /sysroot
- passwd root
- Enter the password
- touch /.autorelabel
- Exit
- Reboot
upvoted 1 times

  Ares23 2 years, 10 months ago


the "touch /.autorelabel" is needed if SELinux is enabled/enforced !! if you don't create it password not be update
upvoted 4 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 84/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #63 Topic 1

SIMULATION -

You are a System administrator. Using Log files very easy to monitor the system. Now there are 50 servers running as Mail, Web, Proxy, DNS

services etc. You want to centralize the logs from all servers into on LOG Server. How will you configure the LOG Server to accept logs from

remote host?

Correct Answer: See explanation below.

By default, system accept the logs only generated from local host. To accept the Log from other host configure: vi /etc/sysconfig/syslog

SYSLOGD_OPTIONS="-m 0 -r"

Where -

-m 0 disables 'MARK' messages.

-r enables logging from remote machines

-x disables DNS lookups on messages received with -r

service syslog restart

  ANI_04 Highly Voted  2 years, 5 months ago

$ vim /etc/rsyslog.conf
# uncomment the lines containing
(load = "imudp" )
(type = "imudp" port="514)
(load = "imtcp" )
(type = "imtcp" port="514)
$ firewall-cmd --add-port=514/tcp --permanent
# restart firewall and rsyslog service
upvoted 5 times

  KimoHasNoBalls Most Recent  1 year, 6 months ago

i would follow this:


https://www.linuxtechi.com/configure-rsyslog-server-centos-8-rhel-8/
upvoted 1 times

  badguy001djh 2 years, 7 months ago


In redhat 8.2, uncomment two lines contained "imtcp" in /etc/rsyslog.conf. Then restart rsyslogd service.Don't forget open port 514/tcp on firewall.
upvoted 3 times

  STFN2019 2 years, 6 months ago


So you would:

vi /etc/rsyslog.conf
/imtcp – to search the string in question
Uncomment 2 lines starting with ‘module’ and ‘input’
systemctl restart rsyslog
systemctl status rsyslog (Ensure rsyslog restarted correctly)
firewall-cmd --add-port=514/tcp –permanent (Add the port in question and make it permanent)
firewall-cmd –reload (Reload the config to ensure changes are still in place)
firewall-cmd --list-all (Verify the config)
upvoted 5 times

  Ares23 2 years, 10 months ago


from 7 rsyslog replace syslog
upvoted 2 times

  hyde666 3 years, 2 months ago


i think u can typing ls first if u not sure
upvoted 1 times

  tahirmirza 3 years, 4 months ago


so what exactly are we typing here. which part from the explanation to whrere
/etc/sysconfig/rsyslog or etc/sysconfig/syslog ???
upvoted 1 times

  Moram 3 years, 6 months ago


The file is locate at:
vim /etc/sysconfig/rsyslog
upvoted 2 times

  STFN2019 2 years, 6 months ago

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 85/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Syslogd options are deprecated since rsyslog v3.


upvoted 2 times

Question #64 Topic 1

SIMULATION -

Your System is configured in 192.168.0.0/24 Network and your nameserver is 192.168.0.254. Make successfully resolve to server1.example.com.

Correct Answer: See explanation below.

nameserver is specified in question,

1. Vi /etc/resolv.conf

nameserver 192.168.0.254

2. host server1.example.com

  D54752 Highly Voted  2 years, 9 months ago

Assume ens192 is the interface


nmcli con mod ens192 ipv4.dns 192.168.0.254
nmcli con up ens192

nslookup server1.example.com
upvoted 9 times

  MELO225 Highly Voted  2 years, 6 months ago

In RHEL8, add this line to the /etc/hosts file and save the changes as follow:
#vim /etc/hosts
192.168.0.254 server1.example.com
upvoted 9 times

  EX200V8KEXAM Most Recent  2 years, 10 months ago

in RHEL 8 :

vi /etc/hosts
192.168.0.254 nameserver
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 86/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #65 Topic 1

SIMULATION -

One Package named zsh is dump on ftp://server1.example.com under /pub/updates directory and your FTP server is 192.168.0.254. Install the

package zsh.

Correct Answer: See explanation below.

rpm -ivh ftp://server1/example.com/pub/updates/zsh-*

or

Login to ftp server : ftp ftp://server1.example.com using anonymous user.

Change the directory: cd pub and cd updates

Download the package: mget zsh-*

Quit from the ftp prompt : bye -

Install the package -

rpm -ivh zsh-*

Verify either package is installed or not : rpm -q zsh

  PENNSHARK 2 months, 2 weeks ago


wget ftp://server1.example.com/pub/updates/zsh
yum install zsh
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 87/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #66 Topic 1

SIMULATION -

Some users home directory is shared from your system. Using showmount -e localhost command, the shared directory is not shown. Make access

the shared users home directory.

Correct Answer: See explanation below.

Verify the File whether Shared or not ? : cat /etc/exports

Start the nfs service: service nfs start

Start the portmap service: service portmap start

Make automatically start the nfs service on next reboot: chkconfig nfs on

Make automatically start the portmap service on next reboot: chkconfig portmap on

Verify either sharing or not: showmount -e localhost

Check that default firewall is running on system?

If running flush the iptables using iptables -F and stop the iptables service.

  kenkct 2 years ago


$sudo su
#showmount -e localhost (verify shared directory)
#systemctl enable --now nfs-server
#pwd (check user home directory)
#echo '/home/user *(rw)' >> /etc/exports
#exportfs -rv
#showmount -e localhost (verify shared directory)
upvoted 4 times

  STFN2019 2 years, 6 months ago


Full solution:

NFS Server:
- dnf install nfs-utils libnfsidmap
- systemctl enable rpcbind & nfs-server
- systemctl start rpcbind, nfs-server, rpc-statd, nfs-idmapd
- vi /etc/exports
- add /home/user 192.168.x.x (rw,sync,no_root_squash)
- exportfs -rv
- showmount -e
- Optional: may need to enable the rule on firewalld or stop it altogether for it to work on remote clients

NFS Client:
- dnf install nfs-utils rpcbind
- systemctl start rpcbind
- ps -ef | egrep “firewalld:iptables” (may need to stop these two services, or add appropriate rules for mounting to work across server and client)
- Create a mount point
- Mount 192.168.x.x:/dir /mountpoint
upvoted 3 times

  ArchBishop 2 years, 10 months ago


Note: portmap.service has been replaced with rpcbind.target && rpcbind.service.
upvoted 2 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 88/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #67 Topic 1

SIMULATION -

Add a new logical partition having size 100MB and create the data which will be the mount point for the new partition.

Correct Answer: See explanation below.

1. Use fdisk /dev/hda-> To create new partition.

2. Type n ->For New partitions

3. It will ask for Logical or Primary Partitions. Press l for logical.

4. It will ask for the Starting Cylinder: Use the Default by pressing Enter

Keys -

5. Type the size: +100M you can specify either Last cylinder of size here.

6. Press P to verify the partitions lists and remember the partitions name.

7. Press w to write on partitions table.

8. Either Reboot or use partprobe command.

9. Use mkfs -t ext3 /dev/hda?

OR -

1. mke2fs -j /dev/hda? ->To create ext3 filesystem.

2. vi /etc/fstab

3. Write:

/dev/hda? /data ext3 defaults 0 0

4. Verify by mounting on current sessions also:

mount /dev/hda? /data

  Hayder_Alobaidi 1 year, 8 months ago


To created a logical partitions do this in fdisk:
press e to create extended partition, press p to create the main partition, and the extended partition is further divided into logical partitions
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 89/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #68 Topic 1

SIMULATION -

You have a domain named www.rhce.com associated IP address is 192.100.0.2. Configure the Apache web server by implementing the SSL for

encryption communication.

Correct Answer: See explanation below.

vi /etc/httpd/conf.d/ssl.conf <VirtualHost 192.100.0.2> ServerName www.rhce.com DocumentRoot /var/www/rhce DirectoryIndex index.html

index.htm

ServerAdmin [email protected] SSLEngine on SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt SSLCertificateKeyFile

/etc/httpd/conf/ssl.key/server.key </

VirtualHost>

cd /etc/httpd/conf

3 make testcert

Create the directory and index page on specified path. (Index page can download from ftp://server1.example.com at exam time) service httpd

start|restart chkconfig httpd on

Apache can provide encrypted communications using SSL (Secure Socket Layer). To make use of encrypted communication, a client must

request to https protocol, which is uses port 443. For HTTPS protocol required the certificate file and key file.

  kenkct 2 years ago


$ sudo su
# yum install mod_ssl (install ssl module)
# system enable --now httpd (enable http daemon)
# apachectl -M | grep ssl (verify ssl is running)
# firewall-cmd zone=public --add-service=https --permanent (allow https access)
# firewall-cmd --reload (firewall take effect)
# openssl req -newkey rsa:2048 -nodes -keyout /etc/pki/tls/private/httpd.key -x509 -days 365 -out /etc/pki/tls/certs/httpd.crt
# vim /etc/httpd/conf.d/ssl.conf
SSLCertificateFile /etc/pki/tls/certs/httpd.crt
SSLCertificateKeyFile /etc/pki/tls/private/httpd.key
<VirtualHost 192.100.0.2:443>
DocumentRoot "/var/www/html"
Servername www.rhce.com:443
# systemctl reload httpd
upvoted 1 times

  Oyform 2 years, 6 months ago


i thought httpd is not in rhcsa 2021
upvoted 4 times

  STFN2019 2 years, 6 months ago


https://linuxconfig.org/how-to-install-mod-ssl-on-redhat-8
upvoted 1 times

  STFN2019 2 years, 6 months ago


Simply use mod_ssl module and then generated self-signed SSL cert, job done.
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 90/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #69 Topic 1

SIMULATION -

There is a server having 172.24.254.254 and 172.25.254.254. Your System lies on 172.24.0.0/16. Make successfully ping to 172.25.254.254 by

Assigning following IP: 172.24.0.x where x is your station number.

Correct Answer: See explanation below.

Use netconfig command -

Enter the IP Address as given station number by your examiner: example: 172.24.0.1

Enter Subnet Mask -

Enter Default Gateway and primary name server

press on ok

ifdown eth0

ifup eth0

verify using ifconfig

In the lab server is playing the role of router, IP forwarding is enabled. Just set the Correct IP and gateway, you can ping to 172.25.254.254.

  PENNSHARK 2 months, 2 weeks ago


ip address add 172.24.0.0/16
ping 172.25.254.254
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 91/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #70 Topic 1

SIMULATION -

Successfully resolve to server1.example.com where your DNS server is 172.24.254.254.

Correct Answer: See explanation below.

vi /etc/resolv.conf

nameserver 172.24.254.254

host server1.example.com

On every clients, DNS server is specified in /etc/resolv.conf. When you request by name it tries to resolv from DNS server.

  PENNSHARK 2 months, 2 weeks ago


echo "172.24.254.254 server1.example.com" >> /etc/hosts
upvoted 1 times

  Acesyo 1 year ago


echo "172.24.254.254 server1.example.com" >> /etc/hosts
upvoted 2 times

  mattd81 1 year, 10 months ago


Can you add this to the vim /etc/hosts file to complete this request?
upvoted 3 times

  wizojlo 1 month ago


I do not see it like this. /etc/hosts contains domain name and IP address of each custom machine/server we want to add. The question does not
provide IP address of the server, only DNS server. The IP of the server itself is unknown and DNS should resolve it. Correct method (and easiest,
IMHO) would be to use nmcli like sugisho suggested. Modifying resolv.conf, on the other hand, would only result in temporary solution as this
file gets overwritten automatically on each reboot by NetworkManager, unless we add a custom configuration to
/etc/NetworkManager/conf.d/something.conf with contents:

[main]
dns=none

Only then can we modify the /etc/resolv.conf manually and it will persist.
upvoted 1 times

  sugisho 2 years, 8 months ago


example
nmcli c m ens192 1pv4.dns 172.24.254.254
or
nmtui
upvoted 3 times

  wizojlo 1 month ago


absolutey the easiest and also persistent way to do it. just a sidenote, there is a typo (1pv4.dns --> should be ipv4.dns)
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 92/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #71 Topic 1

SIMULATION -

Your System is going use as a router for 172.24.0.0/16 and 172.25.0.0/16. Enable the IP Forwarding.

1. echo "1" >/proc/sys/net/ipv4/ip_forward

2. vi /etc/sysctl.conf net.ipv4.ip_forward=1

Correct Answer: See explanation below.

/proc is the virtual filesystem, containing the information about the running kernel.

To change the parameter of running kernel you should modify on /proc. From Next reboot the system, kernel will take the value from

/etc/sysctl.conf.

  mattd81 1 year, 9 months ago


sysctl -w net.ipv4.ip_forward=1
upvoted 3 times

Question #72 Topic 1

SIMULATION -

Who ever creates the files/directories on archive group owner should be automatically should be the same group owner of archive.

Correct Answer: See explanation below.

chmod g+s /archive

Verify using: ls -ld /archive Permission should be like:

drwxrws--- 2 root sysuser 4096 Mar 16 18:08 /archive

If SGID bit is set on directory then who every users creates the files on directory group owner automatically the owner of parent directory.

To set the SGID bit: chmod g+s directory

To Remove the SGID bit: chmod g-s directory

  cloudyhr 2 years, 2 months ago


#Create a Directory
mkdir archive
#Set the GUID
chmod g+s archive

Now any file or folder created in the archive will have the same owner:group permissions as parent folder, in this case same as archive folder
upvoted 3 times

  STFN2019 2 years, 6 months ago


Say we got data dir under home, so:

chmod g+s data


tar cvf backup.tar data
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 93/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #73 Topic 1

SIMULATION -

Make on /archive directory that only the user owner and group owner member can fully access.

Correct Answer: See explanation below.

chmod 770 /archive

Verify using : ls -ld /archive Preview should be like:

drwxrwx--- 2 root sysuser 4096 Mar 16 18:08 /archive

To change the permission on directory we use the chmod command. According to the question that only the owner user (root) and group

member (sysuser) can fully access the directory so: chmod 770 /archive

  STFN2019 2 years, 6 months ago


Simple:
mkdir /archive
chmod 770 /archive
upvoted 3 times

Question #74 Topic 1

SIMULATION -

Notes:

NFS NFS instructor.example.com:/var/ftp/pub/rhel6/dvd

‫¼ן‬
YUM http://instructor.example.com/pub/rhel6/dvd

‫¼ן‬
ldap http //instructor.example.com/pub/EXAMPLE-CA-CERT

‫¼ן‬
‫¼ן‬
Install dialog package.

Correct Answer: yum install dialog

  jahmad0730 9 months, 1 week ago


this is not a question
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 94/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #75 Topic 1

SIMULATION -

SELinux must run in force mode.

Correct Answer: See explanation below.

/etc/sysconfig/selinux

SELINUX=enforcing

  sugisho Highly Voted  2 years, 7 months ago

[root@station ~]# setenforce Enforcing


[root@station ~]# getenforce
Enforcing
[root@station ~]# vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=enforcing
upvoted 8 times

  TabzK Highly Voted  3 years, 5 months ago


Correct path is vim /etc/selinux/config

SELINUX=enforcing
upvoted 5 times

  Darion81 3 years, 5 months ago


Nope, its:

/etc/sysconfig/selinux
SELINUX=enforcing

If was disabled restart is mandatory. use getenforce to check value


upvoted 4 times

  kitkat 1 year, 7 months ago


/etc/sysconfig/selinux is a link to /etc/selinux/config
upvoted 2 times

  mattd81 Most Recent  2 years ago

sestatus can also be used to see SELinux settings: Current Mode: shows the current mode, Mode from config file: Shows what mode will be set after
reboot.
upvoted 2 times

  dayodeck 2 years, 11 months ago


correct path is /etc/selinux/config
check the man page
upvoted 3 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 95/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #76 Topic 1

SIMULATION -

The firewall must be open.

Correct Answer: See explanation below.

/etc/init.d/iptables start

iptables -F

iptables -X

iptables -Z

/etc/init.d/iptables save

chkconfig iptables on

  Jojo02 Highly Voted  2 years, 8 months ago

if not installed: yum install -y firewalld


else:
systemctl enable --now firewalld.service
firewall-cmd --state
upvoted 5 times

  markeloff23 Most Recent  2 years, 4 months ago

Firewall must be open... Disable o enable?


upvoted 2 times

  Sz0p3n 2 years, 10 months ago


systemctl disable --now firewalld.service
firewall-cmd --state
upvoted 3 times

Question #77 Topic 1

SIMULATION -

In the system, mounted the iso image /root/examine.iso to/mnt/iso directory. And enable automatically mount (permanent mount) after restart

system.

Correct Answer: See explanation below.

/etc/fstab:

/root/examine.iso /mnt/iso iso9660 loop 0 0 mount -a

mount | grep examine

  adolfoale Highly Voted  3 years, 2 months ago

In RHEL8:
/root/examine.iso /mnt/iso iso9660 loop 0 0 mount -a
upvoted 6 times

  kenkct Most Recent  2 years ago


echo '/root/examine.iso /mnt/iso iso9660 loop 0 0' >> /etc/fstab
upvoted 3 times

  cloudyhr 2 years, 2 months ago


automatic and permanent, this can also be active by autofs
#dnf install autofs
#systemctl start autofs
#systemctl enable --now autofs
by default autofs(/etc/auto.misc) is configured to mount cdrom on /misc/cd
#cd /misc/cd ; ls
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 96/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #78 Topic 1

SIMULATION -

Configure your NFS services. Share the directory by the NFS Shared services.

Correct Answer: See explanation below.

/etc/init.d/rpcbind start

/etc/init.d/nfslock start

/etc/init.d/nfs start

chkconfig rpcbind on

chkconfig nfslock on

chkconfig nfs on

showmount -e localhost

  PENNSHARK 2 months, 2 weeks ago


yum install nfs-utils
systemctl start {rpcbind,nfs-server,rpc-statd,nfs-idmapd}
vim /etc/exports
/root/shared *(rw)
:wq
exportfs -a
showmount -e localhost
mkdir /nfs
chmod 777 /nfs
On client
Systemctl start rpcbind
showmount -e 192.168.122.1
mkdir /mnt/nfs
mount -t nfs 192.168.122.1:/root/shared /mnt/nfs
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 97/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #79 Topic 1

SIMULATION -

1. Find all sizes of 10k file or directory under the /etc directory, and copy to /tmp/findfiles directory.

2. Find all the files or directories with Lucy as the owner, and copy to /tmp/findfiles directory.

Correct Answer: See explanation below.

(1)find /etc -size 10k -exec cp {} /tmp/findfiles \;

(2)find / -user lucy -exec cp -a {} /tmp/findfiles \;

Note: If find users and permissions, you need to use cp - a options, to keep file permissions and user attributes etc.

  jjknow85 Highly Voted  2 years, 4 months ago

#mkdir /tmp/findfiles
# find /etc -size 10k -exec cp -r {} /tmp/findfiles \;
# find / -user lucy -exec cp -r {} /tmp/findfiles \;
upvoted 6 times

  Frenzy Most Recent  1 year, 10 months ago

mkdir /tmp/findfiles
cp $(find /etc -size 10k) /tmp/findfiles/
cp $(find / -user lucy) /tmp/findfiles/
upvoted 2 times

  mattd81 1 year, 11 months ago


How would you check to see what is in the directory to verify your search?
upvoted 1 times

  STFN2019 2 years, 6 months ago


Why not just use the following:
find /etc -size 10k > /tmp/findfiles
find / -user lucy >> /tmp/findfiles
upvoted 1 times

  atilade 2 years, 6 months ago


/tmp/findfiles is a directory. You can only append to files
upvoted 2 times

  reemartan 2 years, 5 months ago


This is just redirecting your command output to a file, but not copying the files to a directory
upvoted 3 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 98/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #80 Topic 1

SIMULATION -

There is a local logical volumes in your system, named with common and belong to VGSRV volume group, mount to the /common directory. The

definition of size is 128 MB.

Requirement:

Extend the logical volume to 190 MB without any loss of data. The size is allowed between 160-160 MB after extending.

Correct Answer: See explanation below.

lvextend -L 190M /dev/mapper/vgsrv-common resize2fs /dev/mapper/vgsrv-common

  adolfoale Highly Voted  3 years, 2 months ago

Also this option is valid:


# lvextend -r -L 190M /dev/VGSRV/common
upvoted 8 times

  PENNSHARK Most Recent  2 months, 2 weeks ago


# Extend the Logical Volume to 190 MB
lvextend -r -L 190MB /dev/VGSRV/common

# Create a Mount Point


mkdir /mnt/common

# Create a Filesystem
mkfs.ext4 /dev/VGSRV/common

# Update /etc/fstab
echo "/dev/mapper/VGSRV-common /mnt/common ext4 defaults 0 0" >> /etc/fstab

# Mount the Logical Volume


mount -a

# Reload systemd
systemctl daemon-reload

# Check the Mount


mount
upvoted 1 times

  sovafal192 1 year, 6 months ago


###* mount the existing volume
###* if volume is ext4!
mkdir /common

nano /etc/fstab:
/dev/mapper/vgsrv-common /common ext4 defaults 1 2

mount -a

###* Expand 128M -> 190M


lvextend -L 190M /dev/mapper/vgsrv-common

or
lvextend -L +68M /dev/mapper/vgsrv-common

after lvextend we need to run xfsgrow or resize2fs in case of ext*


upvoted 2 times

  hareshrajpara 2 years, 11 months ago


# lvextend -rv -L 190M /dev/VGSRV/common
upvoted 4 times

  helpUs 3 years ago


I don't know this answer. why 190M? definition size is 128M. so extend size 68M. plz help me. why this answer is 190M?
upvoted 1 times

  ArchBishop 2 years, 10 months ago


you can either use:
lvextend -r L 190M /path/to/lvm
OR
lvextend -r L +62M /path/to/lvm

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 99/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

The first option specifies the exact amount that is being requested (190), while the second options is adding the difference (190-128=62) to
meet the requested storage amount.
upvoted 6 times

  ArchBishop 2 years, 10 months ago


Apologies, my 'L' requires a switch in front:
`lvextend -r -L [...]`
upvoted 2 times

Question #81 Topic 1

SIMULATION -

There is a local logical volumes in your system, named with shrink and belong to VGSRV volume group, mount to the /shrink directory. The

definition of size is 320

MB.

Requirement:

Reduce the logical volume to 220 MB without any loss of data. The size is allowed between 200-260 MB after reducing.

Correct Answer: See explanation below.

cd;umount /shrink

e2fsck -f /dev/mapper/vgsrv-shrink

resize2fs /dev/mapper/vgsrv-shrink 220M

lvreduce -L 220M /dev/mapper/vgsrv-shrink

mount -a

  sovafal192 1 year, 6 months ago


alternate solution, because of the possbile data loss if the data exchange is a little bit different between lvexreduce and resize2fs.

umount /shrink
e2fsck -f /dev/mapper/vgsrv-shrink
####* Shrink the file system as small as possible
resize2fs -M /dev/mapper/vgsrv-shrink
lvreduce -L 220M /dev/mapper/vgsrv-shrink
####* extend the file system to the max device size
resize2fs /dev/mapper/vgsrv-shrink
mount -a
upvoted 3 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 100/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #82 Topic 1

SIMULATION -

Create a swap space, set the size is 600 MB, and make it be mounted automatically after rebooting the system (permanent mount).

Correct Answer: See explanation below.

if=/dev/zero of=/swapfile bs=1M count=600 mkswap /swapfile

/etc/fstab:

/swapfile swap swap defaults 0 0 mount -a

  hareshrajpara Highly Voted  2 years, 11 months ago

# fdisk /dev/sda (create a swap partition with swap type)


#mkswap /dev/sda1
#vim /etc/fstab :- UUID=1328c481-4b04-4245-a3ee-36c42f47eea5 swap swap defaults 0 0
#swapon -a
#swapon -s
upvoted 6 times

  adolfoale Most Recent  3 years, 2 months ago


# Create swap partition with fdisk of 600MB
# mkswap -c /dev/sdb3
# echo "UUID=bb4b75dc-cb78-4dd9-82e3-ccc13530aca4 swap swap defaults 0 0" >> /etc/fstab
upvoted 3 times

Question #83 Topic 1

SIMULATION -

According the following requirements to create user, user group and the group members:

- A group named admin.

- A user named mary, and belong to admin as the secondary group.

- A user named alice, and belong to admin as the secondary group.

- A user named bobby, bobby's login shell should be non-interactive. Bobby not belong to admin as the secondary group.

Mary, Alice, bobby users must be set "password" as the user's password.

Correct Answer: See explanation below.

groupadd admin

useradd -G admin mary

useradd -G admin alice

useradd -s /sbin/nologin bobby

echo "password" | passwd --stdin mary

echo "password" | passwd --stdin alice

echo "password" | passwd --stdin bobby

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 101/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #84 Topic 1

SIMULATION -

According the following requirements to create a local directory /common/admin.

This directory has admin group.

This directory has read, write and execute permissions for all admin group members.

Other groups and users don't have any permissions.

All the documents or directories created in the/common/admin are automatically inherit the admin group.

Correct Answer: See explanation below.

mkdir -p /common/admin

chgrp admin /common/admin

chmod 2770 /common/admin

  STFN2019 Highly Voted  2 years, 6 months ago

Full solution:
mkdir -p /common/admin
groupadd admin
chown :admin -R /common
chmod 775 -R /common
chmod g+s -R /common
touch testfile (to verify the latter requirement)
upvoted 5 times

  sirasdf 1 year, 8 months ago


-R is not required. SGID will apply future group owner
upvoted 1 times

  Xtamata 2 years, 5 months ago


you forget that 'Other groups and users don't have permission". instead of chmod 775 /common, the correct command is chmod 770
/common.
upvoted 7 times

  PENNSHARK Most Recent  2 months, 2 weeks ago

mkdir -p /common/admin
groupadd admin
chown :admin /common/admins
chmod 770 /common/admins
chmod g+s /common/admins
upvoted 1 times

  ktd971 2 weeks, 6 days ago


770 mean that the Other groups and users don't have permission ?
upvoted 1 times

  sovafal192 1 year, 6 months ago


####* prepare, if not present
mkdir -p /common/admin
groupadd admin

####* owner group


chown .admin /common/admin/
####* remove not needed permissions
chmod o-rwx /common/admin/
chmod u-rwx /common/admin/
####* add group permissions and sticky bit
chmod g+rwxs /common/admin/
upvoted 1 times

  kitkat 1 year, 8 months ago


groupadd admin
mkdir -p /common/admin
chgrp -R admin /common/admin
setfacl -R -m u::---,g::---,g:admin:rwx /common/admin ---this makes sure other groups has no access
setfacl -R -dm o::- /common/admin ---this makes sure others do not have access to folders
chmod -R g+s /common/admin ---turn sticky bit on for the group
upvoted 1 times

  kitkat 1 year, 8 months ago


groupadd admin
mkdir -p /common/admin
https://www.examtopics.com/exams/redhat/ex200/custom-view/ 102/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

chgrp -R admin /common/admin


setfacl -R -m u::---,g::---,g:admin:rwx /common/admin
---this makes sure other groups has no access

setfacl -R -dm o::- /common/admin


---this makes sure others do not have access to folders

chmod -R g+s /common/admin


---turn sticky bit on for the group
upvoted 1 times

  14_aman 1 year, 10 months ago


I THINK IN THIS QUESTION APPLY FOR ACL FOR ADMIN GROUP
# setfacl -m g:admin:rwx /common/admin
change permission for other group and other user
#chmod 700 /common/admin
apply guid
#chmod g+s /common/admin
please reply
upvoted 1 times

  Mbuthia 2 years, 1 month ago


groupadd admin
mkdir -p /common/admin
chgrp -R admin /common/admin
setfacl -R -m u::---,g::---,g:admin:rwX /common/admin
chmod -R g+s /common/admin
upvoted 2 times

  kitkat 1 year, 8 months ago


when you already used rwX when why do you need g+s in the next command? Didn't rwX already set the sticky bit for group above?
upvoted 1 times

  kitkat 1 year, 8 months ago


i think capital X was and error which would make sense why g+s was used
upvoted 1 times

  cloudyhr 2 years, 2 months ago


#Create Directory
mkdir -p /common/admin
-p, --parents no error if existing, make parent directories as needed

#Create Group
groupadd admin

#change group for /common/admin


chown root:admin /common/admin
or
chgrp admin /common/admin

#give group full permission and other no permissions


chmod 770 /common/admin
upvoted 4 times

  cloudyhr 2 years, 2 months ago


#finally setGUID
chmod 2770/common/admin
upvoted 5 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 103/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #85 Topic 1

SIMULATION -

Update the kernel from ftp://instructor.example.com/pub/updates.

According the following requirements:

The updated kernel must exist as default kernel after rebooting the system.

The original kernel still exists and is available in the system.

Correct Answer: See explanation below.

rpm -ivh kernel-firm‫ג‬€¦

rpm -ivh kernel...

  PENNSHARK 2 months, 2 weeks ago


yum install ftp://instructor.example.com/pub/updates
grubby --info=ALL (check what index the kernel is on)
uname -a (see our current kernel
grubby --set-default-index (put what number the index of the updated kernel is on)
reboot
uname -a
upvoted 1 times

Question #86 Topic 1

SIMULATION -

User mary must configure a task.

Requirement: The local time at 14:23 every day echo "Hello World.".

Correct Answer: See explanation below.

crontab -u mary -e

23 14 * * * echo "Hello World."

  STFN2019 2 years, 6 months ago


crontab -u user -e
23 14 * * * /bin/echo "Hello World."
crontab -u user -l to verify
upvoted 3 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 104/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #87 Topic 1

SIMULATION -

The user authentication has been provided by ldap domain in 192.168.0.254. According the following requirements to get ldapuser.

-LdapuserX must be able to login your system, X is your hostname number. But the ldapuser's home directory cannot be mounted, until you realize

automatically mount by autofs server.

- All ldap user's password is "password".

Correct Answer: See explanation below.

system-config-authentication &

  sharinganwarrior 1 month ago


not in the exam
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 105/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #88 Topic 1

SIMULATION -

According the following requirements, configure autofs service and automatically mount to user's home directory in the ldap domain.

- Instructor.example.com (192.168.0.254) has shared /home/guests/ldapuserX home directory to your system by over NFS export, X is your

hostname number.

- LdapuserX's home directory is exist in the instructor.example.com: /home/ guests/ldapuserX

- LdapuserX's home directory must be able to automatically mount to /home/ guests/ldapuserX in your system.

- Home directory have write permissions for the corresponding user.

However, you can log on to the ldapuser1 - ldapuser99 users after verification. But you can only get your corresponding ldapuser users. If your

system's hostname is server1.example.com, you can only get ldapuser1's home directory.

Correct Answer: See explanation below.

mkdir ‫ג‬€"p /home/guests

cat /etc/auto.master:

/home/guests /etc/auto.ldap

cat /etc/auto.ldap:

ldapuser1 -rw instructor.example.com:/home/guests/ldapuser1

automatically mount all the user's home directory #* -rw instructor.example.com:/home/guests/&

  PENNSHARK 2 months, 2 weeks ago


yum install autofs
vi /etc/auto.master
/home/guests /etc/auto.ldapusers
vi /etc/auto.ldapusers
* -rw,intr,soft,instructor.example.com:/home/guests/ldapuser1
* -rw,intr,soft,instructor.example.com:/home/guests/ldapuser2
# Continue for ldapuser3 to ldapuser99
chmod 600 /etc/auto.ldapusers
systemctl start autofs
systemctl enable autofs
cd /home/guests/ldapuser1
touch testfile
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 106/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #89 Topic 1

SIMULATION -

Copy /etc/fstab document to /var/TMP directory. According the following requirements to configure the permission of this document.

✑ The owner of this document must be root.


✑ This document belongs to root group.
✑ User mary have read and write permissions for this document.
✑ User alice have read and execute permissions for this document.
✑ Create user named bob, set uid is 1000. Bob have read and write permissions for this document.
✑ All users has read permission for this document in the system.

Correct Answer: See explanation below.

cp /etc/fstab /var/tmp

chown root:root /var/tmp/fstab

chmod a-x /var/tmp/fstab

setfacl ‫ג‬€"m u:mary:rw /var/tmp/fstab

setfacl ‫ג‬€"m u:alice:rx /var/tmp/fstab

useradd ‫ג‬€"u 1000 bob

  STFN2019 Highly Voted  2 years, 6 months ago

Full solution:
# cp /etc/fstab /var/tmp
# chown root:root /var/tmp/fstab
# useradd mary
# useradd alice
# useradd -u 1000 bob
# setfacl -m u:mary:rw- /var/tmp/fstab
# setfacl -m u:alice:r-x /var/tmp/fstab
# setfacl -m u:bob:rw- /var/tmp/fstab
# chmod o+r-- /var/tmp/fstab
# getfact /var/tmp/fstab (to verify all permissions)
# ls -ltr /var/tmp/fstab (to verify all permissions)
upvoted 8 times

  gigimakis 5 months, 4 weeks ago


they dont ask to create mary and alice
upvoted 1 times

  adolfoale Highly Voted  3 years, 2 months ago


# mkdir /var/tmp
# useradd -g 1000 bob
# setfacl -m u:mary:rw /var/tmp/fstab
# setfacl -m u:alice:rx /var/tmp/fstab
# setfacl -m u:bob:rw /var/tmp/fstab
# setfacl -m o::r /var/tmp/fstab
upvoted 8 times

  FaridShakhh 2 years, 3 months ago


Set UID
#useradd -u 1000 bob
upvoted 5 times

  wizojlo Most Recent  1 month, 1 week ago

Since /var/tamp always exists anyway, no need to create it.

#cp /etc/fstab /var/tmp


#chown :root /var/tmp/fstab
#useradd mary
#useradd alice
#useradd -u 1000 bob
#setfacl -m u:mary:rw-,u:alice:r-x,u:bob:rw-,o::r /var/tmp/fstab
upvoted 1 times

  mattd81 1 year, 11 months ago


Copy /etc/fstab document to /var/TMP directory. It says to copy to the /vat/TMP folder why are all the comments making changes to the
/var/tmp/fstab directory?
upvoted 2 times

  tester27 1 year, 10 months ago

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 107/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

fstab is not a directory, it is a file.


so the file you'll modify and have now is the fstab under /var/tmp location
upvoted 1 times

  frusty 2 years ago


useradd -u 1000 --non-unique bob --in case the uid 1000 is already used
upvoted 1 times

  jahute27 2 years, 11 months ago


the only thing i would change is: useradd -u 1000 bob
upvoted 3 times

Question #90 Topic 1

SIMULATION -

Configure the NTP service in your system.

Correct Answer: See explanation below.

system-config-date &

  Dumpbase2020 9 months, 2 weeks ago


rpm -qa | grep chrony
vi /etc/chrony.conf and add ( specified ip iburst)
systemctl enable chronyd
systemctl restart chronyd
timedatectl set-ntp true
timedatectl status to verify
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 108/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #91 Topic 1

SIMULATION -

Configure the FTP service in your system, allow remote access to anonymous login and download the program by this service. Service is still

running after system rebooting.

Correct Answer: See explanation below.

yum install vsftpd

/etc/init.d/vsftpd start

chkconfig vsftpd on

  Kindolos1 1 year, 7 months ago


No longer part of the exam
upvoted 2 times

Question #92 Topic 1

SIMULATION -

Configure your web services, download from http://instructor.example.com/pub/serverX.html And the services must be still running after system

rebooting.

Correct Answer: See explanation below.

cd /var/www/html

wget http://instructor.example.com/pub/serverX.html mv serverX.html index.html /etc/init.d/httpd restart chkconfig httpd on

  STFN2019 2 years, 6 months ago


# systemctl status httpd (check if apache is running)
# systemctl start httpd (if not started already)
# systemctl enable httpd (enable upon boot)
# wget http://instructor.example.com/pub/serverX.html
upvoted 3 times

  wizojlo 1 month, 1 week ago


The file should be downloaded to /var/www/html, so before doing wget, change directory.

#cd /var/www/html
upvoted 1 times

  adolfoale 3 years, 2 months ago


In RHEL8:
# systemctl enable --now httpd.services
upvoted 4 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 109/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #93 Topic 1

SIMULATION -

Create a volume group, and set the size is 500M, the size of single PE is 16M. Create logical volume named lv0 in this volume group, set size is 20

PE, make it as ext3 file system, and mounted automatically under data.

Correct Answer: See explanation below.

fdisk /dev/vda

pvcreate /dev/vda3

vgcreate ‫ג‬€"s 16M vg0 /dev/vda3

lvcreate ‫ג‬€"n lv0 ‫ג‬€"l 20 vg0

mkfs.ext3 /dev/mapper/vg0-lv0

mkdir /data

/etc/fstab:

/dev/mapper/vg0-lv0 /data ext3 defaults 0 0

mount ‫ג‬€"a

mount | grep data

  PENNSHARK 2 months, 2 weeks ago


pvcreate /dev/nvme1n1
vgcreate -s 500M VGEX /dev/nvme1n1
lvcreate -n lvex -L 320M VGEX
mkfs.ext3 /dev/VGEX/lvex
mkdir /mnt/data
echo “/dev/mapper/VGEX-lvex /mnt/data ext3 defaults 0 0” >> /etc/fstab
mount -a
mount
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 110/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #94 Topic 1

SIMULATION -

Download the document from ftp://instructor.example.com/pub/testfile, find all lines containing [abcde] and redirect to /MNT/answer document,

then rearrange the order according the original content.

Correct Answer: See explanation below.

Download the file to /tmp first -

grep [abcde] /tmp/testfile > /mnt/answer

  jahute27 Highly Voted  2 years, 11 months ago

# wget ftp://instructor.example.com/pub/testfile
# mkdir -p /MNT/answer
# grep ‘abcde’ testfile > /MNT/answer
upvoted 8 times

  cloudyhr 2 years, 2 months ago


mkdir will create a folder, to create a file we should use the touch command
touch /mnt/answer
upvoted 3 times

  Kindolos1 1 year, 6 months ago


redirect will create the file automatically
upvoted 2 times

  kenkct Most Recent  2 years ago


sudo su
mkdir -p /MNT
wget ftp://instructor.example.com/pub/testfile
grep 'abcde' testfile > /MNT/answer
cat /MNT/answer (to verify)
upvoted 2 times

Question #95 Topic 1

SIMULATION -

SELinux must be running in the Enforcing mode.

Correct Answer: See explanation below.

getenforce // Check the current mode of SELinux // SELinux runs in enforcing mode // Check getenforce 1 getenforce vim /etc/selinux/config

selinux=enforcing // To temporarily enable SELinux

: wg

sestatus

  STFN2019 2 years, 6 months ago


# getenforce (check the current mode)
# setenforce 1 (change the mode to enforcing)
OR
# vi /etc/selinux/config
selinux=enforcing
upvoted 3 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 111/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #96 Topic 1

SIMULATION -

A YUM repository has been provided at http://server.domain11.example.com/pub/x86_64/Server.

Configure your system to use this location as a default repository.

Correct Answer: See explanation below.

vim/etc/yum.repos/base.repo

[base]

name=base

baseurl= http://server.domain11.example.com/pub/x86_64/Server gpgcheck=0 enable=1

Save and Exit -

Use yum list for validation, the configuration is correct if list the package information. If the Yum configuration is not correct then maybe cannot

answer the following questions.

  PENNSHARK 2 months, 2 weeks ago


yum install http://server.domain11.example.com/pub/x86_64/Server.
uname -a
grubby --info=ALL (shows the repository of all kernels)
grubby --set-default [the location of http://server.domain11.example.com/pub/x86_64/Server. Or path index number]
reboot
uname -a
upvoted 1 times

Question #97 Topic 1

SIMULATION -

Resize the logical volume vo and its filesystem to 290 MB. Make sure that the filesystem contents remain intact.

Note: Partitions are seldom exactly the same size requested, so a size within the range of 260 MB to 320 MiB is acceptable.

Correct Answer: See explanation below.

df -hT

lvextend -L +100M /dev/vg0/vo

lvscan

xfs_growfs /home/ // home is LVM mounted directory

Note: This step is only need to do in our practice environment, you do not need to do in the real exam resize2fs /dev/vg0/vo // Use this comand

to update in the real exam df -hT

OR -

e2fsck -f/dev/vg0/vo

umount /home

resize2fs /dev/vg0/vo required partition capacity such as 100M lvreduce -l 100M /dev/vg0/vo mount /dev/vg0/vo /home df ‫ג‬€"Ht

  PENNSHARK 2 months, 2 weeks ago


lvdisplay (to get the logical volume path )
lvresize -r -L 290MB /dev/volumegroup/logical
upvoted 1 times

  maxam20 1 month, 3 weeks ago


++ depends on the type of the file system , we should resize it.
XFS >> $ xfs_growfs "mountpoint"
ext2 >> $ resize2fs "lv_path"
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 112/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #98 Topic 1

SIMULATION -

Create the following users, groups, and group memberships:

A group named adminuser.

A user natasha who belongs to adminuser as a secondary group A user harry who also belongs to adminuser as a secondary group.

A user sarah who does not have access to an interactive shell on the system, and who is not a member of adminuser, natasha, harry, and sarah

should all have the password of redhat.

Correct Answer: See explanation below.

groupadd sysmgrs

useradd -G sysmgrs Natasha

We can verify the newly created user by cat /etc/passwd)

# useradd -G sysmgrs harry

# useradd -s /sbin/nologin sarrh

# passwd Natasha

# passwd harry

# passwd sarrah

  STFN2019 Highly Voted  2 years, 6 months ago

Full solution:
# groupadd adminuser
# useradd -aG adminuser natasha
# useradd -aG adminuser harry
# useradd -s /sbin/nologin sarah
# echo 'redhat' | passwd --stdin natasha
# echo 'redhat' | passwd --stdin harry
# echo 'redhat' | passwd --stdin sarah
upvoted 6 times

  [Removed] 1 year, 10 months ago


This is correct.
On the useradd -s, "-s" is for "shell."
upvoted 1 times

  kitkat 1 year, 8 months ago


what is the a in -aG for? Help page for useradd has no mention of -a option.
upvoted 2 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 113/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #99 Topic 1

SIMULATION -

Configure the permissions of /var/tmp/fstab

Copy the file /etc/fstab to /var/tmp/fstab. Configure the permissions of /var/tmp/fstab so that: the file /var/tmp/fstab is owned by the root user.

the file /var/tmp/fstab belongs to the group root. the file /var/tmp/fstab should not be executable by anyone. the user natasha is able to read and

write /var/tmp/fstab. the user harry can neither write nor read /var/tmp/fstab. all other users (current or future) have the ability to read

/var/tmp/fstab.

Correct Answer: See explanation below.

cp -a /etc/fstab /var/tmp

cd /var/tmp

ls -l

getfacl /var/tmp/fstab

chmod ugo-x /var/tmp/fstab

[ No need to do this, there won't be execute permission for the file by default]

# setfacl -m u:natasha:rw /var/tmp/fstab # setfacl -m u:harry:0 /var/tmp/fstab(zero)

[Read permission will be there for all the users, by default. Check it using ls -l /var/tmp/fstab] Verify by

[ ls -la /var/tmp/fstab]

  PENNSHARK 2 months, 2 weeks ago


cp /etc/fstab /var/tmp/fstab
chown root /var/tmp/fstab
chown :root /var/tmp/fstab
chmod 666
setfacl -m u:natasha:rw- /var/tmp/fstab
setfacl -m u:harry:--- /var/tmp/fstab
chmod o-w /var/tmp/fstab
upvoted 1 times

Question #100 Topic 1

SIMULATION -

Set cronjob for user natasha to do /bin/echo hiya at 14:23.

Correct Answer: See explanation below.

# crontab -e -u natasha

23 14 * * * /bin/echo hiya

:wq!

  PENNSHARK 2 months, 2 weeks ago


Set cronjob for user natasha to do /bin/echo hiya at 14:23.
vi /etc/crontab (copy the crontab to natasha)
crontab -u natasha -e
23 14 * * * /bin/echo “hiya”
:wq
crontab -u natasha -l
upvoted 1 times

  STFN2019 2 years, 6 months ago


crontab -u natasha -e
INSERT: 23 14 * * * /bin/echo hiya
crontab -u natasha -l (verify)
upvoted 4 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 114/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #101 Topic 1

SIMULATION -

Create a collaborative directory/home/admins with the following characteristics:

Group ownership of /home/admins is adminuser

The directory should be readable, writable, and accessible to members of adminuser, but not to any other user. (It is understood that root has

access to all files and directories on the system.)

Files created in /home/admins automatically have group ownership set to the adminuser group

Correct Answer: See explanation below.

mkdir /home/admins

chgrp -R adminuser /home/admins

chmodg+w /home/admins

chmodg+s /home/admins

  PENNSHARK 2 months, 2 weeks ago


roupadd adminuser
[root@3af65124781c ~]# mkdir /home/admins
[root@3af65124781c ~]# chown :adminuser /home/admins
[root@3af65124781c ~]# setfacl -m g:adminuser:rw /home/admins
[root@3af65124781c ~]# chmod o-rwx /home/admins
[root@3af65124781c ~]# chmod g+s /home/admins
upvoted 2 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 115/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #102 Topic 1

SIMULATION -

Install the appropriate kernel update from http://server.domain11.example.com/pub/updates.

The following criteria must also be met:

The updated kernel is the default kernel when the system is rebooted

The original kernel remains available and bootable on the system

Correct Answer: See explanation below.

ftp server.domain11.example.com Anonymous login

ftp> cd /pub/updates ftp> ls

ftp> mget kernel* ftp> bye

rpm -ivh kernel*

vim /etc/grub.conf

Check the updatted kernel is the first kernel and the orginal kernel remains available. set default=0

:wq!

  salamm 3 months, 2 weeks ago


Install the appropriate kernel update from http://server.domain11.example.com/pub/updates.
The following criteria must also be met:
The updated kernel is the default kernel when the system is rebooted
The original kernel remains available and bootable on the system
the way i will do this: cd / then; wget http://server.domain11.example.com/pub/updates, ls -al if new kernel is there I will copy it somewhere and
check current kernelswith the command #grubby --info=ALL ----this is to see all kernel
then #grubby --default-kernel to see the default if its different from the new one
to set new kernel use #grubby --set-default=/kernel/path then check with #grubby --default-kernel or STFN2019's solution dnf config-manager --
add-repo http://server.domain11.example.com/pub/updates then; run #dnf update
upvoted 1 times

  kenkct 2 years ago


yum config-manager --add-repo {given_url}
yum update kernel
upvoted 1 times

  STFN2019 2 years, 6 months ago


The solution to the questions seems very confusing. Best way is to update the repos and install the new kernel which becomes your default kernel
anyway, no need for any further changes. Simply follow an e.g. link here: https://computingforgeeks.com/how-to-install-latest-kernel-on-centos-
linux/
upvoted 3 times

  ANI_04 2 years, 5 months ago


$ dnf config-manager --add-repo {given_url}
$ dnf update
I agree with STFN2019 , maybe the above step will get the work done!
upvoted 3 times

  ArchBishop 2 years, 10 months ago


Question:
You should be able to use wget to obtain the correct packages here, yes?
Is the only reason they didn't because they don't have the full path/name of the file to correctly use the command?
upvoted 2 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 116/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #103 Topic 1

SIMULATION -

The system ldap.example.com provides an LDAP authentication service.

Your system should bind to this service as follows:

The base DN for the authentication service is dc=domain11, dc=example, dc=com LDAP is used to provide both account information and

authentication information. The connection should be encrypted using the certificate at http://host.domain11.example.com/pub/domain11.crt

When properly configured, ldapuserX should be able to log into your system, but will not have a home directory until you have completed the

autofs requirement.

Username: ldapuser11 -

Password: password -

Correct Answer: See explanation below.

system-config-authentication LDAP user DN=dc=domain11,dc=example,dc=com Server= host.domain11.example.com

Certificate= http://host.domain11.example.com/pub/domain11.crt (enter url carefully, there maybe // or ..)

LDAP password -

OK -

starting sssd

su -ldapuser11 Display Bash prompt #exit

  sugisho 2 years, 8 months ago


is this valid in RHEL 8?
upvoted 2 times

  urWaifu 1 year, 9 months ago


LDAP is not part of RHEL8
upvoted 2 times

Question #104 Topic 1

SIMULATION -

Configure your system so that it is an NTP client of server.domain11.example.com

Correct Answer: See explanation below.

#system-config-date

Note: dialog box will open in that

Check mark Synchronize date and time over network. Remove all the NTP SERVER and click ADD and type server.domain11.example.com

****************And then press ENTER and the press OK***************

  Sz0p3n 2 years, 10 months ago


yum install chrony*
vim /etc/chrony.conf
server server.domain11.example.com
:wq
systemctl enable --now chronyd
chronyc sources
upvoted 3 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 117/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #105 Topic 1

SIMULATION -

Configure autofs to automount the home directories of LDAP users as follows: host.domain11.example.com NFS-exports /home to your system.

This filesystem contains a pre-configured home directory for the user ldapuser11 ldapuser11's home directory is host.domain11.example.com

/rhome/ldapuser11 ldapuser11's home directory should be automounted locally beneath /rhome as /rhome/ldapuser11

Home directories must be writable by their users

ldapuser11's password is 'password'.

Correct Answer: See explanation below.

vim /etc/auto.master /rhome /etc/auto.misc

:wq!

# vim /etc/auto.misc

ldapuser11 --rw,sync host.domain11.example.com:/rhome/ldpauser11 :wq!

#service autofs restart

service autofs reload

chkconfig autofs on

su -ldapuser11

Login ldapuser with home directory

# exit

  Mahdi1985 2 years ago


hello, i have below full question for AutoFS:

configure autofs to automount the home directories or remote users as follows:


1: utility.domain.com (172.1....) NFS-exports /rhome to your system. this filesystem contains a pre-configured home directory for the user
remotuser16
2: remotuser16 home directory is utility.domain.com:/rhome/remotuser16
3: remotuser16 home directory should be automounted locally locally beneath /rhome as /rhome /remoteuser16
4: home directories must be writable by their users
5: remoteusers16 password is ratencot

any one can help with the steps in sequence.


upvoted 1 times

  Hmenu0s 1 year, 8 months ago


the question states " home directorie[s] must be writable by their user[s]" , so i assume they are referring to autofs indirect method mount. This
will work for remoteuser16 as well as for future remoteuser homedir mounts.

Here is how i will address it -


# install autofs if not installed
dnf install -y autofs

# Create autofs file - defining the base mount dir . here it is /rhome - where all the homedirs will be mounted
vi /etc/auto.master.d/auto.autofs
/rhome /etc/home.indirect

# create the indirect mount file


vi /etc/home.indirect
* -rw,sync host.domain11.example.com:/rhome/&
# enable and start autofs
systemctl enable --now autofs

# Validate
su - remoteuser16
pwd
touch testfile
upvoted 2 times

  preethi07 2 years, 6 months ago


vim /etc/auto.master.d/direct.autofs
/ -/etc/auto.direct
vim /etc/auto.direct
ldapuser11 -rw,sync,nstype=nfs4 host.domain11.example.com:/home
systemctl restart autofs
systemctl enable --now autofs
upvoted 3 times

  STFN2019 2 years, 6 months ago

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 118/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

This seems like the most straightforward solution. Thx mate!


upvoted 2 times

  Stachomir 2 years, 8 months ago


I think provided solution have mistake. I see resolution as below:
vim /etc/auto.master.d/demo.autofs
(/rhome /etc/auto.demo)
vim /etc/auto.demo
(ldapuser11 -rw,sync host.domain11.example.com:/home)
As task mention that host.domain11.example.com exports /home dir ? Am I right?
upvoted 3 times

  ALBY19 3 years, 6 months ago


vim /etc/auto.master.d/blah.autofs
upvoted 1 times

Question #106 Topic 1

SIMULATION -

Create a user alex with a userid of 3400. The password for this user should be redhat.

Correct Answer: See explanation below.

useradd -u 3400 alex

passwd alex

su -alex

Question #107 Topic 1

SIMULATION -

Add an additional swap partition of 754 MB to your system.

The swap partition should automatically mount when your system boots.

Do not remove or otherwise alter any existing swap partitions on your system.

Correct Answer: See explanation below.

fdisk -l

fdisk -cu /dev/vda

pn

e or p select e

default (first): enter

default (last): enter n

default(first): enter

default(first): +754M t (1-5)

l: 82 p

w #reboot

#mkswap /dev/vda5

vim /etc/fstab

/dev/vda5 swap swap defaults 0 0

:wq

mount -a

swapon -a

swapon -s

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 119/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #108 Topic 1

SIMULATION -

Locate all the files owned by ira and copy them to the / root/findresults directory.

Correct Answer: See explanation below.

# find / -user ira > /root/findresults (if /root/findfiles is a file)

# mkdir -p /root/findresults

# find / -user ira -exec cp -a {} /root/findresults\; [ if /root/findfiles is a directory] ls /root/findresults

  mattd81 1 year, 9 months ago


find / -user ira -type f -exec cp {} /root/findfiles \;
upvoted 3 times

  Stachomir 2 years, 8 months ago


cp -rp $(find / -user ira -type f) /root/findfiles
upvoted 3 times

  STFN2019 2 years, 6 months ago


Thx Stachomir, that's really helpful
upvoted 1 times

Question #109 Topic 1

SIMULATION -

Find all lines in the file /usr/share/dict/words that contain the string seismic. Put a copy of all these lines in their original order in the file

/root/wordlist. /root/wordlist should contain no empty lines and all lines must be exact copies of the original lines in /usr/share/dict/words.

Correct Answer: See explanation below.

grep seismic /usr/share/dict/words> /root/wordlist

  2022G 1 year, 11 months ago


can we do it like this?
#cd /usr/share/dict
#grep seismic cp /root/wordlist
upvoted 1 times

  STFN2019 2 years, 6 months ago


[root@uranium ~]# grep seismic /usr/share/dict/words > /root/wordlist
[root@uranium ~]# cat /root/wordlist
upvoted 2 times

  cloudyhr 2 years, 2 months ago


grep seismic /usr/share/dict/words >> /root/wordlist
upvoted 2 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 120/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

Question #110 Topic 1

SIMULATION -

Create a backup file named /root/backup.tar.bz2, which contains the contents of /usr/local, bar must use the bzip2 compression.

Correct Answer: See explanation below.

cd /usr/local

tar -jcvf /root/backup.tar.bz2*

mkdir /test

tar -jxvf /root/backup.tar.bz2 -C /test/

  STFN2019 2 years, 6 months ago


Archive through bzip2 in a current dir:
tar -jcvf backup.tar.bz2 /usr/local

Extract:
mkdir /test
tar -jxvf backup.tar.bz2 -C /test
upvoted 4 times

  hareshrajpara 2 years, 11 months ago


# tar cvf backup.tar /usr/local
#bzip2 backup.tar
upvoted 2 times

Question #111 Topic 1

SIMULATION -

Create a new logical volume according to the following requirements:

The logical volume is named database and belongs to the datastore volume group and has a size of 50 extents.

Logical volumes in the datastore volume group should have an extent size of 16 MB.

Format the new logical volume with a ext3 filesystem.

The logical volume should be automatically mounted under /mnt/database at system boot time.

Correct Answer: See explanation below.

fdisk -cu /dev/vda

partx -a /dev/vda

pvcreate /dev/vdax

vgcreate datastore /dev/vdax -s 16M

lvcreate-l 50 -n database datastore

mkfs.ext3 /dev/datastore/database

mkdir /mnt/database

mount /dev/datastore/database /mnt/database/ df -Th

vi /etc/fstab

/dev/datastore /database /mnt/database/ ext3 defaults 0 0 mount -a

  wizojlo 1 month ago


#lsblk -pf (to check unused disks and partitions - let's say sda1 and sda2 are empty)
#pvcreate /dev/sda1 /dev/sda2
#vgcreate -s 16M datastore /dev/sda1 /dev/sda2
#lvcreate -l 50 -n database datastore
#mkfs.ext3 /dev/datastore/database
#mkdir -p /mnt/database
#lsblk -pf (to see the UUIDs)
#echo 'UUID=XXX /mnt/data ext4 defaults 0 0' >> /etc/fstab (use real UUID of "database" volume from previous step instead of XXX)
#systemctl daemon-reload
#mount -a
upvoted 1 times

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 121/122
2024/3/31 12:46 EX200 Exam - Free Actual Q&As, Page 1 | ExamTopics

https://www.examtopics.com/exams/redhat/ex200/custom-view/ 122/122

You might also like