You are on page 1of 14

Looking for Real Exam Questions for IT Certification Exams!

We guarantee you can pass any IT certification exam at your first attempt with just 10-12
hours study of our guides.

Our study guides contain actual exam questions; accurate answers with detailed explanation
verified by experts and all graphics and drag-n-drop exhibits shown just as on the real test.

To test the quality of our guides, you can download the one-fourth portion of any guide from
http://www.certificationking.com absolutely free. You can also download the guides for retired
exams that you might have taken in the past.

For pricing and placing order, please visit http://certificationking.com/order.html


We accept all major credit cards through www.paypal.com

For other payment options and any further query, feel free to mail us at
info@certificationking.com
EX300

Red Hat Certified Engineer (RHCE) exam

QUESTION NO: 1

Create a repositary for


http://station.domain254.example.com/pub/rhel6/dvd

Answer:
[root@krishna ~]# vi /etc/yum.repo.d/sample.repo
[rhec]
baseurl=http://station.domainx.example.com/pub/rhel6/dvd
gpgckeck=0

save& quit

[root@krishna ~]# yum clean all


[root@krishna ~]# yum list all

QUESTION NO: 2

Configure SELINUX
-The machine should be running in enforcing mode

[root@krishna ~]# vi /etc/selinux/config


[root@krishna ~]# cat /etc/selinux/config

Answer:

# 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
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted

QUESTION NO: 3

Cronfigure Cron deny

[root@krishna ~]# yum install cron* -y

Answer:

Loaded plugins: fastestmirror, refresh-packagekit, security


Loading mirror speeds from cached hostfile
* base: centosmirror.go4hosting.in
* extras: mirrors.digipower.vn
* updates: centosmirror.go4hosting.in
Setting up Install Process
Package crontabs-1.10-33.el6.noarch already installed and latest version
Package cronie-anacron-1.4.4-7.el6.x86_64 already installed and latest version
Package cronie-1.4.4-7.el6.x86_64 already installed and latest version
Resolving Dependencies

Transaction Test Succeeded


Running Transaction
Installing : cronie-noanacron-1.4.4-7.el6.x86_64 1/1
Verifying : cronie-noanacron-1.4.4-7.el6.x86_64 1/1

Installed:
cronie-noanacron.x86_64 0:1.4.4-7.el6

Complete!

[root@krishna ~]# vi /etc/cron.deny


[root@krishna ~]# cat /etc/cron.deny
Lason

root@krishna ~]# chkconfig crond on


[root@krishna ~]# service crond restart
Stopping crond: [ OK ]
Starting crond: [ OK ]

-Configure a cron access Lason should not be allowed to use cron


Note:This restriction must not affect any other user

QUESTION NO: 4

Configure Boot Parameter

-Modify your system ,so that when it boots the parameter.kernstack is set to value of [1].
[root@krishna ~]# cat /etc/grub.conf

