Q61. CORRECT TEXT

Install the Redhat Linux RHEL 5 through NFS. Where your Server is server1.example.com having IP 192.168.0.254 and shared /var/ftp/pub. The size of the partitions are listed below:

/ à 1048

/home à 1028

/boot à 512

/var à 1028

/usr à 2048

Swap -> 1.5 of RAM Size

/data à configure the RAID Level 0 of remaining all free space.

After completing the installation through NFS solve the following questions. There are two networks 192.168.0.0/24 and 192.168.1.0/24. As well as there are two domains example.com on 192.168.0.0/24 network and cracker.org on 192.168.1.0/24 network. Your system is based on example.com domain.

Answer and Explanation:

1. Insert the CD on CD-ROM and start the system.

2. In Boot: Prompt type linux askmethod

3. It will display the language, keyboard selection.

4. It will ask you for the installation method.

5. Select the NFS Image from the list

6. It will ask the IP Address, Net mask, Gateway and Name Server. Select Use

Dynamic IP Configuration: because DHCP Server will be configured in your exam lab.

7. It will ask for the NFS Server Name and Redhat Enterprise Linux Directory.

Specify the NFS Server: 192.168.0.254

Directory: /var/ftp/pub

8. After Connecting to the NFS Server Installation start in GUI. Go up to the partition screen by selecting the different Options.

9. Create the partition According to the Question because Size and what-what partition should you create at installation time is specified in your question

10. Create the two RAID partitions having equal size of remaining all free space.

11. Click on RAID button

12. Type mount point /data

13. Select RAID Level 0

14. Click on ok

15. Then select the MBR Options, time zone and go upto package selections.

It is another Most Important Time of installation. Due to the time limit, you should care about the installation packages. At Exam time you these packages are enough.

X-Window System

GNOME Desktop

(these two packages are generally not required)

Administration Tools.

System Tools

Windows File Server

FTP Servers

Mail Servers

Web Servers

Network Servers

Editors

Text Based Internet

Server Configuration Tools

Printing Supports

When installation will complete, your system will reboot. Jump for another Question.


Q62. 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.

Answer and Explanation:

The LVM system organizes hard disks into Logical Volume (LV) groups. Essentially, physical hard disk partitions (or possibly RAID arrays) are set up in a bunch of equal-sized chunks known as Physical Extents (PE). As there are several other concepts associated with the LVM system, let's start with some basic definitions:

* Physical Volume (PV) is the standard partition that you add to the LVM mix. Normally, a physical volume is a standard primary or logical partition. It can also be a RAID array.

* Physical Extent (PE) is a chunk of disk space. Every PV is divided into a number of equal sized PEs. Every PE in a LV group is the same size. Different LV groups can have different sized PEs.

* Logical Extent (LE) is also a chunk of disk space. Every LE is mapped to a specific PE.

* Logical Volume (LV) is composed of a group of LEs. You can mount a filesystem such as /home and /var on an LV.

* Volume Group (VG) is composed of a group of LVs. It is the organizational group for LVM. Most of the commands that you'll use apply to a specific VG.

1. Verify the size of Logical Volume: lvdisplay /dev/vg0/lv1

2. Verify the Size on mounted directory: df -h or df -h mounted directory name

3. Use : lvextend -L+400M /dev/vg0/lv1

4. ext2online -d /dev/vg0/lv1 à to bring extended size online.

5. Again Verify using lvdisplay and df -h command.


Q63. CORRECT TEXT

Make Secondary belongs the jackie and curtin users on sysuser group. But david user should not belongs to sysuser group.

Answer and Explanation:

1. usermod -G sysuser jackie

2. usermod -G sysuser curtin

3. Verify by reading /etc/group file

Using usermod command we can make user belongs to different group. There are two types of group one primary and another is secondary. Primary group can be only one but user can belongs to more than one group as secondary.

usermod -g groupname username à To change the primary group of the user

usermod -G groupname username à To make user belongs to secondary group.


Q64. CORRECT TEXT

Make on /archive directory that only the user owner and group owner member can fully access.

Answer and Explanation:

1. chmod 770 /archive

2. Verify using : ls -ld /archive

Preview should be like:

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

