RH302 Premium Bundle

RH302 Premium Bundle

Red Hat Certified Engineer on Redhat Enterprise Linux 5 (Labs) Certification Exam

4.5 
(2295 ratings)
0 QuestionsPractice Tests
0 PDFPrint version
September 29, 2024Last update

Red-Hat RH302 Free Practice Questions

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

Answer:

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

4. Is password correct?

5. Is account expired?

6. Is terminal Blocked?

Do these Steps:

3. Boot the System on Single user mode.

4. Change the password

5. Check the account expire date by using chage -l root command.

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

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

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

9. Reboot the system and login as a root.

Answer:

Q3. CORRECT TEXT

There is a FTP server 192.168.0.254 and all required packages are dumped in /var/ftp/pub of that server and anonymous login is enabled. Install the Redhat Enterprise Linux 5 as an anonymous by creating following partitions:

/ 1000

/boot 200

/home 1000

/var 1000

/usr 4000

swap 2X256 (RAM SIZE)

Answer and Explanation:

Note: Examiner will provide you the Installation startup CD. And here mentioned size may vary see on the exam paper.

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 FTP 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 FTP site name and Redhat Enterprise Linux Directory.

Specify the FTP Server: 192.168.0.254

Directory: pub à Because anonymous login on /var/ftp.

8. After Connecting to the FTP Server Installation will start. 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. 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 be 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.

Answer:

Q4. CORRECT TEXT

One Logical Volume named lv1 is created under vg0. The Initial Size of that Logical Volume is 100MB. Now you required the size 500MB. Make successfully the size of that Logical Volume 500M without losing any data. As well as size should be increased online.

Answer and Explanation:

The LVM system organizes hard disks into Logical Volume (LV) groups. Essentially, physical hard disk partitions (or possibly RAID arrays) are set up in a bunch of equal-sized chunks known as Physical Extents (PE). As there are several other concepts associated with the LVM system, let's start with some basic definitions:

* Physical Volume (PV) is the standard partition that you add to the LVM mix. Normally, a physical volume is a standard primary or logical partition. It can also be a RAID array.

* Physical Extent (PE) is a chunk of disk space. Every PV is divided into a number of equal sized PEs. Every PE in a LV group is the same size. Different LV groups can have different sized PEs.

* Logical Extent (LE) is also a chunk of disk space. Every LE is mapped to a specific PE.

* Logical Volume (LV) is composed of a group of LEs. You can mount a filesystem such as /home and /var on an LV.

* Volume Group (VG) is composed of a group of LVs. It is the organizational group for LVM. Most of the commands that you'll use apply to a specific VG.

1. Verify the size of Logical Volume: lvdisplay /dev/vg0/lv1

2. Verify the Size on mounted directory: df -h or df -h mounted directory name

3. Use : lvextend -L+400M /dev/vg0/lv1

4. resize2fs /dev/vg0/lv1 à to bring extended size online.

5. Again Verify using lvdisplay and df -h command.

Answer:

Q5. CORRECT TEXT

Install the Redhat Linux RHEL 4 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

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

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

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.

Answer:

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

Answer:

Q7. CORRECT TEXT

You are giving RHCE exam. Examiner gave you the Boot related problem and told to you that make successfully boot the System. When you started the system, System automatically asking the root password for maintenance. How will you fix that problem?

Answer and Explanation:

Maintenance mode also known as emergency mode. System boots on emergency mode when file system error occurred. It is due to unknown partition, bad filesystem specified in /etc/fstab. To slove follow the steps

6. Give the Root password

7. fdisk -l àVerify the Number of parations.

8. Identify the Root partition, e2label /dev/hda1, e2label /dev/hda2.....

9. Remount the root partation on rw mode: mount -o remount,defaults /dev/hda6 /

10. vi /etc/fstab

Correct all partitions, mount point, mount options, file system etc.

6. Press ctrl+d

Answer:

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

Answer:

Q9. 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 --nisserver=192.168.0.254 --nisdomain=rhce.com --update or system-configauthentication

2. Click on Enable 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 a 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.

Answer:

Q10. CORRECT TEXT

Boot your System Successfully on runlevel 3. (Next Question)

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:

File Not Found

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 !

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.

If still you are getting Error like File not found, it seems that either kernel file or initrd file is missing.

To troubleshoot with these problem, boot the system on rescue mode.

i. linux rescue

ii. chroot /mnt/sysimage

iii. Check the files on /boot, if not available install the kernel package from ftp or nfs server

iv. Create the initrd image file on boot using: mkinitrd initrd-2.6.9-5.EL.img `uname -r`

Answer:

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

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

4. service syslog restart

Answer:

Q12. CORRECT TEXT

You have ftp site named ftp.example.com. You want to deny login as an anonymous on your ftp site. Configure to deny the anonymous.

Answer and Explanation:

1. vi /etc/vsftpd/vsftpd.conf

anonymous_enable=no

2. service vsftpd restart

/etc/vsftpd/vsftpd.conf file is used to allow or deny to anonymous or real user. To allow anonymous anonymous_enable=yes should be there. Sample configuration is like.

# Allow anonymous FTP? (Beware - allowed by default if you comment this out).

anonymous_enable=YES

#

# Uncomment this to allow local users to log in.

local_enable=YES

#

# Uncomment this to enable any form of FTP write command.