Answer:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/mapper/vg_krishna-lv_root
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-358.23.2.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-358.23.2.el6.x86_64 ro root=/dev/mapper/vg_krishna-lv_root
rd_NO_LUKS rd_LVM_LV=vg_krishna/lv_swap rd_NO_MD SYSFONT=latarcyrheb-sun16
crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_LVM_LV=vg_krishna/lv_root
rd_NO_DM LANG=en_US.UTF-8 rhgb quiet
initrd /initramfs-2.6.32-358.23.2.el6.x86_64.img
title CentOS (2.6.32-358.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-358.el6.x86_64 ro root=/dev/mapper/vg_krishna-lv_root
rd_NO_LUKS rd_LVM_LV=vg_krishna/lv_swap rd_NO_MD SYSFONT=latarcyrheb-sun16
crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us kernstack=1
rd_LVM_LV=vg_krishna/lv_root rd_NO_DM LANG=en_US.UTF-8 rhgb quiet
initrd /initramfs-2.6.32-358.el6.x86_64.img

Note:your changes should be visible from /proc/cmdline.

[root@krishna ~]# cat /proc/cmdline


ro root=/dev/mapper/vg_krishna-lv_root rd_NO_LUKS rd_LVM_LV=vg_krishna/lv_swap
rd_NO_MD SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us
rd_LVM_LV=vg_krishna/lv_root rd_NO_DM LANG=en_US.UTF-8 rhgb quiet krenstack=1

QUESTION NO: 5

Mount An IMAGE FILE

[root@krishna ~]# mkdir /mnt/iso

-configure your system so that the filesystem image located in


/root/test.iso is automatically mount on /mnt/container at system
boot time
[root@krishna ~]# cat /etc/fstab

Answer:
#
# /etc/fstab
# Created by anaconda on Mon Dec 31 19:08:36 2001
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_krishna-lv_root / ext4 defaults 11
UUID=01300747-5655-408b-93d2-66c4ced493d6 /boot ext4 defaults 12
/dev/mapper/vg_krishna-lv_home /home ext4 defaults 12
/dev/mapper/vg_krishna-lv_swap swap swap defaults 00
tmpfs /dev/shm tmpfs defaults 00
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 00
proc /proc proc defaults 00
/root/CentOS-6.4-x86_64-bin-DVD1.iso /mnt/iso iso9660 loop 0 0

[root@krishna ~]# mkdir /mnt/iso


[root@krishna ~]# mount -a
[root@krishna ~]# df -h

QUESTION NO: 6

Configure a FTP access


-Implement An FTP server for the following requirements.

(i)The FTP server allows anonymous file downloads from /var/ftp/pub


(ii)The clients outside the example.com should not have the anonymous FTP
access in your machine
[root@krishna ~]# yum install vsftp* -y

Answer:

Loaded plugins: fastestmirror, refresh-packagekit, security


Loading mirror speeds from cached hostfile
* base: centosmirror.go4hosting.in
* extras: mirrors.digipower.vn
* updates: centosmirror.go4hosting.in
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ftp.x86_64 0:0.17-53.el6 will be installed
--> Finished Dependency Resolution
Transaction Test Succeeded
Running Transaction
Installing : vsftp-0.17-53.el6.x86_64 1/1
Verifying : vsftp-0.17-53.el6.x86_64 1/1

Installed:
vsftp.x86_64 0:0.17-53.el6

Complete!

[root@krishna ~]# chkconfig vsftpd on


[root@krishna ~]# service vsftpd start
Starting vsftpd for vsftpd: [ OK ]

[root@krishna ~]# cat /etc/vsftpd/vsftpd.conf


# Example config file /etc/vsftpd/vsftpd.conf
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES

[root@krishna ~]# getsebool -a | grep ftp


allow_ftpd_anon_write --> off
allow_ftpd_full_access --> off
allow_ftpd_use_cifs --> off
allow_ftpd_use_nfs --> off
ftp_home_dir --> off

[root@krishna ~]# setsebool -P allow_ftpd_full_access on


[root@krishna ~]# getsebool -a | grep ftp
allow_ftpd_anon_write --> off
allow_ftpd_full_access --> on
allow_ftpd_use_cifs --> off
[root@krishna ~]# vi /etc/hosts.deny

#
# hosts.deny This file contains access rules which are used to
# deny connections to network services that either use
# the tcp_wrappers library or that have been
# started through a tcp_wrappers-enabled xinetd.
#
# The rules in this file can also be set up in
# /etc/hosts.allow with a 'deny' option instead.
#
# See 'man 5 hosts_options' and 'man 5 hosts_access'
# for information on rule syntax.
# See 'man tcpd' for information on tcp_wrappers
#
vsftpd: ALL EXCEPT 192.168.1.0/255.255.255.0

QUESTION NO: 7

Configure an Email alias

[root@krishna ~]# yum install postfix* -y

Answer:
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centosmirror.go4hosting.in
* extras: mirrors.digipower.vn
* updates: centosmirror.go4hosting.in
Setting up Install Process
Package 2:postfix-2.6.6-2.2.el6_1.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package postfix-perl-scripts.x86_64 2:2.6.6-2.2.el6_1 will be installed
--> Processing Dependency: perl(Date::Calc) for package: 2:postfix-perl-scripts-2.6.6-
2.2.el6_1.x86_64
--> Running transaction check
---> Package perl-Date-Calc.noarch 0:6.3-2.el6 will be installed
--> Processing Dependency: perl(Bit::Vector) >= 7.1 for package: perl-Date-Calc-6.3-
2.el6.noarch

Running Transaction
Installing : perl-Carp-Clan-6.03-2.el6.noarch 1/4
Installing : perl-Bit-Vector-7.1-2.el6.x86_64 2/4
Installing : perl-Date-Calc-6.3-2.el6.noarch 3/4
Installing : 2:postfix-perl-scripts-2.6.6-2.2.el6_1.x86_64 4/4
Verifying : perl-Carp-Clan-6.03-2.el6.noarch 1/4
Verifying : perl-Bit-Vector-7.1-2.el6.x86_64 2/4
Verifying : perl-Date-Calc-6.3-2.el6.noarch 3/4
Verifying : 2:postfix-perl-scripts-2.6.6-2.2.el6_1.x86_64 4/4

Installed:
postfix-perl-scripts.x86_64 2:2.6.6-2.2.el6_1

Dependency Installed:
perl-Bit-Vector.x86_64 0:7.1-2.el6 perl-Carp-Clan.noarch 0:6.03-2.el6
perl-Date-Calc.noarch 0:6.3-2.el6

Complete!

[root@krishna ~]# cat /etc/postfix/main.cf

# See also the proxy_interfaces parameter, for network addresses that


# are forwarded to us via a proxy or network address translator.
#
# Note: you need to stop/start Postfix when this parameter changes.
#
inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
#inet_interfaces = localhost

# Enable IPv4, and IPv6 if supported


inet_protocols = all

-confiure an email alias for your MTA such that the mail sent to gls is receiced by the local
user "anand"
[root@krishna ~]# cat /etc/aliases

webmaster: root
noc: root
security: root
hostmaster: root
info: postmaster
marketing: postmaster
sales: postmaster
support: postmaster
gls: anand
7.1 Configure a group e-mail alias
-configure an e-mail alias for your MTA.such that mail sent to(acct)is received by the local
users
(i)anand,sasi,Rajkumar

[root@krishna ~]# cat /etc/aliases

marketing: postmaster
sales: postmaster
support: postmaster
gls: anand
acct: anand,sasi,Rajkumar

[root@krishna ~]# chkconfig postfix on

[root@krishna ~]# service postfix restart


Shutting down postfix: [ OK ]
Starting postfix: [ OK ]

7.1 Configure SMTP


-configure your system to provide SMTP mail service according to the following
requirements

(i)your mail server should accept mail from remote hosts and local host.
(ii)harry must able to receive mail from remote hosts
iii)mail delivered to harry should spool into the default mail
spool for harry,/var/spool/mail/harry

