Q111. CORRECT TEXT

Create a RAID Device /dev/md0 by creating equal two disks from available free space on your harddisk and mount it on /data.

Answer and Explanation:

Redhat Enterprise Linux 5 Supports the RAID LEVEL 0, RAID LEVEL 1, RAID LEVEL 5 and RAID LEVEL 6 at installation time. You can create it at installation time later no need to type lots of commands for RAID.

At Installation Time:

ii. Create the partitions using diskdruid.

iii. Create the Partitions having File system Type Software RAID.

iv. Click on RAID button

v. Type the Mount Point

vi. Select File system type

vii. Select RAID Level

viii. Select Partitions/disks as a member of RAID.

viii. Click on ok

After Installation: We can create the RAID Device after Installation on command-line.

11. Create the Two partitions having equal size. (Specify the Size using Cylinder, find the

remaining cylinder and divide by 2).

12. Change the Partition ID to fd (Linux raid Autodetect) by typing t.

13. Type w à To write on partitions table.

14. Use partprobe command to synchronic the partition table.

15. Use: mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/hda? /dev/hda?

16. Verify the RAID: mdadm --detail /dev/md0

17. mkfs -t ext3 /dev/md0

18. mount /dev/md0 /data

19. vi /etc/fstab

/dev/md0 /data ext3 defaults 0 0

20. Verify mounting devices using mount command.


Q112. CORRECT TEXT

Create the group named sysadmin.

Answer and Explanation:

1. groupadd sysadmin

groupadd command is used to create the group and all group information is stored in /etc/group file.


Q113. CORRECT TEXT

You are giving RHCT Exam and in your Exam paper there is a question written, make successfully ping to 192.168.0.254.

Answer and Explanation:

In Network problem think to check:IP Configuration: use ifconfig command either IP is assigned to interface or not?Default Gateway is set or not?Hostname is set or not?Routing problem is there?Device Driver Module is loaded or not?Device is activated or not?

Check In this way:use ifconfig command and identify which IP is assigned or not.cat

/etc/sysconfig/network àWhat, What is written here. Actually here are these parameters.

NETWORKING=yes or no

GATEWAY=x.x.x.x

HOSTNAME=?

NISDOMAIN=?

- Correct the fileUse netconfig command

- Either Select Automatically from DHCP or assign the static IPUse service network restart or start command

Now try to ping it will work.


Q114. CORRECT TEXT

Configure the web server for www.abc.com associated IP address is 192.100.0.1 by allowing access to user5 and user6 httpusers.

Answer and Explanation:

1. vi /etc/httpd/conf/httpd.conf

<VirtualHost 192.100.0.1>

ServerName www.abc.com

DocumentRoot /var/www/abc/

<Directory /var/www/abc>

AllowOverride authconfig

</Directory>

DirectoryIndex index.html

ServerAdmin webmaster@abc.com

ErrorLog logs/error_abc.logs

CustomLog logs/custom_abc.logs common

</VirtualHost>

