The Secret of RH302 exam engine

Actualtests offers free demo for RH302 exam. “Red Hat Certified Engineer on Redhat Enterprise Linux 5 (Labs)”, also known as RH302 exam, is a Red Hat Certification. This set of posts, Passing the Red Hat RH302 exam, will help you answer those questions. The RH302 Questions & Answers covers all the knowledge points of the real exam. 100% real Red Hat RH302 exams and revised by experts!


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:


There are mixed lots of System running on Linux and Windows OS. Some users are working on Windows Operating System. There is a /data directory on linux server should make available on windows to only user1 and user2 users with full access. Configure to make available.

Answer and Explanation:

1. vi /etc/samba/smb.conf


netbios name=station?

workgroup = mygroup

server string=Share from Linux Server


smb passwd file=/etc/samba/smbpasswd

encrypt passwords=yes






valid users=user1 user2

2. smbpasswd -a user1

3. smbpasswd -a user2

4. service smb start | restart

5. chkconfig smb on

Samba servers helps to share the data between linux and windows. Configuration file is /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.


Eric user should able to write on Document root directory.

Answer and Explanation:

Document directive is used in apache configuration file to specify the directory where all web site related documents are. According to question eric user should able to write into the Document root directory.

Better set the permission using ACL (Access Control List), to apply the permission using acl needs to mount the filesystem with acl options. Example in above answer documentroot is in /var and /var is mounting separate file system so needs to mount the /var file system with acl option.

1. vi /etc/fstab

LABEL=/var /var ext3 defaults 1 1

2. mount -o remount /var

3. setfacl -m u:eric:rwx /var/www/example

4. getfacl /var/www/example

getfacl and setfacl two commands used to maintain the permission through acl. setfacl is used to set the permission on file/directory, getfacl is used to display the permission of file/directory.


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


http_port 8080

#Recommended minimum configuration:

# Near the src acl src section

acl mynet src


# 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


Create the directory /data and group owner should be the sysadmin group.

Answer and Explanation:

1. chgrp sysadmin /data

2. Verify using ls -ld /data command. You should get like

drwxr-x— 2 root sysadmin 4096 Mar 16 17:59 /data

chgrp command is used to change the group ownership of particular files or directory.

Another way you can use the chown command.

chown root:sysadmin /data


Configure the webserver for your local domain. Download a www.html file from and rename it as index.html.

Answer and Explanation:

Your local domain mean domain. Lookup the using host you will get the IP address

1. vi /etc/httpd/conf/httpd.conf



DocumentRoot /var/www/example

DirectoryIndex index.html



2. mkdir /var/www/example

3. Download the index.html file from the ftp server specified in question

4. Rename the www.html file to index.html

Check the SELinux context of index page , 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

5. service httpd start|restart

6. chkconfig httpd on

7. check using: links


Change the Group Owner of /data to training group.

Answer and Explanation:

chown or chgrp command is used to change the ownership.

Syntax of chown: chown [-R] username:groupname file/directory

Syntax of chgrp: chgrp [-R] groupname file/directory

Whenever user creates the file or directory, the owner of that file/directory automatically will be that user and that user's primary group name.

To change group owner ship

6. chgrp training /data àWhich set the Group Ownership to training


chown /data àWhich set the user owner to root and group owner to training group.

Verify /data using: ls -ld /data

You will get: drwxr-xr-x 2 root training …………..


There are two different networks, and Your System is in Network. One RHEL 4 Installed System is going to use as a Router. All required configuration is already done on Linux Server. Where and IP Address are assigned on that Server. How will make successfully ping to Network's Host?

Answer and Explanation:

1. vi /etc/sysconfig/network



vi /etc/sysconf/network-scripts/ifcfg-eth0







2. service network restart


Your system is giving error to load X window System. Make successfully boot your system in runlevel5.

Answer and Explanation: 

While you load the X Window System, you will get the problem. Problem may caused by different error.

1. Check the /tmp is full ?

2. Check your quota, hard limit is already crossed ?

3. Check xfs service is running ?

4. Configure the Video card, Resolution, monitor type using: system-config-display (Most Probably in Redhat exam)

5. Edit the /etc/inittab to set default runlevel 5.



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.


There are two sites and Both sites are mappings to 192.100.0.X IP address where X is your Host address. Configure the Apache web server for these sites to make accessible on web.

Answer and Explanation:

1. vi /etc/httpd/conf/httpd.conf

NameVirtualHost 192.100.0.X



DocumentRoot /var/www/abc/

DirectoryIndex index.html


ErrorLog logs/error_abc.logs

CustomLog logs/custom_abc.logs common




DocumentRoot /var/www/example/

DirectoryIndex index.html


ErrorLog logs/error_example.logs

CustomLog logs/custom_example.logs common


2. Create the directory and index page on specified path. (Index page can download from at exam time)

Check the SELinux context of index page , 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

3. service httpd start| restart

4. chkconfig httpd on

5. links

6. links

For Name based Virtual Hosting, we should specified the IP address on which we are going to host the multiple sites using NameVirtualHost options.

* ServerName means you FQDN, already lookup on DNS

* DirectoryRoot path for web documents for this site.

* DirectoryIndex default page for websites.