[root@krishna ~]# mail sasi


Subject: hi
hru
EOT
[root@krishna ~]# cat /var/spool/mail/sasi
From root@krishna.localdomain Mon Nov 11 15:10:37 2013
Return-Path: <root@krishna.localdomain>
X-Original-To: sasi
Delivered-To: sasi@krishna.localdomain
Received: by krishna.localdomain (Postfix, from userid 0)
id B70F01A0198; Mon, 11 Nov 2013 15:10:37 -0500 (EST)
Date: Mon, 11 Nov 2013 15:10:37 -0500
To: sasi@krishna.localdomain
Subject: hi
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <20131111201037.B70F01A0198@krishna.localdomain>
From: root@krishna.localdomain (root)

hru

QUESTION NO: 8

[root@krishna ~]# yum install nfs* -y

Answer:
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centosmirror.go4hosting.in
* extras: mirrors.digipower.vn
* updates: centosmirror.go4hosting.in
Setting up Install Process
Package nfs-utils-lib-1.1.5-6.el6.x86_64 already installed and latest version
Package 1:nfs-utils-1.2.3-36.el6.x86_64 already installed and latest version
Package nfs4-acl-tools-0.3.3-6.el6.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package nfs-utils-lib-devel.x86_64 0:1.1.5-6.el6 will be installed
--> Processing Dependency: pkgconfig(libgssglue) for package: nfs-utils-lib-devel-1.1.5-
6.el6.x86_64
--> Running transaction check
---> Package libgssglue-devel.x86_64 0:0.1-11.el6 will be installed
Running Transaction
Installing : libgssglue-devel-0.1-11.el6.x86_64 1/2
Installing : nfs-utils-lib-devel-1.1.5-6.el6.x86_64 2/2
Verifying : nfs-utils-lib-devel-1.1.5-6.el6.x86_64 1/2
Verifying : libgssglue-devel-0.1-11.el6.x86_64 2/2

