You are on page 1of 10

Ri{C$ Exqnn Faper

.i. Crack The Root Password:

F After UTF-8(sPace)rd. Break

F ch,'cot{space)/sYsroot/

F touch(space)/.autorela bel
) exit

syste nt ctl (s pa ce ) m a s k(s pa ce )i


pta b I e s. se rvice
:y-'.te ir': ct ! : p a ce ) r"n a s
i: {s p a ce )i p 6i:r b I e s . s e r''' i c e
{

Ping t7 2.?-5.0. 1C (d esktoP)


Ping t7 2.25.0. 1 1 (se rve r)

Ping t7 2.25,'254'254( ba se sYste m )

Hostname
Ping example.com

1) lrletwork SetuP:

(space)ifname(space) ethO(space) type(space) ethernet(space) ip4


(space)172.25.1".It/24(space)gw4(space)172'25'L'254

iPv4.d ns(sPace) t7 2.25'254'254


i

l, )* nmcli(soace) connection(space) show


: > nmcli(space) connection(space) modify (space) ,,system ethg,, (space)
connection,autoconnect (space) no

(space)connection.autoconnect (space) yes

2) Configure Selinux?
. I vim(space) /etc/selinux/config

: > SELINUX=enforcing
\--

3) Create a New 1U0MB Physical Fartition mounted uncier /i;luster?


F fdisk -l
.F. fcii:,k ,space) icievrlviilr

, 'F enter
/ > enter
I > +100t\4
Fw

I
l
\
II
) fdisk -l
4) Create a new 150M8 swap partitlon f
ls.?
F free -m
F fdisk -l
) fdisk (space)/dev^db
l

I
!

Ft

)> rr1!(s!vait (spaceiici e';/ucb?

) swapon(space) -a

F vim(space) /etc/fstab

* Verification:
) free -m
F fdisk -l
5) Create a repositary for
F vim /etc/yum.repos.d/iant.repo
\
\

F gpgcheck=0

) yum repolist
6) create the fcrl!owing user,group and group memberships:
o A Group named sysgrp
to A user andrew who belongs to sysgrp as a secondary group
o A user susan also belongs to sysgrp as a secondary group
o A user sarah who does not have access to an interactive sheil on
system and who not a member of sysgrp
o Andrewrsusanrsarah password=,rpostrolt,,

>* useradd -s /sbinlrrologin sarah


r ) passwd andrew(postroll)

* Verification:

7) create a collaborative directory /redhat/sysgrp with the following


charactenistics:
c Group ownershlp of /redhat/sysgrp is sysgip.
e The directory should be readable,writeable and accessable to
r members of sysgrp, but not to any other user.
7
g

o Fires created in /redhat/sysgrp


automaticaily have group
set to the:ysgrp group. ownership

) chmod Z77O /redhat/sysgrp


Verification:

F cd /redhat/sysgrp
) touch xyz.txt i

lnstallthe appropriate kernel


update from

o The following criteria must atso


be met:
I The update kernel is the defautt
kernel when the system rebooted.
c The original kernel remains
availabte and bootable on
the system.

) vim /etc/yum.repos.d/rhca.repo

t co nte nt. exa m p,e. co


i ffi il::fft m/ rh et7.0 / xB6 le;rata
-6a

F yum install kernel

9) Enable lp forwarding on your


machine?
} vim /etc/sysctl.conf
\
\
I

10) Bind with LDAP used provided by classroorn.example.com for


user
authentication.
o Note the following:
a The LDAP search base DN is dc=exampte,dc=com
o The LDAP certificate filc is

ldapuserX should be able to log into your system,where X is your


serverX(hint:where x is your domain number),but will not have
a
hcme directory,untilyou have completed the autofs
requirementsrbelow all LDAP users have password ,,passwordrr.

F yum install auth* -y


) yunr install sssd* -y

p Server - ldap.,i i ciassroorn.exiimple.com

F Authentication Method :- LDAp password

) systemctl start sssd.service


t Verification:
F getent passwd ldapuserO
11) Configure autofs to automount the home directories of [DAp
users,
Note the following:
o class roo m.exa m p e.com z.zs.zs4. z$4, N Fs-exports I hone guests
(L7
I

/ to your system, where X is your server Number. I


r- /
I

I
? I

. LDAP userx,s home directory is


c Ia ss ro o m. exa rn p I e. co m :/h o rn e/gu e sts/l dap use rX
o Ldapuser's home directory shourd be automounted
rocarty beneth
/home as /home/guests/ldapuserX
r Home directories must be writabre by their
users.
o while you are able to login as any of the users ldapuserl
through
ldapuser2O the only home directory that
is accessible from your
system is ldapuserX.
) yum install autofs I

) vim / etc/ auto.master.d/home.autofs I


I

} /home/guests(t ab,) / etc/ auto. home

) vim /etc/auto.home

i systemcti stai; autofs.service


) ssh ldapuser0@localhost I

tzl configure your system so that it is an NTp client


of
I

classroom.example.com ?
F yum install chrony
F vim /etc/chrony.conf

) systemctl restart chronyd.service


) systemctl enable chronyd.service I

* Verification: !
1
(,
';

\
i

F
I
I
chrcnyc sources -V (check reach level=17)
13) Copy the file /etc/fstsb to lvarltmp configure the permlssion of
1
I

lvar/tmpfstab so that the file lvarltmplfstab is owned by the root


user,belongs to the group root shoutd not be executable by anyone.
o The user andrew is able to read & write lvarltmp/fstab.
o The user susan can neither write nor read fvarltmp/fstab.
r All other users (current or future) have the ability to read
lvarftrnp/fstab.

,
) cci /var/tmp

F setfacl(space) -m(space) u:andrew:rw- (spac e)


/var/tmp/fstab
} setfacl (space)-m (space)u:susan:--- (space)/var/tmp/fstab
F
getfacl /var/tmplfstab
15)create a new physica! vorume, create a new volume group in the
name
of datacontainer, vg extent is 115.00MB create a new logical volume
in the
name of datacopy with the size of 50 extents and file system rnust
vfat
then mourit it uncier ldatasor:rce.
)- iiitsr(
\. ' r. .
"
r
I

F fdrsk /dev/vdb

I
I

F +802M

Ft

,F partx(space) /dev/vdb
i

l
I
F vgcreate (space) -s (space)16M(space) datacontainer(space)
/dev/vdb3
) vgdisplay (check groupname, size)

(spaceidataconta iner

)" mkdir {space)-p(space) /datasource

} virn(sp ace) /etc/fstab

\F tntt b
14) Resize the logical voluine, logica!-data and it filesystem to 400M8.
Make sure that thc filesystem contents rernalrr intact.
> {if i:5:'.:tl';-Th l

F lvrecluce (space) -L(space) 400M(space) ldevldataconta iner/datacopy

t Verification:

15) Add the user tatusan wlth usenid 2985. Find the fiie which ownecl
by user julice and copy the fire into /root/findresults directory.

!' find (space)/(space) -user(sp.ce) iulice (space) -exec(space),


cp(space) {}(space) /root/findresults/(space} \;
* Verification:
F cd (space) /root/findresults i

I
I

17)create an archive file lrrtotflocal.tp: tor lusr/loca!. tt should be


compressed by gzip,

F tar(space) -cvzf(space) /root/local.tgz(space) /usr/local

l8)Search ttre string sarah in the /etc/passwd file and save the output in
/root/lines.
F grep (space) sarah(space) /etc/passwd (space) >(space) /root/lines

I
I

9 ) TA*: i:7 f-t'". (, )1r,1.,6,.. ,,v- ,t-it)ij,/- r..o",x g;rr_r.0. *, q (-1rr '1 1 .i ,. i:
I
I

.(-)1r, h tr;r1 f ^..i. l^' 't I *.{o<.,.( .i.i,ir.r,,


;.^r
( t. }-y.r i p,1 ,.b,ti-|,i, 5 -,
/ l-ti' ,\\ /.t ,- tt ,n iii;t ri

*) J'tt;rtt r,)i,;i,, ii {-.,i ,,t :".

) 5y9-,1;,,nrc L ,i, ,.iir,/l,l4 ,:! ,r 1g/


) fl I lr,,u,n(':i. j .;, ,,y.1.16.:i,,/. (i, r.,.y1,_i
_} f .t yn j'ql:) -<::')i ,:+rtlri..\,r,.^
") ? ) c ) Iit( l t- ( ) *", I,.1, t ) /b,',n /.. t /\,:t r,) hi,.,l r,

I
i I

0t, {\ gl-c. ,u;,,o r. .-'

You might also like