[Aug-2021] EX200 Pre-Exam Practice Tests | Exam Questions and Answers for RHCSA Study Guide
Red Hat Certified System Administrator - RHCSA Certification Sample Questions
NEW QUESTION 33
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.
Answer:
Explanation:
see explanation below.
Explanation
nameserver is specified in question,
1. Vi /etc/resolv.conf
nameserver 192.168.0.254
2. host server1.example.com
NEW QUESTION 34
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.
Answer:
Explanation:
see explanation below.
Explanation
# cd /home/
# mkdir admins /
# chown .admin admins/
# chmod 770 admins/
# chmod g+s admins/
NEW QUESTION 35
Create one partitions having size 100MB and mount it on data.
Answer:
Explanation:
see explanation below.
Explanation
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
NEW QUESTION 36
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
Answer:
Explanation:
see explanation below.
Explanation
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.
NEW QUESTION 37
SELinux must run in force mode.
Answer:
Explanation:
see explanation below.
Explanation
/etc/sysconfig/selinux
SELINUX=enforcing
NEW QUESTION 38
Upgrade the kernel, start the new kernel by default. kernel download from this address:
ftp://server1.domain10.example.com/pub/update/new.kernel
Answer:
Explanation:
see explanation below.
Explanation
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
NEW QUESTION 39
CORRECT TEXT
Configure the system synchronous as 172.24.40.10.
Answer:
Explanation:
Graphical Interfaces:
System-->Administration-->Date & Time
OR
# system-config-date
NEW QUESTION 40
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.
Answer:
Explanation:
see explanation below.
Explanation
* 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]
NEW QUESTION 41
SIMULATION
Configure NTP.
Configure NTP service, Synchronize the server time, NTP server: classroom.example.com
Answer:
Explanation:
See explanation below.
Explanation/Reference:
Explanation: 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
NEW QUESTION 42
Configure a task: plan to run echo "file" command at 14:23 every day.
Answer:
Explanation:
Answer see in the explanation.
Explanation/Reference:
(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"
NEW QUESTION 43
CORRECT TEXT
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.
Answer:
Explanation:
# 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)
NEW QUESTION 44
Make on /archive directory that only the user owner and group owner member can fully access.
Answer:
Explanation:
see explanation below.
Explanation
* 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
NEW QUESTION 45
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.
Answer:
Explanation:
see explanation below.
Explanation
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
NEW QUESTION 46
The file index.php, which is being maintained in a git repository, was changed locally and contains an error. If
the error has not been committed to the repository yet, which of the following gitcommands reverts the local
copy of index.phpto the latest committed version in the current branch?
- A. git lastver - index.php
- B. git clean - index.php
- C. git repair - index.php
- D. git revert - index.php
- E. git checkout - index.php
Answer: D
Explanation:
Explanation/Reference:
Reference https://git-scm.com/docs/git-revert
NEW QUESTION 47
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.
Answer:
Explanation:
see explanation below.
Explanation
* 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.
NEW QUESTION 48
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.
Answer:
Explanation:
See explanation below.
Explanation/Reference:
Explanation:
(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.
NEW QUESTION 49
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.
Answer:
Explanation:
Answer see in the explanation.
Explanation/Reference:
# 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
NEW QUESTION 50
Find the files owned by harry, and copy it to catalog: /opt/dir
Answer:
Explanation:
see explanation below.
Explanation
# cd /opt/
# mkdir dir
# find / -user harry -exec cp -rfp {} /opt/dir/ \;
NEW QUESTION 51
SIMULATION
Please open the ip_forward, and take effect permanently.
Answer:
Explanation:
See explanation below.
Explanation/Reference:
Explanation:
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
NEW QUESTION 52
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".
Answer:
Explanation:
see explanation below.
Explanation
system-config-authentication &
NEW QUESTION 53
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
Answer:
Explanation:
see explanation below.
Explanation
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.
NEW QUESTION 54
Create a backup file named /root/backup.tar.bz2, which contains the contents of /usr/local, bar must use the bzip2 compression.
Answer:
Explanation:
see explanation below.
Explanation
cd /usr/local
tar -jcvf /root/backup.tar.bz2*
mkdir /test
tar -jxvf /root/backup.tar.bz2 -C /test/
NEW QUESTION 55
CORRECT TEXT
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. )
Answer:
Explanation:
# 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
NEW QUESTION 56
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
Answer:
Explanation:
see explanation below.
Explanation
mkdir /home/admins
chgrp -R adminuser /home/admins
chmodg+w /home/admins
chmodg+s /home/admins
NEW QUESTION 57
......
RedHat Exam Practice Test To Gain Brilliante Result: https://www.passtorrent.com/EX200-latest-torrent.html
Tested Material Used To EX200: https://drive.google.com/open?id=1kruR7zYcY24rFs_WSg9J-qphdV7beixf