RHCE-EXAM-Solution.pdf

December 10, 2018 | Author: Pravind Kumar | Category: File Transfer Protocol, Web Server, Technology, World Wide Web, Internet Standards
Share Embed Donate


Short Description

Download RHCE-EXAM-Solution.pdf...

Description

RHCSA Exam Practice Question Fill the form with your name / address / email Agree with the rules and accept it * login in runlevel 5 with GUI with root: - change the root password to !"n#da$%& - assign the static ip Ip : $'"&$()&%& + is your station num,er .etmas : "55&"55&"55&% Gateway : $'"&$()&%&$ 0.1 : $'"&$()&%&"52 - 1et the 3ostname station&e4ample&com Ans& rootstation$ 67 rootstation$  67#echo "V2nCda10" | passwd --stdin root rootstation$ 67 rootstation$  67#vim /etc/sysconfig/network-scripts/ifcfg-eth0 - & do foowing changes! $%$'"static" (%)**'"1+2,1.,0," $)34'"255,255,255,0" 6ateway'"1+2,1.,0,1" !w7 rootstation$ 678 rootstation$  678 vim /etc/resov,conf search e8ampe,com nameserver 1+2,1.,0,259 !w7

93#A 9euirements with ;uestions and 1olutions ;&$ : =U> ftp://instructor& ftp://instructor&e4ample&com/pu,/rh e4ample&com/pu,/rhel(/dvd el(/dvd Ans& rootstation$ 678 rootstation$  678 vim /etc/y:m,repos,d/cient,repo ;Cient< name'y:m cient =ase:r'ftp!//instr:ctor,e8ampe,com/p:=/rhe/dvd gpgcheck'0 !w7 rootstation$ 678 rootstation$  678 y:m ist a ;&" #reate the following users? groups? and group mem,ership: - A group named sysusers& - A user paula who ,elongs to sysusers as a secondary group& - A user susan who ,elongs to sysusers as a secondary group& - A user ,rad who does not have access to an interactive shell @ who is not a mem,er of sysusers group& - paula? susan and ,rad should all have the password of password& Ans& rootstation$ 678 rootstation$  678gro:padd sys:sers rootstation$ 678 rootstation$  678:seradd -6 sys:sers pa:a rootstation$ 678 rootstation$  678:seradd -6 sys:sers s:san rootstation$ 678 rootstation$  678:seradd -s /s=in/noogin =rad pa:a & ; 6ive password password of password for pa:a pa:a < rootstation$ 678 rootstation$  678passwd pa:a & ; 6ive password of password for s:san < rootstation$ 678 rootstation$  678passwd s:san

rootstation$ 678passwd =rad

& ; 6ive password of password for =rad <

;& create a colla,orative directory /shared/sysusers with the following characteristics: - Group ownership of /shared/sysusers is sysusers& - Bhe directory should ,e reada,le? writa,le? and accessi,le to mem,er of sysusers? ,ut not to any other user& +It is understood that root has access to all files and directories on the system& - Files created in /shared/sysusers automatically have group ownership set to the sysusers group& Ans& rootstation$ 678mkdir -p /shared/sys:sers rootstation$ 678chgrp sys:sers /shared/sys:sers rootstation$ 678chmod 2>>0 /shared/sys:sers ;&2 Install the appropriate ernel update from ftp://server$&e4ample&com/pu,/updates& Bhe following criteria must ,e also ,e met: - Bhe updated ernel is the default ernel when the system is re,ooted& - Bhe original ernel remains availa,le and ,oota,le on the system& Ans& rootstation$ 678ftp server1,e8ampe,com/p:=/:pdates rootstation$ 678ftp server1,e8ampe,com!/p:=/:pdates? get kerne-@$a=? rootstation$ 678ftp server1,e8ampe,com!/p:=/:pdates? =ye A ote! Bo:r ew 6r:= fie ook ike =eow after insta the new kerne 

rootstation$ 678rpm -ivh kerne-@$a=? rootstation$ 678vim /=oot/gr:=/gr:=,conf defa:t'0 timeo:t'5 spashimage'Ahd0D0/gr:=/spash,8pm,gE hiddenmen: tite 9ed 3at Cnterprise Dinu4 1erver   A2,,F2->1,1,1,e,i. root Ahd0D0 kerne /vmin:E-2,,F2->1,1,1,e,i. ro root'G)G'/ rhg= 7:iet initrd /initrd-2,,F2->1,1,1,e,i.,img tite 9ed 3at Cnterprise Dinu4 1erver  A2,,F2->1,e,i. root Ahd0D0 kerne /vmin:E-2,,F2->1,e,i. ro root'G)G'/ rhg= 7:iet initrd /initrd-2,,F2->1,e,i.,img ;&5 1et up the default local print ueue to forward Eo,s to the I +#U1 print ueue station on instructor&e4ample&com? where  is your station num,er& #onfigure the printer as a Generic-te4t-only print ueue& Ans& rootstation$ 678system-config-printer --? Cick ew %rinter --? $ype station --? seect ipp A (nternet %rinting %rotoco  --? $ype Hostname --? instr:ctor,e8ampe,com --? $ype printername --? station --? seect 6eneric --? $e8t ny %rinter $ype & than cick yo:r station :nder oca printer at the eft hand-side after that cick make defa:t printer ta= at the right hand-side

