
RedHat Red Hat Certified Engineer - RHCE - RHCE Exam Questions
QUESTION NO: 1
SIMULATION
Add an additional swap partition of 754 MB to your system.
The swap partition should automatically mount when your system boots.
Do not remove or otherwise alter any existing swap partitions on your system.
SIMULATION
Add an additional swap partition of 754 MB to your system.
The swap partition should automatically mount when your system boots.
Do not remove or otherwise alter any existing swap partitions on your system.
Correct Answer:
fdisk-l
fdisk-cu/dev/vdapneorpselectedefault(first):enterdefault(last):enterndefault(first):enterdefault(first):+754Mt(1-5)l:82pw
#reboot
#mkswap/dev/vda5
vim/etc/fstab/dev/vda5swapswapdefaults00wq
mount-a
swapon-a
swapon-s
fdisk-cu/dev/vdapneorpselectedefault(first):enterdefault(last):enterndefault(first):enterdefault(first):+754Mt(1-5)l:82pw
#reboot
#mkswap/dev/vda5
vim/etc/fstab/dev/vda5swapswapdefaults00wq
mount-a
swapon-a
swapon-s
QUESTION NO: 2
CORRECT TEXT
Some users home directory is shared from your system. Using showmount -e localhost command, the shared directory is not shown. Make access the shared users home directory.
CORRECT TEXT
Some users home directory is shared from your system. Using showmount -e localhost command, the shared directory is not shown. Make access the shared users home directory.
Correct Answer:
VerifytheFilewhetherSharedornot?:cat/etc/exports
Startthenfsservice:servicenfsstart
Starttheportmapservice:serviceportmapstart
Makeautomaticallystartthenfsserviceonnextreboot:chkconfignfson
Makeautomaticallystarttheportmapserviceonnextreboot:chkconfigportmapon
Verifyeithersharingornot:showmount-elocalhost
Checkthatdefaultfirewallisrunningonsystem?Ifrunningflushtheiptablesusingiptables-Fandstoptheiptablesservice.
Startthenfsservice:servicenfsstart
Starttheportmapservice:serviceportmapstart
Makeautomaticallystartthenfsserviceonnextreboot:chkconfignfson
Makeautomaticallystarttheportmapserviceonnextreboot:chkconfigportmapon
Verifyeithersharingornot:showmount-elocalhost
Checkthatdefaultfirewallisrunningonsystem?Ifrunningflushtheiptablesusingiptables-Fandstoptheiptablesservice.
QUESTION NO: 3
CORRECT TEXT
Create the following users, groups, and group memberships:
A group named adminuser.
A user natasha who belongs to adminuser as a secondary group A user harry who also belongs to adminuser as a secondary group.
A user sarah who does not have access to an interactive shell on the system, and who is not a member of adminuser, natasha, harry, and sarah should all have the password of redhat.
CORRECT TEXT
Create the following users, groups, and group memberships:
A group named adminuser.
A user natasha who belongs to adminuser as a secondary group A user harry who also belongs to adminuser as a secondary group.
A user sarah who does not have access to an interactive shell on the system, and who is not a member of adminuser, natasha, harry, and sarah should all have the password of redhat.
Correct Answer:
groupaddsysmgrs
useradd-GsysmgrsNatasha
Wecanverifythenewlycreateduserbycat/etc/passwd)
#useradd-Gsysmgrsharry
#useradd-s/sbin/nologinsarrh
#passwdNatasha
#passwdharry
#passwdsarrah
useradd-GsysmgrsNatasha
Wecanverifythenewlycreateduserbycat/etc/passwd)
#useradd-Gsysmgrsharry
#useradd-s/sbin/nologinsarrh
#passwdNatasha
#passwdharry
#passwdsarrah
QUESTION NO: 4
CORRECT TEXT
One Logical Volume named /dev/test0/testvolume1 is created. The initial Size of that disk is 100MB now you required more 200MB. Increase the size of Logical Volume, size should be increase on online.
CORRECT TEXT
One Logical Volume named /dev/test0/testvolume1 is created. The initial Size of that disk is 100MB now you required more 200MB. Increase the size of Logical Volume, size should be increase on online.
Correct Answer:
lvextend-L+200M/dev/test0/testvolume1Uselvdisplay/dev/test0/testvolume1)
ext2online-d/dev/test0/testvolume1lvextendcommandisusedtheincreasethesizeofLogicalVolume.Othercommandlvresizecommandalsoheretoresize.Andtobringincreasedsizeononlineweusetheext2onlinecommand.
ext2online-d/dev/test0/testvolume1lvextendcommandisusedtheincreasethesizeofLogicalVolume.Othercommandlvresizecommandalsoheretoresize.Andtobringincreasedsizeononlineweusetheext2onlinecommand.
QUESTION NO: 5
CORRECT TEXT
One Logical Volume named lv1 is created under vg0. The Initial Size of that Logical Volume is 100MB. Now you required the size 500MB. Make successfully the size of that Logical Volume 500M without losing any data. As well as size should be increased online.
CORRECT TEXT
One Logical Volume named lv1 is created under vg0. The Initial Size of that Logical Volume is 100MB. Now you required the size 500MB. Make successfully the size of that Logical Volume 500M without losing any data. As well as size should be increased online.
Correct Answer:
TheLVMsystemorganizesharddisksintoLogicalVolume(LV)groups.Essentiallyphysicalharddiskpartitions(orpossiblyRAIDarrays)aresetupinabunchofequalsizedchunksknownasPhysicalExtents(PE).AsthereareseveralotherconceptsassociatedwiththeLVMsystemlet'sstartwithsomebasicdefinitions:PhysicalVolume(PV)isthestandardpartitionthatyouaddtotheLVMmix.Normallyaphysicalvolumeisastandardprimaryorlogicalpartition.ItcanalsobeaRAIDarray.PhysicalExtent(PE)isachunkofdiskspace.EveryPVisdividedintoanumberofequalsizedPEs.EveryPEinaLVgroupisthesamesize.DifferentLVgroupscanhavedifferentsizedPEs.LogicalExtent(LE)isalsoachunkofdiskspace.EveryLEismappedtoaspecificPE.LogicalVolume(LV)iscomposedofagroupofLEs.Youcanmountafilesystemsuchas/homeand/varonanLV.VolumeGroup(VG)iscomposedofagroupofLVs.ItistheorganizationalgroupforLVM.Mostofthecommandsthatyou'lluseapplytoaspecificVG.
VerifythesizeofLogicalVolume:lvdisplay/dev/vg0/lv1
VerifytheSizeonmounteddirectory:df-hordf-hmounteddirectoryname
Use:lvextend-L+400M/dev/vg0/lv1
ext2online-d/dev/vg0/lv1tobringextendedsizeonline.
AgainVerifyusinglvdisplayanddf-hcommand.
VerifythesizeofLogicalVolume:lvdisplay/dev/vg0/lv1
VerifytheSizeonmounteddirectory:df-hordf-hmounteddirectoryname
Use:lvextend-L+400M/dev/vg0/lv1
ext2online-d/dev/vg0/lv1tobringextendedsizeonline.
AgainVerifyusinglvdisplayanddf-hcommand.
QUESTION NO: 6
CORRECT TEXT
Configure the permissions of /var/tmp/fstab
Copy the file /etc/fstab to /var/tmp/fstab. 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 natasha is able to read and write /var/tmp/fstab.
the user harry can neither write nor read /var/tmp/fstab.
all other users (current or future) have the ability to read /var/tmp/fstab.
CORRECT TEXT
Configure the permissions of /var/tmp/fstab
Copy the file /etc/fstab to /var/tmp/fstab. 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 natasha is able to read and write /var/tmp/fstab.
the user harry can neither write nor read /var/tmp/fstab.
all other users (current or future) have the ability to read /var/tmp/fstab.
Correct Answer:
cp-a/etc/fstab/var/tmp
cd/var/tmp
ls-l
getfacl/var/tmp/fstab
chmodugo-x/var/tmp/fstab[Noneedtodothistherewon'tbeexecutepermissionforthefilebydefault]
#setfacl-mu:natasha:rw/var/tmp/fstab
#setfacl-mu:harry:0/var/tmp/fstab(zero)[Readpermissionwillbethereforalltheusersbydefault.Checkitusingls-l/var/tmp/fstab]Verifyby[ls-la/var/tmp/fstab]
cd/var/tmp
ls-l
getfacl/var/tmp/fstab
chmodugo-x/var/tmp/fstab[Noneedtodothistherewon'tbeexecutepermissionforthefilebydefault]
#setfacl-mu:natasha:rw/var/tmp/fstab
#setfacl-mu:harry:0/var/tmp/fstab(zero)[Readpermissionwillbethereforalltheusersbydefault.Checkitusingls-l/var/tmp/fstab]Verifyby[ls-la/var/tmp/fstab]
QUESTION NO: 7
CORRECT TEXT
Add 3 users: harry, natasha, tom.
The requirements: The Additional group of the two users:
harry, Natasha is the admin group.
The user: tom's login shell should be non-interactive.
CORRECT TEXT
Add 3 users: harry, natasha, tom.
The requirements: The Additional group of the two users:
harry, Natasha is the admin group.
The user: tom's login shell should be non-interactive.
Correct Answer:
#useradd-Gadminharry
#useradd-Gadminnatasha
#useradd-s/sbin/nologintom
#idharry;idNatasha(Showadditionalgroup)
#cat/etc/passwd(Showtheloginshell)OR
#system-config-users
#useradd-Gadminnatasha
#useradd-s/sbin/nologintom
#idharry;idNatasha(Showadditionalgroup)
#cat/etc/passwd(Showtheloginshell)OR
#system-config-users




