Weekend Sale Special - Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: top65certs

Complete RH202 RedHat Materials

Page: 3 / 5
Total 140 questions

RHCT (Redhat Certified Technician) RH202 Questions and Answers

Question 9

There are three Disk Partitions /dev/hda8, /dev/hda9, /dev/hda10 having size 100MB of each partition. Create a Logical Volume named testvolume1 and testvolume2 having a size 250MB. Mount each Logical Volume on lvmtest1, lvmtest2 directory.

Answer and Explanation:

Steps of Creating LVM:

1.pvcreate /dev/hda8 /dev/hda9 /dev/hda10

pvdisplay command is used to display the information of physical volume.

2.vgceate test0 /dev/hda8 /dev/hda9 /dev/hda10

vgdisplay command is used to display the information of Volume Group.

3.lvcreate –L 250M –n testvolume1 test0

lvdisplay command is used to display the information of Logical Volume.

4.lvcreate –L 250M –n testvolume2 test0

5.mkfs –t ext3 /dev/test0/testvolume1

6.mkfs –t ext3 /dev/test0/testvolume2

7.mkdir /lvtest1

8.mkdir /lvtest2

9.mount /dev/test0/testvolume1 /lvtest1

10.mount /dev/test0/testvolume2 /lvtest2

11.vi /etc/fstab

/dev/test0/testvolume2/lvtest2ext3defaults0 0

/dev/test0/testvolume1/lvtest1ext3defaults0 0

To create the LVM( Logical Volume Manager) we required the disks having ‘8e’ Linux LVM type. First we should create the physical Volume, then we can create the Volume group from disks belongs to physical Volume. lvcreate command is used to create the logical volume on volume group. We can specify the size of logical volume with –L option and name with -n option.

Options:

Question 10

One Domain RHCE is configured in your lab, your domain server is

server1.example.com. nisuser2001, nisuser2002, nisuser2003 user are created on your server 192.168.0.254:/rhome/stationx/nisuser2001. Make sure that when NIS user login in your system automatically mount the home directory. Home directory is separately shared on server /rhome/stationx/ where x is your Station number.

Answer and Explanation:

1. use the authconfig or system-config-authentication

2. Select the [*] USE NIS

3. Type the NIS Domain: RHCE

4. Type Server 192.168.0.254 then click on next and ok

5. You will get a ok message.

6. Create a Directory /rhome/stationx where x is your station number.

6. vi /etc/auto.master and write at the end of file

/rhome/stationx /etc/auto.home --timeout=60

7. vi /etc/auto.home and write

* -rw,soft,intr 192.168.0.254:/rhome/stationx/&

Note: please specify your station number in the place of x.

8. Service autofs restart

9. Login as the nisuser2001 or nisuser2002 on another terminal will be

Success.

According to question, RHCE domain is already configured. We have to make a client of RHCE domain and automatically mount the home directory on your system. To make a member of domain, we use the authconfig or system-config-authentication command. There a are lots of authentication server i.e NIS, LDAB, SMB etc. NIS is a RPC related Services, no need to configure the DNS, we should specify the NIS server address.

Here Automount feature is available. When user tried to login, home directory will automatically mount. The automount service used the /etc/auto.master file. On /etc/auto.master file we specified the mount point the configuration file for mount point.

Options:

Question 11

Who ever creates the files/directories on /archive group owner should be automatically should be the same group owner of /archive.

Answer and Explanation:

1.chmod g+s /archive

2.Verify using: ls -ld /archive

Permission should be like:

drwxrws--- 2 root sysuser 4096 Mar 16 18:08 /archive

If SGID bit is set on directory then who every users creates the files on directory group owner automatically the owner of parent directory.

To set the SGID bit: chmod g+s directory

To Remove the SGID bit: chmod g-s directory

Options:

Question 12

Add a job on Cron schedule to display Hello World on every two Seconds in terminal 8.

Answer and Explanation:

1.cat >schedule

*/2 * * * * /bin/echo “Hello World” >/dev/tty8

  • crontab schedule
  • Verify using: crontab –l
  • service crond restart

Cron helps to schedule on recurring events. Pattern of Cron is:

MinuteHourDay of MonthMonth Day of WeekCommands

0-590-231-311-120-7 where 0 and 7 means Sunday.

Note * means every. To execute the command on every two minutes */2.

To add the scheduled file on cron job: crontab filename

To List the Cron Shedule: crontab –l

To Edit the Schedule: crontab –e

To Remove the Schedule: crontab –r

Options:

Page: 3 / 5
Total 140 questions