;&( Bhe user andrew must configure a cron Eo, that runs daily at $5:"5 local time and e4ecutes - /,in/echo hello /dev/tty$ Ans& rootstation$ 678cronta= -: pa:a -e 25 15 I I I /=in/echo heo ??/dev/tty1 rootstation$ 678service crond restartJ chkconfig crond on ;&H #onfigure your machine as D0A client& D0A server and D0A directory tree information will ,e given in the e4am& - ldapuser should ,e a,le to log into your system? where  is your station num,er? ,ut will not have a home directory until you have completed the autofs reuirement& - All ldapuser users have a password of password Ans& rootstation$ 678system-config-a:thentication --? n the (dentity & ):thentication ta=D seect Kser )/C Config:ration check =o8D choose G*)% for Kser )/C *ata=ase --? Config:re G*)% 3earch ase * with! dc'e8ampeDdc'com --? Config:re G*)% 3erver with the K(! dap!//instr:ctor,e8ampe,com --? 3eect Kse $G3 to encrypt connections and Cick *ownoad C) Certificate --? nter Certificat KG! http!//instr:ctor,e8ampe,com/p:=/)%G-C)-C$ & cick ok --? na=e G*)% :nder ):thentication Config:ration & Cick )ppy =:tton, rootstation$ 678getent passwd dap:ser ; $o check cient & server mapping < I ow check =y ogging thro:gh dap:ser A3:ppose yo: are sitting at station2 then yo:r :ser wi =e dap:ser2 I the password of dap:ser2 is password ;&) #onfigure autofs to automount the home directories of D0AU1C9 users& .ote the following: - server$&e4ample&com +$'"&$()&%&"52 .F1-e4ports /home/guests for ldapuser? - ldapusers home directory is server$&e4ample&com:/home/guests/ldapuser? where  is your station num,er - ldapusers home directory should ,e automounted locally ,eneath /home/guests as /home/guests/ldapuser - home directories must ,e writa,le ,y their users& - while you are a,le to log in as any of the user ldapuser$ through ldapuser"%? the only home directory that is accessi,le from your system is ldapsuser * C4ample: station" would configure the automounter such that ldapuser"s home directory /home/guests/ldapuser" gets mounted automatically upon login& Bhe .F1 share would ,e: - instructor&e4ample&com:/home/guests/ldapuser"& Ans& rootstation$ 678 vim /etc/a:to,master /home/g:ests /etc/a:to,g:ests ote! I A /home/g:ests which is in yo:r system  I A /etc/a:to,g:ests this is new fie which we create & we provide the info, to the cient that what is coming from the G*)% 3erver, 

rootstation$ 678vim /etc/a:to,g:ests Aor /etc/a:to,misc I -fstype'nfs instr:ctor,e8ampe,com!/home/g:ests/dap:ser rootstation$ 678service a:tofs stop rootstation$ 678service a:tofs startJ chkconfig a:tofs on I ote! ow check ogin thro:gh yo:r dap:ser from the termina & ony yo:r station dap:ser wi get the home directory ;&' #opy the file /etc/fsta, to /var/tmp& #onfigure the permissions of /var/tmp/fsta, so that: - the file /var/tmp/fsta, is owned ,y the root user - the file /var/tmp/fsta, ,elong to the group root - the file /var/tmp/fsta, should not ,e e4ecu,a,le ,y anyone - the user paula is a,le to read and write /var/tmp/fsta, - the user susan can neither write nor read /var/tmp/fsta, - all other users +current or future have the a,ility to read /var/tmp/fsta, Ans& rootstation$ 678cp -p /etc/fsta= /var/tmp rootstation$ 678s - /var/tmp/fsta= I if re7:ired change them rootstation$ 678chown root!root /var/tmp/fsta= rootstation$ 678setfac -m :!pa:a!rw- /var/tmp/fsta= rootstation$ 678setfac -m :!s:san!--- /var/tmp/fsta= ;&$% #onfigure your system so that it is an .B client of server$&e4ample&com& Ans& rootstation$ 678system-config-date --? on *ate and $ime ta= --? seect check =o8 3ynchroniEe date and time over the network I Lirsty remove a e8isting $% servers entry & after that --? than cick )dd =:tton I $ype instr:ctor,e8ampe,com andD I cick show advanced options --? seect check =o8 3peed :p initia 3ynchroniEation --? than cick 4 =:tton A M yo:r system is config:red as a $% Cient  ;&$$ #onfigure the FB 1erver for anonymous 0ownload Ans& ; $o (nsta ftp server rpm < rootstation$ 678 y:m insta vsftpd service vsftpd restartJ chkconfig vsftpd on rootstation$ 678 ;&$" =our system has a new $%%>J physical partition mounted under /mnt/new with a $%%>J e4t2 filesystem& .ote: ,ecause partition siKes are seldom e4actly what is specified when they are created? anything within the range of '%>J to $$%>J is accepta,le& ;&$ 9esiKe the lvm to "5%> /home Ans& rootstation$ 678vscan L 3 7 rootstation$ 678:mo:nt /home rootstation$ 678ve8tend --siEe 250 /dev/vg1/v-home rootstation$ 678e2fsck -f /dev/vg1/v-home rootstation$ 678resiEe2fs /dev/vg1/v-home rootstation$ 678mo:nt /dev/vg1/v-home /home

