Академический Документы
Профессиональный Документы
Культура Документы
RHEL7
We need to configure the system before starting the actual Exam with the following pre-
requests
PACKET FILTERING SHOULD NOT AFFECT THE NETWORK INTERGITY. USE THE
STATIC IP:- IP ADDRESS OF desktopX - 172.25.X.10 and serverX- 172.25.X.11, "X" refers
to your system no. NETMASK - 255.255.255.0 GATEWAY - 172.25.X.254 PRIMARY DNS -
172.25.254.254 HOSTNAME - serverX.example.com and desktop, "X" refers to your
system no. DOMAIN NAME - example.com
Note : Either IP tables or firewalld can be used to clear the exam in this mock paper the
iptables has been used
II. Setup the network settings such as hostname , ip address , DNS etc with
the single TUI based command
Ans= # nmtui ( and press enter key and follow the procedure )
# init 6 and then check the network settings
then click on the question tab with and follow the questions
- A user harry who does not have access to an interactive shell on the system, and
who is not a member of sysadmin.
- Saara, Natasha and harry should all have the password of avaster.
# passwd sara
# passwd natasha
# passwd harry
-----------------------------------------------------------------------------------------------------------------
------------
2. Create a collaborative directory /shared/sysadmin with the following characterstics:
or
-----------------------------------------------------------------------------------------------------------------
------------
- The updated kernel is the default kernel when the system is rebooted.
Ans: # Edit the yum repo file and add the new baseurl below the current url
# yum update kernel* -y ( this will install the new kernel without modifying the
existing kernel and automatically modify the grub file as well )
check the grub file and reboot the system , new kernel entry will appear in the grub
menu as default boot , then allow to boot it
-----------------------------------------------------------------------------------------------------------------
------------
4. Enable IP forwarding.
# vim /etc/sysctl.conf
net.ipv4.ip_forward = 1
# sysctl -p
-----------------------------------------------------------------------------------------------------------------
-----------
5. The user saara must configure a cron job that runs daily at 15:25 local time and
executes /bin/echo hello.
Ans:# su sara
$ crontab -e
25 15 * * * echo hello
-----------------------------------------------------------------------------------------------------------------
------------
Ans: # lvs
# umount /mountpoint
# e2fsck -f /dev/vgname/lvname
# xfs_repair -f /dev/vgname/lvname
# df -h
# blkid /dev/vgname/lvname
# vim /etc/fstab
-----------------------------------------------------------------------------------------------------------------
------------
- dc=example,dc=com
- ldapuserx should be able to log into your system, where x is your station number,
but will not have a home directory until you have completed the autofs
requirement.
# system-config-authentication
http://classroom.example.com/pub/EXAMPLE-CA-CERT
# su ldapuser1
$ exit
-----------------------------------------------------------------------------------------------------------------
------------
8. Configure autofs to automount the home directories of LDAP users. Note the
following:
- While you are able to log in as any of the users ldapuser1 through ldapuser20, the
only home directory that is accessible from your system is ldapuserx.
# vim /etc/auto.master
/home/guests /etc/auto.guests
:wq!
# vim /etc/auto.guests
* -rw classroom.example.com:/home/guests/&
:wq!
# su ldapuser1
$ touch f1 f2 f3
-----------------------------------------------------------------------------------------------------------------
------------
- All other users (current and future) have the ability to read /var/tmp/fstab.
# system-config-date
add: instructor.example.com
to check
# chronyc sources -v
-----------------------------------------------------------------------------------------------------------------
------------
- Natasha has remote SSH access to your machine from within example.com
- Clients within remote.test should NOT have access to ssh on your system.
# vim /etc/ssh/sshd_config
# Authentication:
b) iptables -F
iptables -F -t nat
-----------------------------------------------------------------------------------------------------------------
------------
- Clients within the example.com domain should have anonymous FTP access to
your machine.
- Clients outside example.com should NOT have access to your FTP service.
# chkconfig vsftpd on
-----------------------------------------------------------------------------------------------------------------
------------
13. Implement a web server for the site http://serverX.example.com , then perform the
following steps:
- Download ftp://instructor.example.com/ftpupdates/main.html
# wget ftp://instructor.example.com/ftpupdates/main.html
# mv main.html index.html
# cp index.html /var/www/html
# chkconfig httpd on
-----------------------------------------------------------------------------------------------------------------
------------
-----------------------------------------------------------------------------------------------------------------
------------
15. Create a Logical Volume with the name database by using 25 PEs. From the group
datastore of 50PEs.
(OR)
Create a Logical Volume with the name database by using 25 extends. From the
group datastore of 50extends. Consider PE size as 8mb. And mount under /datadb.
Ans: a) # fdisk -cu /dev/vda {create a partition of 200MB and set a id to 8e}
# type 8e
# reboot
# pvcreate /dev/vda5
# mkdir /database
# df -h
# vim /etc/fstab
# type 8e
# reboot
# pvcreate /dev/vda5
# vgcraete -s 8 datastore /dev/vda5
# mkdir /database
# df -h
vim /etc/fstab
-----------------------------------------------------------------------------------------------------------------
------------
Ans: # fdisk -cu /dev/vda {create a partition of 512M and set the id as 82}
# reboot
# mkswap /dev/vda6
# free -m
# swapon /dev/vda6
# free -m
# blkid /dev/vda6
# vim /etc/fstab
-----------------------------------------------------------------------------------------------------------------
------------
17. Search the files created by user deal and redirect the locations to /root/deal
-----------------------------------------------------------------------------------------------------------------
------------
18. Search the keyword ext4 in /root/anaconda-ks.cfg file and store the lines in order
in /root/ext4
---------------------------------------------------------------------------------------------------------------------
--------
natasha
17) Download a data.iso file from instructor.example.com and mount it on/iso and
make it persistent across reboot.
# vim /etc/fstab
# mount -a