Create A Repositary For: RHCE Questions
Create A Repositary For: RHCE Questions
You will note that some requirements specify that a service should not be available from the
DNS
domain cracker.org. All systems in that domain are in the
172.24.0.0/255.255.0.0 subnet, and all systems in that subnet are in cracker.org.
Ans:
[root@krishna ~]# vi /etc/yum.repo.d/sample.repo
[rhec]
baseurl=http://station.domainx.example.com/pub/rhel6/dvd
gpgckeck=0
save& quit
2. Configure SELINUX
-The machine should be running in enforcing mode
Installed:
cronie-noanacron.x86_64 0:1.4.4-7.el6
Complete!
Lason
#
# /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
Installed:
vsftp.x86_64 0:0.17-53.el6
Complete!
#
# 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
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!
webmaster: root
noc: root
security: root
hostmaster: root
info: postmaster
marketing: postmaster
sales: postmaster
support: postmaster
gls: anand
marketing: postmaster
sales: postmaster
support: postmaster
gls: anand
acct: anand,sasi,Rajkumar
(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
hru
Dependency Installed:
libgssglue-devel.x86_64 0:0.1-11.el6
Complete!
Client side
[root@vrndavan ~]# mkdir /var/ftp
#
# /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
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
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
– GNANA must have read access to the share, authenticating with the same
password
Installed:
samba.x86_64 0:3.6.9-151.el6_4.1
Complete!
[samba]
path = /samba
browseable = yes
write list = no
ssh server
– susan has remote SSH access to your machine from within example.com
– Clients within cracker.org should NOT have access to ssh on your system
10. IP Forwarding
– Enable IP forwarding
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
11.HTTP SERVER
Installed:
httpd-devel.x86_64 0:2.2.15-29.el6.centos
httpd-manual.noarch 0:2.2.15-29.el6.centos
Dependency Installed:
apr-devel.x86_64 0:1.3.9-5.el6_2
apr-util-devel.x86_64 0:1.3.9-3.el6_0.1
expat-devel.x86_64 0:2.0.1-11.el6_2
Complete!
* Web Server
–Implement a web server for the site http://station.domainX.example.com,
Then perform the following steps:
– Download ftp://station.domain254.example.com/pub/rhce/station.html
– Rename the downloaded file to index.html
– Copy this index.html to the DocumentRoot of your web server
– Do NOT make any modifications to the content of index.html
script
#! /bin/bash
Case “$@” in
KERNEL)echo “USER”;;
USER) echo “KERNEL”;;
*)echo “KERNEL USER”;;
Casc