L 3 7 rootstation$ 678:mo:nt /home rootstation$ 678e2fsck -f /dev/vg1/v-home rootstation$ 678resiEe2fs /dev/vg1/v-home 250 rootstation$ 678vred:ce --siEe 250 /dev/vg1/v-home rootstation$ 678mo:nt /dev/vg1/v-home /home ;&$2 9esiKe the D!> using the GUI tool ,y the C value& ;&$5 #reate a swap partition of H5(> >J and mae it availa,le permanent& L attern - $ 7 Ans& rootstation$ 678 fdisk /dev/vda command A m for hep !n ; $o make new partition < Lirst Cyinder! @Geave ank? Gast Cyinder!N>5 command A m for hep !w

; $o save & e8it partition ta=e <

; $o active new partition ta=e < rootstation$ 678re=oot I )fter re=oot r:n foowing command to make swap partition for permanent! ; Mhere  is yo:r partiton n:m=er < rootstation$ 678mkswap /dev/vda ; Mhere  is yo:r partiton n:m=er < rootstation$ 678swapon /dev/vda ; $o check new swap partition is active or not < rootstation$ 678swapon -s ; $o make swap partition for permanent < rootstation$ 678vim /etc/fsta= /dev/vd swap swap defa:t 0 0 !w7 ; $o save & e8it fsta= fie < L attern - $ 7 rootstation$ 678cd / rootstation$ 678dd if'/dev/Eero of'swapfie =s'>5 co:nt'1 rootstation$ 678mkswap swapfie rootstation$ 678swapon swapfie rootstation$ 678swapon -s ; $o make swap partition for permanent < rootstation$ 678vim /etc/fsta= /swapfie swap swap defa:t 0 0 !w7 ; $o save & e8it fsta= fie <

;&$( #onfigure Internet we, server for your domain& 0ownload the inde4&html from the server +I and location will ,e specified in the e4am into the default document root of the server - 0ownload ftp://instructor&e4ample&com/pu,/rhce/station&html - 9ename the downloaded file to inde4&html - #opy this inde4&html file to the 0ocument9oot of your we, server - 0o .eF-df+>-950F-aafd-f+22c911++c" $B%'"e8t9"

rootstation$ 678vim /etc/fsta= KK(*'"d.=a.>eF-df+>-950F-aafd-f+22c911++c" !w7 rootstation$ 678mo:nt -a

/mnt/data1

e8t9 Tnetdev 1 2

;&$( Bhe user paula should not have permission to schedule a cron Eo,& Ansrootstation$ 678vim /etc/cron,deny pa:a !w7 rootstation$ 678/etc/init,d/crond restartJchkconfig crond on ;&$H C4tend your we,site& #reate a directory in document root name as secret& laced document root in configuration file as /var/www/html/secret& Bhis we,-site should ,e access on your local host and should ,e acces on others& Ansrootstation$ 678mkdir /var/www/htm/secret rootstation$ 678vim /var/www/htm/secret/inde8,htm oca wesite !w7

rootstation$ 678vim /etc/httpd/conf/httpd,conf @Virt:aHost 1+2,1.,0,1>!.0? 3erver)dmin rootOdesktop1>,e8ampe,com *oc:mentoot /var/www/htm/secret A*efine here yo:r doc:ment root 3erverame desktop1>,e8ampe,com A*efine here yo:r we=site name *irectory(nde8 inde8,htm A*efine here directory inde8 @/Virt:aHost? !w7 rootstation$ 678/etc/init,d/httpd restart Jchkconfig httpd on rootstation$ 678einks http!//desktop1>,e8ampe,com/secret

JC1B
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF