Tips to Pass RH302 Exam (41 to 50)

It is impossible to pass Red Hat RH302 exam without any help in the short term. Come to Actualtests soon and find the most advanced, correct and guaranteed Red Hat RH302 practice questions. You will get a surprising result by our Most recent Red Hat Certified Engineer on Redhat Enterprise Linux 5 (Labs) practice guides.


♥♥ 2021 NEW RECOMMEND ♥♥

Free VCE & PDF File for Red Hat RH302 Real Exam (Full Version!)

★ Pass on Your First TRY ★ 100% Money Back Guarantee ★ Realistic Practice Exam Questions

Free Instant Download NEW RH302 Exam Dumps (PDF & VCE):
Available on: http://www.surepassexam.com/RH302-exam-dumps.html

2021 Apr RH302 download

Q41. CORRECT TEXT

Install the Cron Schedule for jeff user to display "Hello" on daily 5:30.

Answer and Explanation:

Login as a root usercat >schedule.txt

30 05 * * * /bin/echo "Hello"

3. crontab -u jeff schedule.txt

4. service crond restart

The cron system is essentially a smart alarm clock. When the alarm sounds, Linux runs the commands of your choice automatically. You can set the alarm clock to run at all sorts of regular time intervals. Alternatively, the at system allows you to run the command of your choice once, at a specified time in the future.

Red Hat configured the cron daemon, crond. By default, it checks a series of directories for jobs to run, every minute of every hour of every day. The crond checks the /var/spool/cron directory for jobs by user. It also checks for scheduled jobs for the computer under /etc/crontab and in the /etc/cron.d directory.

Here is the format of a line in crontab. Each of these columns is explained in more detail:

#minute, hour, day of month, month, day of week, command

* * * * * command


Q42. CORRECT TEXT

/storage directory on linux server should make available on windows system that jeff user should able to access on read only mode within example.com domain.

Answer and Explanation:

1. vi /etc/samba/smb.conf

[global]

netbios name=station?

workgroup=station?

security=user

smb passwd file=/etc/samba/smbpasswd

encrypt passwords=yes

hosts allow= .example.com

[data]

path=/data

public=no

writable=no

browsable=yes

2. smbpasswd -a jeff

3. service smb start

4. chkconfig smb on

/etc/samba/smb.conf. There are some pre-defined section, i. global à use to define the global options, ii. Printers à use to share the printers, iii. homes à use the share the user's home directory.

Security=user à validation by samba username and password. May be there are other users also.

To allow certain share to certain user we should use valid users option.

smbpasswd à Helps to change user's smb password. -a option specifies that the username following should be added to the local smbpasswd file.


Q43. CORRECT TEXT

Install the dialog-*

Answer and Explanation:

Questions asking you to install the dialog package from the server. In your Lab FTP server as well as NFS server are configured. You can install either through FTP or NFS.

1. Just Login to server1.example.com through FTP: ftp server1.example.com

2. Enter to pub directory: cd pub

3. Enter to RedHat/RPMS: cd RedHat/RPMS

4. Download the Package: mget dialog-*

5. Logout from the FTP server: bye

6. Install the package: rpm -ivh dialog-*

7. Verify the package either installed or not: rpm -q dialog


Q44. CORRECT TEXT

Create the user named jane and john.

Answer and Explanation:

1. useradd jane

2. useradd john

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.


Q45. CORRECT TEXT

You have a domain in your LAN named example.com. Allow the FTP connection only from local domain.

Answer and Explanation:

1. vi /etc/hosts.deny

vsftpd:ALL EXCEPT .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.


Updated RH302 download:

Q46. CORRECT TEXT

Create the user named eric and deny to interactive login.

Answer and Explanation:

1. useradd eric

2. passwd eric

3. vi /etc/passwd

4. eric:x:505:505::/home/eric:/sbin/nologin

Which shell or program should start at login time is specified in /etc/passwd file. By default Redhat Enterprise Linux assigns the /bin/bash shell to the users. To deny the interactive login, you should write /sbin/nologin or /bin/false instead of login shell.


Q47. CORRECT TEXT

Create the user named eric but eric should not belong to the sysadmin group.

Answer and Explanation:

1. useradd eric

Very tricky question given to you that this user should not belongs to sysadmin group.


Q48. CORRECT TEXT

There are some part-time staff in your office. And you gave the username user9 and user10 to them. Their Office time is 12-2pm on Sunday, Monday and Friday. Configure to login only on their office time.

Answer and Explanation:

1. vi /etc/security/time.conf

login;*;user9|user10;SuMoFri1200-1400

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.


Q49. CORRECT TEXT

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

Answer and Explanation:

1. chmod g+s /storage

2. Verify using: ls -ld /storage

Permission should be like:

drwxrws--- 2 root sysusers 4096 Mar 16 18:08 /storage

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


Q50. CORRECT TEXT

/data Directory is shared from the server1.example.com server. Mount the shared directory that:

d. when user try to access, automatically should mount

e. when user doesn't use mounted directory should unmount automatically after 50 seconds.

f. Shared directory should mount on /mnt/data on your machine.

Answer and Explanation:

6. vi /etc/auto.master

/mnt /etc/auto.misc --timeout=50

7. vi /etc/auto.misc

8. data -rw,soft,intr server1.example.com:/data

9. service autofs restart

10. chkconfig autofs on

When you mount the other filesystem, you should unmount the mounted filesystem, Automount feature of linux helps to mount at access time and after certain seconds, when user unaccess the mounted directory, automatically unmount the filesystem.

/etc/auto.master is the master configuration file for autofs service. When you start the service, it reads the mount point as defined in /etc/auto.master.