write_enable=YES

#

# Default umask for local users is 077. You may wish to change this to 022,

# if your users expect that (022 is used by most other ftpd's)

local_umask=022

#

# Uncomment this to allow the anonymous FTP user to upload files. This only

# has an effect if the above global write enable is activated. Also, you will

# obviously need to create a directory writable by the FTP user.

#anon_upload_enable=YES

#

# Uncomment this if you want the anonymous FTP user to be able to create

# new directories.

#anon_mkdir_write_enable=YES

#

# Activate directory messages - messages given to remote users when they

# go into a certain directory.

dirmessage_enable=YES

#

# Activate logging of uploads/downloads.

xferlog_enable=YES

#

# Make sure PORT transfer connections originate from port 20 (ftp-data).

connect_from_port_20=YES

#

# If you want, you can arrange for uploaded anonymous files to be owned by

# a different user. Note! Using "root" for uploaded files is not

# recommended!

#chown_uploads=YES

#chown_username=whoever

#

# You may override where the log file goes if you like. The default is shown

# below.

#xferlog_file=/var/log/vsftpd.log

#

# If you want, you can have your log file in standard ftpd xferlog format

xferlog_std_format=YES

#

# You may change the default value for timing out an idle session.

#idle_session_timeout=600

#

# You may change the default value for timing out a data connection.

#data_connection_timeout=120

#

# It is recommended that you define on your system a unique user which the

# ftp server can use as a totally isolated and unprivileged user.

#nopriv_user=ftpsecure

#

# Enable this and the server will recognise asynchronous ABOR requests. Not

# recommended for security (the code is non-trivial). Not enabling it,

# however, may confuse older FTP clients.

#async_abor_enable=YES

#

# By default the server will pretend to allow ASCII mode but in fact ignore

# the request. Turn on the below options to have the server actually do ASCII

# mangling on files when in ASCII mode.

# Beware that turning on ascii_download_enable enables malicious remote parties

# to consume your I/O resources, by issuing the command "SIZE /big/file" in

# ASCII mode.

# These ASCII options are split into upload and download because you may wish

# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),

# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be

# on the client anyway..

#ascii_upload_enable=YES

#ascii_download_enable=YES

#

# You may fully customise the login banner string:

#ftpd_banner=Welcome to blah FTP service.

#

# You may specify a file of disallowed anonymous e-mail addresses. Apparently

# useful for combatting certain DoS attacks.

#deny_email_enable=YES

# (default follows)

#banned_email_file=/etc/vsftpd.banned_emails

#

# You may specify an explicit list of local users to chroot() to their home

# directory. If chroot_local_user is YES, then this list becomes a list of

# users to NOT chroot().

#chroot_list_enable=YES

# (default follows)

#chroot_list_file=/etc/vsftpd.chroot_list

#

# You may activate the "-R" option to the builtin ls. This is disabled by

# default to avoid remote users being able to cause excessive I/O on large

# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume

# the presence of the "-R" option, so there is a strong case for enabling it.

#ls_recurse_enable=YES

pam_service_name=vsftpd

userlist_enable=YES

#enable for standalone mode

listen=YES

tcp_wrappers=YES

Answer:

Q13. CORRECT TEXT

One Logical Volume is created named as myvol under vo volume group and is mounted. The Initial Size of that Logical Volume is 124MB. Make successfully that the size of Logical Volume 245MB without losing any data. The size of logical volume 240MB to 255MB will be acceptable.

Answer and Explanation:

1. First check the size of Logical Volume: lvdisplay /dev/vo/myvol

2. Increase the Size of Logical Volume: lvextend -L+121M /dev/vo/myvol

3. Make Available the size on online: resize2fs /dev/vo/myvol

4. Verify the Size of Logical Volume: lvdisplay /dev/vo/myvol

5. Verify that the size comes in online or not: df -h

We can extend the size of logical Volume using the lvextend command. As well as to decrease the size of Logical Volume, use the lvresize command. In LVM v2 we can extend the size of Logical Volume without unmount as well as we can bring the actual size of Logical Volume on online using ext2online command.

Answer:

Q14. CORRECT TEXT

There is a HTTP server 192.168.0.254 and all required packages are dumped in /var/www/html/rhel4 of that server. Install the Redhat Enterprise Linux 5 by creating following partitions:

/ 1000

/boot 200

/home 1000

/var 1000

/usr 4000

swap 2X256 (RAM SIZE)

Answer and Explanation:

Note: Examiner will provide you the Installation startup CD. And here mentioned size may vary see on the exam paper.

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 HTTP 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 Web site name and Redhat Enterprise Linux Directory.

Specify the HTTP Server: 192.168.0.254

Directory: rhel4 à Because Default Directory for http is /var/www/html

8. After Connecting to the HTTP Server Installation start. Go upto 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. 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 be 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.

Answer:

Q15. CORRECT TEXT

Make on /archive directory that only the user owner and group owner member can fully access.

Answer and Explanation:

1. chmod 770 /archive

2. Verify using : ls -ld /archive

Preview should be like:

drwxrwx--- 2 root sysuser 4096 Mar 16 18:08 /archive

To change the permission on directory we use the chmod command. According to the question that only the owner user (root) and group member (sysuser) can fully access the directory so:

chmod 770 /archive

Answer:

START RH302 EXAM