Вы находитесь на странице: 1из 6



1---Troubleshooting and System Maintenance Start your pc in Single usermode and
set one password for user root . (No dictionary word,Min.8Char.)
The System loaded to graphics mode manually. Then, you saw a Question paper link
in Dektop and
Open that link.
Sometimes Graphical mode is in error. Then you login your pc in text mode #vi /e
tc/inittab line no. 18
remove # symbol of the last line(by default no #symbol)
#service xfs restart #chattr -i /etc/X11/xorg.conf #system-config-display Open t
erminal in Graphics mode and type hostname command for checking your machine hostn
ame 1. The examiner can log into your system as root using the passwordu X 4L 7j
W R. The home directory must be /root. Ans:#pwconv passwd command for changing roo
2. ping is successful, and your system uses static networking as d
escribed in /root/network.txt Ans:#cat /etc/network.txt Then read ip,subnet mask
,gateway and dns addresses
type system-config-network
enter ip,subnet mask and gateway? apply? ok
#vi /etc/resolv.conf nameserver <dns ip address>
#service network restart
3. dig server1.example.com successfully resolves that hostname using DNS Ans: it
s dns problem. Already configured in 2nd questn.
4. Your system has a new 300MB partition mounted under /mnt/policy with a 300MB
ext3 filesystem. Note: because partition sizes are seldom exactly what is specif
ied when they are created, anything within the range of 275 to 375MB is acceptab
le . Ans:fdisk l fdisk /dev/hda type n button?enter first cylindersize: enter last c
ylindersize:+300M?enter type w for save and exit #partprobe
#mkfs.ext3 /dev/hda10(new partition)
#mkdir /mnt/policy
#vi /etc/fstab
type /dev/hda10 /mnt/policy auto defaults 0 0 :wq
#mount a
#df (display mounted partition size information)
5.Services:(T05) the requirement described in /root/services is met Ans:#cat /ro
ot/services #vim /etc/exports /documents *(rw,sync) :wq
#service portmap restart
#service nfs restart
6.Wildcard:(T06) the requirement described in /root/wildcard is met Ans:#cat /et
c/wildcard #vim /etc/fstab edit home entry line. /dev/hda10 /home auto defaults,
usrquota 0 0 :wq #mount o remount /home #mount #quotacheck c /home #quotaon /home 7.
Storage:(T10) the requirement described in /root/lvm is met Ans:#cat /root/servi
ces #lvdisplay umount logical volume #lvextend -L+80M /dev/vol/homevol #resize2f
s /dev/vol/homevol mount logical volume SECTION2---Installation and Configuratio
n 1.Install the dialog RPM package using YUM. (optional) YUM ftp://server1.examp
le.com/pub/Server Ans:#cd /etc/yum.repos.d #cp rhel-deguginfo.repo abc.repo #vim
abc.repo change base url line and enabled yum baseurl=ftp://server1.example.com/p
ub/Server enabled = 0? 1 (change to 1) :wq #yum install dialog* 2.Create the fol
lowing users, groups, and group memberships: A group named usergroup
A user who tony belongs to usergroup as a secondary group
A user paula who also belongs to usergroup as a secondary group
A user mario who does not have access to an interactive shell on the system, and
who is not a
member of usergroup
tony, paula, and mario should all have the password of password Ans :#groupadd u
sergroup #useradd tony #useradd paula #gpasswd -a tony usergroup #gpasswd -a pau
la usergroup #useradd -s /bin/nologin Mario #passwd tony
New password:pa ssw o rd
Retype password:p assw or d
3. Create a collaborative directory /common/usergroup with the following charact
eristics: Group ownership of /common/usergroup is usergroup
The directory should be readable, writable, and accessible to members of usergro
up, but not to
any other user. (It is understood that root has access to all files and director
ies on the system.)
Files created in /common/usergroup automatically have group ownership set to the
Ans:mkdir /common/usergroup chgrp usergroup /common/usergroup chmod 2770 /common
/usergroup 4. Install the appropriate kernel update from ftp://server1.example.c
om/pub/updates. The following criteria must also be met:
The updated kernel is the default kernel when the system is rebooted
The original kernel remains available and bootable on the system
Ans:#ftp server1.example.com Login: anonymous
password: <none>
ftp> cd pub/updates
#ftp>get <kernel RPM name>
#rpm ivh <kernel RPM name>
OR #rpm -ivh ftp://server1.example.com/pub/updates/kernel* Then #vi /etc/grub.co
nf Change default is 0 :wq 5. Enable IP forwarding on your machine. Ans:#vi /etc/s
ysctl.conf line no.7 net.ipv4.ip_forward=0 ---? 1 (change to 1) :wq 6.Set up the
default local print queue to forward jobs to the IPP (CUPS) print queuestationxo
nserver1.example.com, where x is your station number. Configure this printer as G
eneric- text only print queue. Note: The queue stationx on server1 dumps print jo
bs into the file http://server1/printers/stationx. This file can be examined to
confirm that you have configured the print queue correctly. Ans:Open new termina
l? type service cups restart ?enter type system-config-printer ?enter?click New Printer
type printer name as station4 ?forward select internet printing protocol and type Hos
tname and Domainname Hostname= server1.example.com Printername= station4 forward
?select Generic ?forward?select Text Only from Models?forward?Apply Select printer nam
e(station4) in side bar? click Make Default Printer and Print test page close
#service cups restart
#chkconfig network on
#chkconfig cups on

