Cause all that matters here is passing the Red Hat RH302 exam. Cause all that you need is a high score of RH302 Red Hat Certified Engineer on Redhat Enterprise Linux 5 (Labs) exam. The only one thing you need to do is downloading Testking RH302 exam study guides now. We will not let you down with our money-back guarantee.

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


Q142. CORRECT TEXT

Dig Server1.example.com, Resolve to successfully through DNS Where DNS server is 172.24.254.254

Answer and Explanation:

#vi /etc/resolv.conf

nameserver 172.24.254.254

# dig server1.example.com

#host server1.example.com

DNS is the Domain Name System, which maintains a database that can help your computer translate domain names such as www.redhat.com to IP addresses such as 216.148.218.197. As no individual DNS server is large enough to keep a database for the entire Internet, they can refer requests to other DNS servers.

DNS is based on the named daemon, which is built on the BIND (Berkeley Internet Name Domain) package developed through the Internet Software Consortium Users wants to access by name so DNS will interpret the name into ip address. You need to specify the Address if DNS server in each and every client machine. In Redhat Enterprise Linux, you need to specify the DNS server into /etc/resolv.conf file.

After Specifying the DNS server address, you can verify using host, dig and nslookup commands.


Q143. CORRECT TEXT

ssh service is enabled in your Server. Your LAN is connected to WAN also. Configure to match following conditions.

i. Deny the ssh from outside the example.com domain members.

ii. If any denied hosts tried for ssh then send the information through mail with client;s information.

Answer and Explanation:

1. vi /etc/hosts.deny

sshd:ALL EXCEPT .example.com: spawn echo "Loging attempt from %c to %s" | mail -s "Login from denied hosts" root

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.


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


Q145. CORRECT TEXT

Add a new logical partition having size 100MB and create the /data which will be the mount point for the new partition.

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?Ormke2fs -j /dev/hda? àTo create ext3 filesystem.vi /etc/fstabWrite:/dev/hda? /data ext3 defaults 0 0Verify by mounting on current Sessions also:mount /dev/hda? /data


Q146. CORRECT TEXT

The System you are using is for NFS (Network File Services). Some important data are shared from your system. Make automatically start the nfs and portmap services at boot time.

Answer and Explanation:

We can control the services for current session and for next reboot time. For current Session, we use service servicename start or restart or stop or status. For automatically at next reboot time:

3. chkconfig servicename on or off

eg: chkconfig nfs on

chkconfig portmap on

or

ntsysv

Select the nfs and portmap services.

4. Reboot the system and identify whether services are running or not.


Q147. CORRECT TEXT

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

Answer and Explanation:

1. chmod g+s /data

2. Verify using: ls -ld /data

Permission should be like:

drwxrws--- 2 root sysadmin 4096 Mar 16 18:08 /data

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


Q148. CORRECT TEXT

All mails to cracker.org should get by eric user.

Answer and Explanation:

1. vi /etc/mail/virtusertable

@cracker.org eric

2. service sendmail restart

/etc/mail/virtusertable file is used to send the mail coming for virtual user to real user. According to question, all mail to cracker.org should get by eric user so

@cracker.org eric : Which sends all mail of cracker.org to eric user.


Q149. CORRECT TEXT

One NIS Domain named rhce.com is configured in your lab, server is 192.168.0.254. rhce100, rhce200,rhce300 user are created on domain server.

Make your system as a member of rhce.com domain. Make sure that when nis user login in your system home directory should get by them. Home directory is separately shared on server eg /home/stationx/ where x is you station number.

Answer and Explanation:

1. use the authconfig or system-config-authentication

2. Select the [*] USE NIS

3. Type the NIS Domain: rhce.com

4. Type Server 192.168.0.254 then click on next and ok

5. You will get a ok message.

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

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

7. vi /etc/auto.home and write

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

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

8. Service autofs restart

9. Login as the rhce1 or rhce2 or rhce3 on another terminal will be Success.

According to question, rhce.com domain is already configured. We have to make a client of rhce.com domain and automatically mount the home directory on every client. To make a member of domain, we use the autheconfig or system-config-authentication command. There 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 reads the configuration from /etc/auto.master file.

On /etc/auto.master file we specified the mount point the configuration file for mount point.


Q150. CORRECT TEXT

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

i. Relay the mail from 192.168.0.0/24 Network

ii. If any mail coming from cracker.org domain block all mails.

iii. user5's mail should be get by user2.

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

192.168.0 RELAY

@cracker.org REJECT

5. service sendmail start | restart

6. chkconfig dovecot on

7. vi /etc/dovecot.conf

protocols = pop3 pop3s imap imaps

8. service dovecot start | restart

9. chkconfig dovecot on

10. vi /etc/aliases

user5: user2

11. newaliases

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

By default dovecot service start only the imap protocol. To start pop protocol with dovecot, we should write in /etc/dovecot.conf file.

Using /etc/aliases file we can map the user name to send mail of one user to another user. To rebuild database we use the newaliases command.