2. Create the directory and index page on specified path. (Index page can download from

ftp://server1.example.com at exam time)

Check the SELinux context of index.html file, should be like this:

-rw-r--r-- root root system_u:object_r:httpd_sys_content_t /var/www/html/index.html

If SELinux Context is mismatched, use the restorecon -R /var command

3. vi /var/www/abc/.htaccess

AuthName "Only to Authorized Users"

AuthType basic

AuthUserFile /etc/httpd/conf/mypasswd

require valid-user

Check the SELinux Context, should like this:

-rw-r--r-- root root root:object_r:httpd_sys_content_t .htaccess

htpasswd -c /etc/httpd/conf/mypasswd user5htpasswd -m /etc/httpd/conf/mypasswd user6chgrp

apache /etc/httpd/conf/mypasswdchmod g+r /etc/httpd/conf/mypasswd

Check the SELinux Context, should like this:

-rw-r--r-- root root system_u:object_r:httpd_config_t /etc/httpd/conf/mypasswd

Use restorecon command to restore the mismatched SELinux Context of the file.service httpd

restartchkconfig httpd on

AllowOverride Authconfig is used to specify which and how much configuration can be overridden by directory specific .htaccess files.

One of the most common tasks performed in users' .htaccess files is adding authorization.

Typically, a user will setup authorization for directories that hold sensitive information with a configuration.


Q115. CORRECT TEXT

Create the directory /archive and group owner should be the sysuser group.

Answer and Explanation:

1. chgrp sysuser /archive

2. Verify using ls -ld /archive command. You should get like

drwxr-x--- 2 root sysadmin 4096 Mar 16 17:59 /archive

chgrp command is used to change the group ownership of particular files or directory.

Another way you can use the chown command.

chown root:sysuser /archive


Q116. CORRECT TEXT

Your Local Domain is example.com. Configure the send mail server for you local LAN by following these conditions.

i. Any mail going from Local LAN should be masquerade to example.com

ii. Any incoming mail for info@example.com virtual address should be mapped to admin@example.com

iii. All outgoing mail should be send via smtp.abc.com mail server.

Answer and Explanation:

1. vi /etc/mail/local-host-names

example.com

2. vi /etc/mail/sendmail.mc

dnl # DEAMON_OPTIONS(`Port=smtp,Addr=127.0.0.1,Name=MTA`)dnl

MASQUERADE_AS(`example.com')dnl

define(`SMART_HOST',`smtp.abc.com')

3. m4 /etc/mail/sendmail.mc >/etc/mail/sendmail.cf

4. vi /etc/mail/virtusertable

info@example.com admin@example.com

5. vi /etc/mail/access

192.168.0 RELAY

/etc/mail/local-host-names file contains the aliases to hostname. Mail server program reads the

/etc/mail/sendmail.cf. To change the configuration on mail server, we should edit the

/etc/mail/sendmail.mc file and should generate the sendmail.cf using m4 command.

By default sendmail server allows to connect to local host only. So we should edit the

/etc/mail/sendmail.mc file to allow connect to other hosts.

By default sendmail server will not forward mail. We should specify on /etc/mail/access to relay or to block mail coming from domain or network or individual email address.

To masquerade the address, MASQUERADE_AS option is in /etc/mail/sendmail.mc.

SMART_HOST deliver all local mail locally and outgoing mail through another mail server.

/etc/mail/virtusertable file is used map virtual address to real address.

Eg.

info@example.com user1@example.com

enquiry@example.com admin@abc.com


Q117. CORRECT TEXT

You have a domain in your LAN named example.com and my133t.org. Allow the

- Allow the FTP connection only from local domain.

- Deny the FTP connection from my133t.org

Answer and Explanation:

1. vi /etc/hosts.deny

vsftpd:ALL EXCEPT .example.com

or

1. vi /etc/hosts.deny

vsftpd:ALL

2. vi /etc/hosts.allow

vsftpd:.example.com

We can secure the services using tcp_wrappers. There are main two files, /etc/hosts.allow and /etc/hosts.deny.

There will be three stage access checking

- Is access explicitly permitted? Means permitted from /etc/hosts.allow?

- Otherwise, Is access explicitly denied? Means denied from /etc/hosts.deny?

- Otherwise, by default permit access if neither condition matched.

To deny the services we can configure /etc/hosts.deny file using ALL and EXCEPT operation.

Pattern of /etc/hosts.allow and /etc/hosts.deny file is:

Demon_list:client_list:options

In Client list can be either domain name or IP address.


Q118. CORRECT TEXT

One Logical Volume is created named as myvol under vo volume group and is mounted. The Initial Size of that Logical Volume is 124MB. Make successfully that the size of Logical Volume 245MB without losing any data. The size of logical volume 240MB to 255MB will be acceptable.

Answer and Explanation:

1. First check the size of Logical Volume: lvdisplay /dev/vo/myvol

2. Increase the Size of Logical Volume: lvextend -L+121M /dev/vo/myvol

3. Make Available the size on online: ext2online /dev/vo/myvol

4. Verify the Size of Logical Volume: lvdisplay /dev/vo/myvol

5. Verify that the size comes in online or not: df -h

We can extend the size of logical Volume using the lvextend command. As well as to decrease the size of Logical Volume, use the lvresize command. In LVM v2 we can extend the size of Logical Volume without unmount as well as we can bring the size of Logical Volume on online using ext2online command.


Q119. CORRECT TEXT

Create the group named sysuser.

Answer and Explanation:

1. groupadd sysuser

groupadd command is used to create the group and all group information is stored in /etc/group file.


Q120. CORRECT TEXT

Add a user named user4 and make primarily belongs to training group. As well account should expire on 30 days from today.

Answer and Explanation:

useradd usernamepasswd usernameusermod -e "date"

example: usermod -e "12 Feb 2006" user4

Verify: chage -l user4