getcertified4sure.com

Top Real RH302 courses Tips!




2021 Apr RH302 book

Q21. CORRECT TEXT

Install the Redhat Linux RHEL 5 through NFS. Where your Server is server1.example.com having IP 172.24.254.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 172.24.0.0/16 and 172.25.0.0/16. As well as there are two domains example.com on 172.24.0.0/16 network and cracker.org on 172.25.0.0/16 network. Your system is based on example.com domain. SELinux should be in enforcing mode.

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: 172.24.254.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.


Q22. CORRECT TEXT

Download a index.html file from ftp.server1.example.com and set as default page for you station?.example.com where ? is your host number. Note file is anonymously available.

Answer and Explanation:

1. ftp ftp://server1.example.com

2. Login as an anonymous and download the file.

3. Copy the file in /var/www/html if you downloaded in another location.

4. service httpd restart

5. Test using links: links http://station?.example.com

Check the SELinux context of index.html file, should 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


Q23. CORRECT TEXT

You are giving the debug RHCT exam. The examiner told you that the password of root is redhat.

When you tried to login displays the error message and redisplayed the login screen. You changed the root password, again unable to login as a root. How will you make Successfully Login as a root.

Answer and Explanation:

When root unable to login into the system think:

1. Is password correct?

2. Is account expired?

3. Is terminal Blocked?

Do these Steps:Boot the System on Single user mode.Change the passwordCheck the account expire date by using chage -l root command.

If account is expired, set net expire date: chage -E "NEVER" root

1. Check the file /etc/securetty à Which file blocked to root login from certain terminal.

2. If terminal is deleted or commented write new or uncomment.

3. Reboot the system and login as a root.


Q24. CORRECT TEXT

Configure the DHCP server by matching the following conditions:

Subnet and netmask should be 192.168.0.0 255.255.255.0Gateway Should be 192.168.0.254DNS

Sever Should be 192.168.0.254Domain Name should be example.comRange from 192.168.0.10-50

Answer and Explanation:

1. vi /etc/dhcpd.conf

ddns-update-style none;

option routers 192.168.0.1;

option domain-name "example.com";

option domain-name-servers 192.168.0.254;

default-lease-time 21600;

max-lease-time 43200;

subnet 192.168.0.0 netmask 255.255.255.0

{

range 192.168.0.10 192.168.0.50;

}

/etc/dhcpd.conf file is used to configure the DHCP. Some global options i.e Gateway,

domainname, DNS server specified using option keyword.

2. Check the SELinux Context, should be like this:

-rw-r--r-- root root system_u:object_r:dhcp_etc_t /etc/dhcpd.conf

3. If not use the restorecon -R /etc command to restore the selinux context of the file.

4. service dhcpd start | restart


Q25. CORRECT TEXT

Configure the Slave DNS for example.com domain where master DNS is 192.100.0.254.

Answer and Explanation:

Slave DNS is the backup of master DNS. Automatically within a certain time slave DNS synchronizes with the Master DNS server.

1. vi /var/named/chroot/etc/named.conf

zone "example.com" IN {

type slave;

masters { 192.100.0.254; };

file "example.com.zone";

};

named-checkconf command checks the syntax for /var/named/chroot/etc/named.conf file.service named start | restart


Q26. CORRECT TEXT

Configure the send mail server for your local LAN. As well as the mail of user john should get by the jane user.

Answer and Explanation:

Here your Local LAN means your domain named example.com.

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

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

4. vi /etc/mail/access

192.168.0 RELAY

5. service sendmail start | restart

6. chkconfig sendmail on

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

7. vi /etc/aliases

john: jane

8. newaliases

We can redirect the mail of one user to another user using /etc/aliases file. In example all mail of john goes to jane user.


Q27. CORRECT TEXT

Create the user named user1, user2, user3

Answer and Explanation:

2. useradd user1

3. useradd user2

4. useradd user3

5. passwd user1

6. passwd user2

7. passwd user3

We create the user using useradd command and we change the password of user using passwd command. If you want to set the blank password use: passwd -d username.


Q28. CORRECT TEXT

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

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

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

4. vi /etc/mail/access

example.com RELAY

192.168.0 RELAY

5. service sendmail start | restart

6. chkconfig sendmail on

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


Q29. CORRECT TEXT

You Completely Install the Redhat Enterprise Linux 5 on your System. While start the system, it's giving error to load X window System. How will you fix that problem and make boot successfully run X Window System.

Answer and Explanation:

Think while Problems occurred on booting System on Runlevel 5 (X Window)./tmp is full or notQuota is already reachedVideo card or resolution or monitor is misconfigured.xfs service is running or not.

Do These:

1. df -h /tmp à /tmp is full remove the unnecessary filequota username à if quota is already reached remove unnecessary file from home directory.Boot the System in runlevel 3.à you can pass the Kernel Argument from boot loader.Use command: system-config-display à It will display a dialog to configure the monitor, Video card, resolution etc.Set the Default Runlevel 5 in /etc/inittab id:5:initdefault:

6. Reboot the System you will get the GUI login Screen.


Q30. CORRECT TEXT

Boot your System Successfully on runlevel 3.

Answer and Explanation:

This is boot related problem. There will be same questions repeated two times but problem is different.

First When you restart the system you will get the Error:

mount: error 15 mounting ext3

mount: error 2 mounting none

switchroot: mount failed: 22

umount /initrd/dev/: 2

Kernel Panic: no syncing: Attempted to kill init !

This error occurred in your system before showing welcome redhat linux. That means problem in grub boot loader.

Restart the System

Check the grub boot loader configuration by pressing e shortcut key.

You will see like:

root (hd0,0)

kernel /vmlinuz-2.6.9-5.EL ro root= / rhgb quiet

initrd /initrd-2.6.9-5.EL.img

OR

root (hd0,0)

kernel /vmlinuz-2.6.9-5.EL ro root=LABEL=/root rhgb quiet

initrd /initrd-2.6.9-5.EL.img

Then Edit Boot loader to make like

root (hd0,0)

kernel /vmlinuz-2.6.9-5.EL ro root=LABEL=/ rhgb quiet

initrd /initrd-2.6.9-5.EL.img

Check all lines and edit as same as above. Press b to boot the system

After booting the system you should correct the /etc/grub.conf file.