Want to know Ucertify RH302 Exam practice test features? Want to lear more about Red Hat Red Hat Certified Engineer on Redhat Enterprise Linux 5 (Labs) certification experience? Study Downloadable Red Hat RH302 answers to Rebirth RH302 questions at Ucertify. Gat a success with an absolute guarantee to pass Red Hat RH302 (Red Hat Certified Engineer on Redhat Enterprise Linux 5 (Labs)) test on your first attempt.

2021 Mar RH302 latest exam

Q1. CORRECT TEXT

Successfully resolv to server1.example.com where your DNS server is 172.24.254.254

Answer and Explanation:

1. vi /etc/resolv.conf

nameserver 172.24.254.254

2. host server1.example.com

On every clients, DNS server is specified in /etc/resolv.conf. When you request by name it tries to resolve from DNS server.


Q2. CORRECT TEXT

Deny login to user15 and user16 on Saturday.

Answer and Explanation:

1. vi /etc/security/time.conf

login;*;user15|user16;Sa0000-2400

2. vi /etc/pam.d/login

account required pam_time.so

For Time based authentication, we should configured in /etc/security/time.conf

Syntax of /etc/security/time.conf

services;ttys;users;times

services

is a logic list of PAM service names that the rule applies to.

ttys

is a logic list of terminal names that this rule applies to.

users

is a logic list of users to whom this rule applies.

times

the format here is a logic list of day/time-range entries the days are specified by a sequence of two character entries, MoTuSa for example is Monday Tuesday and Saturday. Note that repeated days are unset MoMo = no day, and MoWk = all weekdays bar Monday. The two character combinations accepted are

Mo Tu We Th Fr Sa Su Wk Wd Al

the last two being week-end days and all 7 days of the week respectively. As a final example, AlFr means all days except Friday.

pam_time modules checks the file /etc/security/time.conf for authentication. So, we should call the pam_time modules in /etc/pam.d/login.


Q3. CORRECT TEXT

You are giving the RHCE exam. Now you should boot your System properly. When you started your System, You got one message that.

INIT Entering runlevel 9

INIT: no more processes left in this runlevel

How will you boot your System properly?

Answer and Explanation:

You should know about the /etc/inittab file, where default runlevel will define. And Much more runlevel specific Scripts are called here.

Actually that problem will occur if you don't specify the default runlevel.

1. Reboot the system

2. Boot the System on single user mode.

Except for a normal boot of Linux, single-user mode is the most commonly used option. This is the system maintenance mode for experienced Linux administrators. It allows you to perform clean backups and restores to any partitions as needed from local hardware. It also allows you to run administration commands, recover or repair password and shadow password files, run filesystem checks, and so forth.

3. vi /etc/inittab and Write

id:runlevel:initdefault:

Standard Runlevels in RedHat Enterprise Linux


Q4. CORRECT TEXT

Create one partitions having size 100MB and mount it on /data.

Answer and Explanation:

Use fdisk /dev/hda àTo create new partition.Type n àFor New partitionsIt will ask for Logical or Primary Partitions. Press l for logical.It will ask for the Starting Cylinder: Use the Default by pressing Enter Key.Type the Size: +100M àYou can Specify either Last cylinder of Size here.Press P to verify the partitions lists and remember the partitions name.Press w to write on partitions table.Either Reboot or use partprobe command.Use mkfs -t ext3 /dev/hda?

Or

mke2fs -j /dev/hda? àTo create ext3 filesystem.vi /etc/fstab

Write:

/dev/hda? /data ext3 defaults 0 0

11. Verify by mounting on current Sessions also:

mount /dev/hda? /data


Q5. CORRECT TEXT

Create the user named jeff, marion, harold

Answer and Explanation:

1. useradd jeff

2. useradd marion

3. useradd harold

useradd command is used to create the user. All user's information stores in /etc/passwd and user;s shadow password stores in /etc/shadow.


Regenerate RH302 study guide:

Q6. CORRECT TEXT

You are a System administrator. Using Log files very easy to monitor the system. Now there are 50 servers running as Mail, Web, Proxy, DNS services etc. You want to centralize the logs from all servers into on LOG Server. How will you configure the LOG Server to accept logs from remote host ?

Answer and Explanation:

By Default system accept the logs only generated from local host. To accept the Log from other host configure:

1. vi /etc/sysconfig/syslog

SYSLOGD_OPTIONS="-m 0 -r"

Where

-m 0 disables 'MARK' messages.

-r enables logging from remote machines

-x disables DNS lookups on messages recieved with -r

2. service syslog restart


Q7. CORRECT TEXT

Raw printer named printerx where x is your station number is installed and shared on server1.example.com. Install the shared printer on your PC to connect shared printer using IPP Protocols. Your server is 192.168.0.254.

Answer and Explanation:

1. Open the Browser either firefox or links

2. Type : http://localhost:631

3. Click on Manage Printer

4. Click on Add Printer

5. Type Queue name like stationx and click on continue

6. Type Device type or printing Protocol: i.e Internet printing Protocol

7. Click on Continue

8. Type Device URL: ipp://server1.example.com/printers/printerx

9. Click on Continue

10. Select RAW Model printer

11. Click on Continue

12. Test by sending the printing job


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


Q9. CORRECT TEXT

Configure to allow the ssh service only from 192.168.0.0/24 except 192.168.0.4

Answer and Explanation:

1. vi /etc/hosts.deny

sshd: 192.168.0. EXCEPT 192.168.0.4

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.


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