7. The user tony must configure a cron job that runs daily at 16:45 local time a
nd executes /bin/echo ciao Ans:#crontab -e -u tony 45 16 * * * /bin/echo ciao :w
q #service crond restart #chkconfig crond on 8. Bind to the NIS domain GELATO pr
ovided by for user authentication. Note the following:
nisuserx 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 below
All NIS users have a password of password
Ans:#authconf ig-tui click Use NIS ?Next type Domain name and server address Domain
GELATO Server ok login your user (eg:username is nisuser10,if you
r station no. is 10) and password isp a ssw o rd we can t get home directory 9. Co
nfigure autofs to automount the home directories of NIS users. Note the followin
g: server1.example.com ( NFS-exports /rhome/stationx to your syste
m, where
x is your station number
nisuserx's home directory is server1.example.com:/rhome/stationx/nisuserx
nisuserx's home directory should be automounted locally beneath /rhome as /rhome
home directories must be writable by their users
While you are able to log in as any of the users nisuser1 through nisuser20, the
only home
directory that is accessible from your system is nisuserx.
Ans:#vi /etc/auto.master move to end line and type /rhome /etc/auto.misc :wq
#vi /etc/auto.misc
move to last line and type this
- -rw,sync :wq #service autofs restart
#chkconfig autofs on Login your user ,then we get home directory of that particu
lar user
10. Copy the file /etc/fstab to /var/tmp. 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 tony is able to read and write /var/tmp/fstab
the user paula can neither write nor read /var/tmp/fstab
all other users (current or future) have the ability to read /var/tmp/fstab.
Ans:#cp /etc/fstab /var/tmp #ls - l /var/tmp/fstab
#setfacl m u:tony:rw /var/tmp/fstab
#setfacl m u:paula:0 /var/tmp/fstab
#chmod 644 /var/tmp/fstab
#umask 022
11.Configure your system so that it is an NTP client of server1.example.com Ans:
Open terminal?type system-config-date select Network Time Protocol ?click enable netwo
rk time protocol ?delete all entries click Add button?type server1.example.com and clic
k enter button Then click show advanced option ?enable synchronize system clock before
starting service and disable use local time source ?ok RHCE (Network Services and S
ecurity) Requirements SELinux must be running in Enforcing mode. We are using tw
o Networks in this section. Networks and dns names are mentioned below 192.168.0
.0/ example.com my133t.org 1.Configure SSH
access as follows: paula has remote SSH access to your machine from within examp
le.com Clients within my133t.org should NOT have access to ssh on your system An
s:#service sshd restart #iptables -A INPUT -p tcp -s -
-dport 22 -j REJECT
#service iptables save
#service iptables restart

OR #vi /etc/hosts.allow sshd: :wq #vi /etc/hosts.deny s

#chkconfig sshd on
2.Configure POP3 email on your system according to these criteria: mario must be
able to retrieve email from your machine using POP3 from within example.com Cli
ents within the my133t.org domain should not have access to your POP3 service An
s:#service sendmail restart #iptables -A INPUT -p tcp -s
.0 - -dport pop3 -j REJECT #chkconfig sendmail on 3.Configure FTP access on your
system: 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 s
ervice Ans:#service vsftpd restart #vi /etc/hosts.deny vsftpd:ALL EXCEPT 192.168
.0.0/ :wq #chkconfig vsftpd on 4.Share the /common directory via SM
B: Your SMB server must be a member of the STAFF 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
paula must have read access to the share, authenticating with the same password
password, if
Ans:#service smb restart #vi /etc/samba/smb.conf Line no. 74
Change Workgroup name
workgroup = STAFF
copy and then paste last 7 lines using yy- - p command Changes:- [common]
comment = public stuff
path = /common
valid users = paula
public = yes
browseable = yes
writable = yes
hosts allow = 192.168.0. 127.

#smbpasswd -a paula New smb password:pa ssword Retype New smb password:p a sswor
d #service smb restart #chkconfig smb on 5.Implement a web server for the site h
ttp://stationX.example.com, then perform the following steps: Download ftp://ser
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
Ans:#service httpd restart #cd /var/www/html #ftp server1.example.com
password: <none>
ftp>cd pub/rhce ftp>get station.html ftp>bye #mv station.html index.html #vi /et
c/httpd/conf/httpd.conf move to line no. 972 #NameVirtual Host *:80 remove # sym
bol and change * to your pc ip address eg: NameVirtualHost copy
last 7 lines and paste Remove all # symbols of these lines Changes: <Virtual Hos
t> ServerAdmin webmaster@dummy-host.example.com DocumentRoot /va
r/www/html server Name station12.example.com
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
</Virtual Host>
#service httpd restart #chkconfig httpd on Open Mozilla Web Browser typeh tt p:/
/sta tio n1 2 .e xa mp le. co m?e n te r 6.Export your /common directory via NF
S to the example.com domain only. Note: because you will not have root access, y
ou will not be able to directly mount your exported
/common directory using your guest account on the system provided for testing. H
owever, the
on the system has been configured such that it will automount your /common direc
tory under
/home/guestx/nfs/stationx, where x is your station number. Consequently, success
ful execution of
ls /home/guestx/nfs/stationx indicates that the automounter was able to automoun
t your NFS

Ans:#vi /etc/exports /common,sync) :wq

#service portmap restart
#service nfs restart
#chkconfig portmap on #chkconfig nfs on 7.Configure an email alias for your MTA
such that mail sent to admin is received by the local user tony. Ans:#vi /etc/al
iases admin: tony
8.Configure SMTP mail service according to the following requirements: Your mail
server should accept mail from remote hosts and localhost
paula must be able to receive mail from remote hosts
Mail delivered to paula should spool into the default mail spool for paula, /var
Ans:#vi /etc/mail/sendmail.mc Line No.116 Typednl in front of the line Eg: dnl D
AEMON_OPTIONS .. :wq #make -C /etc/mail
#service sendmail restart
#chkconfig sendmail on
.Additional RHCE Requirements 1. Provide SSL-encapsulated IMAP access (IMAPS): I
MAPS must be available to mario from example.com
IMAPS must NOT be available to other networks or domains.
The SSL certi_cate for the IMAPS server must be created as follows:
Use the defaults for Country, State, Locality, and Organization Name
Set Organizational Unit to GLS
Set Common Name to stationx.example.com
Set Email Address to root@stationx.example.com
Ans:#cd /etc/pki/tls/certs make dovecot.pem
set Organizational Unit name to GLS, Common Name to
station12.example.com and Email Address to root@station12.example.com
Don t change other entries #vi /etc/dovecot.conf Line No.17
Remove # symbol,IMAP and POP3s Correct Line:- protocols = IMAPs POP3 Line No. 87
& 88 Remove # symbols ssl_cert_file = /etc/pki/dovecot/certs/dovecot.pem
ssl_key_file = /etc/pki/dovecot/private/dovecot.pem
#vi /etc/hosts.deny dovecot : ALL EXCEPT :wq #service
dovecot restart #chkconfig dovecot on 2.Implement a web proxy server bound to po
rt 8080. Clients within example.com should have access to your proxy server Clie
nts outside of example.com should NOT have access to your proxy server Ans: #ser
vice squid restart #vi /etc/squid/squid.conf Line No:73
http port 3128?change to 8080
Line No.2394
Copy the line and paste
acl hello src
Line No.2527 & 2528
Change to
http_access allow hello http_access deny all :wq #chkconfig squid on 3.Extend yo
ur web server to include a virtual host for the site http://wwwx.example.com/, w
here x is your station number, then perform the following steps:
Set the DocumentRoot to /var/www/virtual
Download ftp://server1.example.com/pub/rhce/www.html
Rename the downloaded file to index.html
Place this index.html in the DocumentRoot of the virtual host
Do NOT make any modi_cations to the content of index.html
Ensure that paula is able to create content in /var/www/virtual
Note: The original web site http://stationX.example.com must still be accessable
. DNS resolution
for the hostname wwwx.example.com is already provided by the name server on serv
Ans:#mkdir /var/www/virtual #cd /var/www/virtual #ftp server1.example.com Login:
anonymous Password:<none> ftp>cd pub/rhce ftp>get www.html ftp>bye
#mv www.html index.html #vi /etc/httpd/conf/httpd.conf copy last 7 lines and pa
ste Remove all # symbols of these lines Changes: <Virtual Host>
ServerAdmin webmaster@dummy-host.example.com DocumentRoot /var/www/virtual serve
r Name www12.example.com
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common
</Virtual Host>
#service httpd restart Open Mozilla Web Browser typeh tt p:/ /ww w12 .e xamp le.