To change the permission on directory we use the chmod command. According to the question that only the owner user (root) and group member (sysuser) can fully access the directory so:

chmod 770 /archive


Q65. CORRECT TEXT

Fill up the Form through http://server1.example.com/form.php

Answer and Explanation:

1. Open the Browser and type the above URL.

2. Fill the form as required all information.


Q66. 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


Q67. CORRECT TEXT

Share the Internet using squid for your Local LAN. Proxy server should be run on 8080 port.

Answer and Explanation:

1. vi /etc/squid/squid.conf

#detault:

http_port 8080

#Recommended minimum configuration:

# Near the src acl src section

acl mynet src 192.168.0.0/255.255.255.0

#Default:

# http_access deny all

#Under Here

http_access allow mynet

2. service squid start

3. chkconfig squid on

squid is a proxy caching server, using squid we can share the internet, block the internet, to certain network. First we should define the port for squid, the standard port for squid is 3128. We can run squid on different port by specifying http_port portnumber.

To block or allow the Internet access to hosts, we should create the acl (Access Control List). In this file we can specify only the IP address.

Example: acl aclname src IP/Netmask

After creating acl we can block or allow the internet to specified acl.

http_access allow | deny alcname


Q68. CORRECT TEXT

Quota is implemented on /data but not working properly. Find out the Problem and implement the quota to user1 to have a soft limit 60 inodes (files) and hard limit of 70 inodes (files).

Answer and Explanation:

Quotas are used to limit a user's or a group of users' ability to consume disk space. This prevents a small group of users from monopolizing disk capacity and potentially interfering with other users or the entire system. Disk quotas are commonly used by ISPs, by Web hosting companies, on FTP sites, and on corporate file servers to ensure continued availability of their systems.

Without quotas, one or more users can upload files on an FTP server to the point of filling a filesystem. Once the affected partition is full, other users are effectively denied upload access to the disk. This is also a reason to mount different filesystem directories on different partitions. For example, if you only had partitions for your root (/) directory and swap space, someone uploading to your computer could fill up all of the space in your root directory (/). Without at least a little free space in the root directory (/), your system could become unstable or even crash.

You have two ways to set quotas for users. You can limit users by inodes or by kilobyte-sized disk blocks. Every Linux file requires an inode. Therefore, you can limit users by the number of files or by absolute space. You can set up different quotas for different filesystems. For example, you can set different quotas for users on the /home and /tmp directories if they are mounted on their own partitions.

Limits on disk blocks restrict the amount of disk space available to a user on your system. Older versions of Red Hat Linux included LinuxConf, which included a graphical tool to configure quotas.

As of this writing, Red Hat no longer has a graphical quota configuration tool. Today, you can configure quotas on RHEL only through the command line interface.

1. vi /etc/fstab

/dev/hda11 /data ext3 defaults,usrquota 1 2

2. Either Reboot the System or remount the partition.

Mount -o remount /dev/hda11 /data

3. touch /data/aquota.user

4. quotacheck -ufm /data

5. quotaon -u /data

6. edquota -u user1 /data

and Specified the Soft limit and hard limit on opened file.

To verify either quota is working or not:

Soft limit specify the limit to generate warnings to users and hard limit can't cross by the user. Use the quota command or repquota command to monitor the quota information.


Q69. 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


Q70. CORRECT TEXT

Run the squid proxy server on port 8080 by allowing internet access to 192.168.0.0/24 and block msn.com site to access.

Answer and Explanation:

1. vi /etc/squid/squid.conf

#detault:

http_port 8080

#Recommended minimum configuration:

# Near the src acl src section

acl allownet src 192.168.0.0/255.255.255.0

acl msnnet dstdomain .msn.com

#Default:

# http_access deny all

#Under Here

http_access deny msnnet

http_access allow allownet

2. service squid start

3. chkconfig squid on

squid is a proxy caching server, using squid we can share the internet, block the internet, to certain network. First we should define the port for squid, the standard port for squid is 3128. We can run squid on different port by specifying http_port portnumber.

To block or allow the Internet access to hosts, we should create the acl (Access Control List). In this file we can specify only the IP address.

Example: acl aclname src IP/Netmask

After creating acl we can block or allow the Internet to specified acl.

http_access allow | deny alcname