Академический Документы
Профессиональный Документы
Культура Документы
48q
Number: EX200
Passing Score: 800
Time Limit: 120 min
https://www.gratisexam.com/
EX200
https://www.gratisexam.com/
Exam A
QUESTION 1
SIMULATION
https://www.gratisexam.com/
Correct Answer: See explanation below.
Section: (none)
Explanation
Explanation/Reference:
Explanation: # 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>
QUESTION 2
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.
https://www.gratisexam.com/
Explanation
Explanation/Reference:
Explanation: system-config-authentication
LDAP Server: ldap//instructor.example.com (In domain form, not write IP)
OR
QUESTION 3
SIMULATION
Explanation/Reference:
Explanation: Graphical Interfaces:
System-->Administration-->Date & Time
OR
# system-config-date
QUESTION 4
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.)
https://www.gratisexam.com/
Section: (none)
Explanation
Explanation/Reference:
Explanation: # 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)
QUESTION 5
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.
Explanation/Reference:
Explanation: # pvcreate /dev/sda7 /dev/sda8
# vgcreate -s 16M vg1 /dev/sda7 /dev/sda8
https://www.gratisexam.com/
# 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)
QUESTION 6
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.
Explanation/Reference:
Explanation: # 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
QUESTION 7
SIMULATION
Explanation/Reference:
Explanation: # useradd -u 601 -s /sbin/nologin user1
https://www.gratisexam.com/
# passwd user1
redhat
QUESTION 8
SIMULATION
https://www.gratisexam.com/
Correct Answer: See explanation below.
Section: (none)
Explanation
Explanation/Reference:
Explanation: # useradd -G admin user2
# useradd -G admin user3
# passwd user2
redhat
# passwd user3
redhat
QUESTION 9
SIMULATION
Copy /etc/fstab to /var/tmp name admin, the user1 could read, write and modify it, while user2 without any permission.
Explanation/Reference:
Explanation: # 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
https://www.gratisexam.com/
# ls -l
-rw-rw-r--+ 1 root admin 685 Nov 10 15:29 /var/tmp/fstab
QUESTION 10
SIMULATION
Configure a task: plan to run echo "file" command at 14:23 every day.
Explanation/Reference:
Explanation: (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"
QUESTION 11
SIMULATION
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.
Explanation/Reference:
Explanation: 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
https://www.gratisexam.com/
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
QUESTION 12
SIMULATION
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.
Explanation/Reference:
Explanation: 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
QUESTION 13
SIMULATION
Configure NTP.
https://www.gratisexam.com/
Configure NTP service, Synchronize the server time, NTP server: classroom.example.com
Explanation/Reference:
Explanation: Configure the client:
QUESTION 14
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
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
Explanation/Reference:
Explanation: yum install -y autofs
mkdir /home/rehome
/etc/auto.master
/home/rehome/etc/auto.ldap
https://www.gratisexam.com/
Keep then exit
cp /etc/auto.misc /etc/auto.ldap
/etc/auto.ldap
ldapuserX -fstype=nfs,rw server.domain11.example.com:/home/guests/
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.
QUESTION 15
SIMULATION
Explanation/Reference:
Explanation: useradd -u 3400 iar
passwd iar
QUESTION 16
SIMULATION
Search files.
Find out files owned by jack, and copy them to directory /root/findresults
https://www.gratisexam.com/
Explanation/Reference:
Explanation: mkdir/root/findfiles
find / -user jack -exec cp -a {} /root/findfiles/ \; ls /root/findresults
QUESTION 17
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.
Explanation/Reference:
Explanation: grep seismic /usr/share/dict/words > /root/lines.txt
QUESTION 18
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.
Explanation/Reference:
Explanation:
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
QUESTION 19
SIMULATION
https://www.gratisexam.com/
Configure your Host Name, IP Address, Gateway and DNS.
Explanation/Reference:
Explanation:
https://www.gratisexam.com/
Note: Please remember to choose two options:
Connect automatically
Available to all users
Click "Apply", save and exit, and restart your network services:
https://www.gratisexam.com/
a) Check gateway: # vim / etc / sysconfig / network
NETWORKING=yes
HOSTNAME=dtop5.dn.ws.com
GATEWAY=172.28.10.1
https://www.gratisexam.com/
QUESTION 20
SIMULATION
Create a 2G swap partition which take effect automatically at boot-start, and it should not affect the original swap partition.
https://www.gratisexam.com/
Correct Answer: See explanation below.
Section: (none)
Explanation
https://www.gratisexam.com/
Explanation/Reference:
Explanation: # fdisk /dev/sda
p
(check Partition table)
n
(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)
QUESTION 21
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?
Explanation/Reference:
Explanation:
vi /etc/sysconfig/network GATEWAY=192.168.0.254
OR
vi /etc/sysconf/network-scripts/ifcfg-eth0 DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
https://www.gratisexam.com/
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.
QUESTION 22
SIMULATION
Make a swap partition having 100MB. Make Automatically Usable at System Boot Time.
Explanation/Reference:
Explanation:
QUESTION 23
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.
https://www.gratisexam.com/
Correct Answer: See explanation below.
Section: (none)
Explanation
Explanation/Reference:
Explanation:
QUESTION 24
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.
Explanation/Reference:
Explanation:
https://www.gratisexam.com/
QUESTION 25
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.
Explanation/Reference:
Explanation:
QUESTION 26
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.
Explanation/Reference:
Explanation:
https://www.gratisexam.com/
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.
QUESTION 27
SIMULATION
Make on data that only the user owner and group owner member can fully access.
Explanation/Reference:
Explanation:
QUESTION 28
SIMULATION
Who ever creates the files/directories on a data group owner should automatically be in the same group owner as data.
Explanation/Reference:
Explanation:
https://www.gratisexam.com/
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
QUESTION 29
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?
Explanation/Reference:
Explanation:
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.
QUESTION 30
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?
Explanation/Reference:
Explanation: By default, system accept the logs only generated from local host. To accept the Log from other host configure:
https://www.gratisexam.com/
-m 0 disables 'MARK' messages.
-r enables logging from remote machines
-x disables DNS lookups on messages received with -r
service syslog restart
QUESTION 31
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.
Explanation/Reference:
Explanation:
QUESTION 32
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.
Explanation/Reference:
Explanation:
https://www.gratisexam.com/
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.
QUESTION 33
SIMULATION
Add a new logical partition having size 100MB and create the data which will be the mount point for the new partition.
Explanation/Reference:
Explanation:
OR
QUESTION 34
SIMULATION
https://www.gratisexam.com/
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.
Explanation/Reference:
Explanation:
QUESTION 35
SIMULATION
Explanation/Reference:
Explanation:
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.
QUESTION 36
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
https://www.gratisexam.com/
2. vi /etc/sysctl.conf net.ipv4.ip_forward=1
https://www.gratisexam.com/
Correct Answer: See explanation below.
Section: (none)
Explanation
Explanation/Reference:
Explanation: /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.
QUESTION 37
SIMULATION
In the system, mounted the iso image /root/examine.iso to/mnt/iso directory. And enable automatically mount (permanent mount) after restart system.
Explanation/Reference:
Explanation:
/etc/fstab:
/root/examine.iso /mnt/iso iso9660 loop 0 0 mount -a
mount | grep examine
QUESTION 38
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.
https://www.gratisexam.com/
Explanation/Reference:
Explanation:
QUESTION 39
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.
Explanation/Reference:
Explanation: lvextend -L 190M /dev/mapper/vgsrv-common resize2fs /dev/mapper/vgsrv-common
QUESTION 40
SIMULATION
Create a swap space, set the size is 600 MB, and make it be mounted automatically after rebooting the system (permanent mount).
Explanation/Reference:
Explanation:
if=/dev/zero of=/swapfile bs=1M count=600 mkswap /swapfile
/etc/fstab:
/swapfile swap swap defaults 0 0 mount -a
QUESTION 41
SIMULATION
According the following requirements to create user, user group and the group members:
https://www.gratisexam.com/
- 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.
Explanation/Reference:
Explanation:
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
QUESTION 42
SIMULATION
Explanation/Reference:
Explanation:
mkdir -p /common/admin
chgrp admin /common/admin
chmod 2770 /common/admin
QUESTION 43
https://www.gratisexam.com/
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.
Explanation/Reference:
Explanation: yum install vsftpd
/etc/init.d/vsftpd start
chkconfig vsftpd on
QUESTION 44
SIMULATION
Configure your web services, download from http://instructor.example.com/pub/serverX.html And the services must be still running after system rebooting.
Explanation/Reference:
Explanation: 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
QUESTION 45
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.
Explanation/Reference:
Explanation: fdisk /dev/vda
pvcreate /dev/vda3
vgcreate –s 16M vg0 /dev/vda3
https://www.gratisexam.com/
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
QUESTION 46
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.
Explanation/Reference:
Explanation:
df -hT
lvextend -L +100M /dev/vg0/vo
lvscan
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
QUESTION 47
SIMULATION
https://www.gratisexam.com/
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.
Explanation/Reference:
Explanation:
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
QUESTION 48
SIMULATION
Explanation/Reference:
Explanation:
# crontab -e -u natasha
23 14 * * * /bin/echo hiya
:wq!
https://www.gratisexam.com/
https://www.gratisexam.com/
https://www.gratisexam.com/