Installed:
nfs-utils-lib-devel.x86_64 0:1.1.5-6.el6

Dependency Installed:
libgssglue-devel.x86_64 0:0.1-11.el6

Complete!
[root@krishna ~]# chkconfig nfs on
[root@krishna ~]# service nfs restart
Shutting down NFS daemon: [FAILED]
Shutting down NFS mountd: [FAILED]
Shutting down NFS quotas: [FAILED]
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS mountd: [ OK ]
Stopping RPC idmapd: [ OK ]
Starting RPC idmapd: [ OK ]
Starting NFS daemon: [ OK ]

[root@krishna ~]# service nfs restart


Shutting down NFS daemon: [ OK ]
Shutting down NFS mountd: [ OK ]
Shutting down NFS quotas: [ OK ]
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS mountd: [ OK ]
Stopping RPC idmapd: [ OK ]
Starting RPC idmapd: [ OK ]
Starting NFS daemon: [ OK ]

[root@krishna ~]# service nfslock restart

Stopping NFS locking: [ OK ]


Stopping NFS statd: [ OK ]
Starting NFS statd: [ OK ]

(i)export your /common directory via NFS to the example.com domain or ip

[root@krishna ~]# mkdir /common


[root@krishna ~]# vi /etc/export
/common 192.168.0.0/255.255.255.0(wr)

[root@krishna ~]# exportfs -a

[root@krishna ~]# service nfs restart

Shutting down NFS daemon: [ OK ]


Shutting down NFS mountd: [ OK ]
Shutting down NFS quotas: [ OK ]
Shutting down NFS services: [ OK ]
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS mountd: [ OK ]
Stopping RPC idmapd: [ OK ]
Starting RPC idmapd: [ OK ]
Starting NFS daemon: [ OK ]

[root@krishna ~]# service nfslock restart

Stopping NFS locking: [ OK ]


Stopping NFS statd: [ OK ]
Starting NFS statd: [ OK ]

Client side
[root@vrndavan ~]# mkdir /var/ftp

[root@vrndavan ~]# mount -t nfs 192.168.1.71:/common/ /var/nfs/


[root@vrndavan ~]# mount
/dev/mapper/vg_vrndavan-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
/dev/mapper/vg_vrndavan-lv_home on /home type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
192.168.1.71:/common/ on /var/nfs type nfs
(rw,vers=4,addr=192.168.1.71,clientaddr=192.168.1.70)

[root@vrndavan ~]# vi /etc/fstab

[root@vrndavan nfs]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Wed Aug 14 22:46:20 2013
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/vg_vrndavan-lv_root / ext4 defaults 11
UUID=638d1e1a-cc4c-402d-a3dc-7fbee2ecafe9 /boot ext4 defaults 12
/dev/mapper/vg_vrndavan-lv_home /home ext4 defaults 12
/dev/mapper/vg_vrndavan-lv_swap swap swap defaults 00
tmpfs /dev/shm tmpfs defaults 00
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 00
proc /proc proc defaults 00

192.168.1.71:/common /var/nfs/ nfs rw,sync,hard,intr 0 0

Note:Because you will not have root access you will not be able directly mount your
exported
/common directory on your virtual system,however autofs is running on your physical

[root@vrndavan ~]# mount


/dev/mapper/vg_vrndavan-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
/dev/mapper/vg_vrndavan-lv_home on /home type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
192.168.1.71:/common/ on /var/nfs type nfs
(rw,vers=4,addr=192.168.1.71,clientaddr=192.168.1.70)
[root@vrndavan ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_vrndavan-lv_root
50G 35G 13G 75% /
tmpfs 1.9G 900K 1.9G 1% /dev/shm
/dev/sda1 485M 93M 368M 21% /boot
/dev/mapper/vg_vrndavan-lv_home
176G 6.8G 161G 5% /home
192.168.1.71:/common/
50G 9.5G 38G 21% /var/nfs

QUESTION NO: 9

SAMBA
– Your SMB server must be a member of the SMBGROUP workgroup
– The share’s name must be common
– The common share must be available to example.com domain clients only
– The common share must be browseable

You might also like