Want to know Testking 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 Validated Red Hat RH302 answers to Updated RH302 questions at Testking. 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.
Q31. CORRECT TEXT
You are working as a Network Engineer. Due to system processing, you want to limit the number of process to users. If then, configure that user1 and user2 should get one login at a time and all the members of training group can get total 5 logins.
Answer and Explanation:
1. vi /etc/security/limits.conf
user1,user2 - maxlogins 1
@training - maxlogins 5
2. vi /etc/pam.d/system-auth
session required /lib/security/pam_limits.so
To limit the number of process or number of logins, we should configure on /etc/security/limits.conf. First Columns contains the username separated by comma or @group name. Second column either hard or soft limits. Third columns called the item, maxloigns or nproc etc.
To identify the session of users we should call the pam_limits module in /etc/pam.d/system-auth.
Q32. 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.
Q33. CORRECT TEXT
Install the Cron Schedule for david 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 david 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
Q34. CORRECT TEXT
/data directory on linux server should make available on windows system that eric 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 eric
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.
Q35. CORRECT TEXT
Make sure on /data that only the owner user can remove files/directories.
Answer and Explanation:
By default user1 can remove user2's files due to directory permission to group member. We can prevent of deleting files from others users using Sticky Bits.chmod o+t /dataVerify /data: ls –ld /data
You will get: drwxrwx-T
Q36. CORRECT TEXT
Make user1, user2 and user3 belongs to training group.
Answer and Explanation:
7. usermod -G training user1
8. usermod -G training user2
9. usermod -G training user3
10. Verify from : cat /etc/group
There are two types of group, I) primary group II) Secondary or supplementary group.
I) Primary Group: Primary group defines the files/directories and process owner group there can be only one primary group of one user.
II) Secondary Group is used for permission. Where permission are defined for group members, user can access by belonging to that group.
Here user1, user2 and user3 belong as supplementary to training group. So these users get the permission of group member.
Q37. CORRECT TEXT
/data Directory is shared from the server1.example.com server. Mount the shared directory that:
a. when user try to access, automatically should mount
b. when user doesn't use mounted directory should unmount automatically after 50 seconds.
c. Shared directory should mount on /mnt/data on your machine.
Answer and Explanation:
1. vi /etc/auto.master
/mnt /etc/auto.misc --timeout=50
2. vi /etc/auto.misc
3. data -rw,soft,intr server1.example.com:/data
4. service autofs restart
5. 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.
Q38. CORRECT TEXT
One Package named zsh is dump on ftp://server1.example.com under /pub/updates directory and your FTP server is 192.168.0.254. Install the package zsh.
Answer and Explanation:
1. rpm -ivh ftp://server1/example.com/pub/updates/zsh-*
or
1. Login to ftp server : ftp ftp://server1.example.com using anonymous user.
2. Change the directory: cd pub and cd updates
3. Download the package: mget zsh-*
4. Quit from the ftp prompt : bye
5. Install the package
6. rpm -ivh zsh-*
7. Verify either package is installed or not : rpm -q zsh
Q39. CORRECT TEXT
One Domain RHCE is configured in your lab, your domain server is server1.example.com. nisuser2001, nisuser2002, nisuser2003 user are created on your server 192.168.0.254:/rhome/stationx/nisuser2001. Make sure that when NISuser login in your system
automatically mount the home directory. Home directory is separately shared on server /rhome/stationx/ where x is your Station number.
Answer and Explanation:
1. use the authconfig --nisserver=<NIS SERVER> --nisdomain=<NIS DOMAIN> --update
Example: # authconfig --nisserver=192.168.0.254 --nisdomain=RHCE --update
or system-config-authentication
2. Click on Enable NIS
3. Type the NIS Domain: RHCE
4. Type Server 192.168.0.254 then click on next and ok
5. You will get a ok message.
6. Create a Directory /rhome/stationx where x is your station number.
6. vi /etc/auto.master and write at the end of file
/rhome/stationx /etc/auto.home --timeout=60
7. vi /etc/auto.home and write
* -rw,soft,intr 192.168.0.254:/rhome/stationx/&
Note: please specify your station number in the place of x.
8. Service autofs restart
9. Login as the nisuser2001 or nisuser2002 on another terminal will be Success.
According to question, RHCE domain is already configured. We have to make a client of RHCE domain and automatically mount the home directory on your system. To make a member of domain, we use the authconfig with option 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 used the /etc/auto.master file. On /etc/auto.master file we specified the mount point the configuration file for mount point.
Q40. 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. ext2online -d /dev/vg0/lv1 à to bring extended size online.
5. Again Verify using lvdisplay and df -h command.
Q41. CORRECT TEXT
Allow the NFS service only to example.com, trusted.cracker.org
Answer and Explanation:
1. vi /etc/hosts.deny
nfs,portmap:ALL EXCEPT .example.com, trusted.cracker.org
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.
Q42. CORRECT TEXT
One Package named zsh is dump on ftp://server1.example.com under pub directory. Install the package from ftp server.
Answer and Explanation:
1. rpm -ivh ftp://server1.example.com/pub/zsh-*
2. Package will install
rpm command is used to install, update and remove the package, -i means install, -v means verbose and -h means display the hash mark.
Q43. CORRECT TEXT
Boot your System Successfully on run level 3.
Answer and Explanation:
After completing the Boot loader problem, you will boot the system, but it goes to emergency mode. Remember that if System boots on Emergency mode that means file system problem.
You will get the Shell, remount the / filesystem with read and write mode.
1. First Find out the / filesystem using e2lable /dev/hda1, e2lable /dev/hda2 etc
2. mount -o remount,defaults /dev/hda? /
3. vi /etc/fstab
You will get like:
/root / ext3 defaults 1 1
or / /root ext3 defaults 1 1
4. Edit the file like:
/ / ext3 defaults 1 1
5. Configure the /etc/grub.conf file if just booting system by editing grub from grub prompt.
6. Reboot the system.
Q44. CORRECT TEXT
Make on /data that only the user owner and group owner member can fully access.
Answer and Explanation:
1. chmod 770 /data
2. Verify using : ls -ld /data
Preview should be like:
drwxrwx--- 2 root sysadmin 4096 Mar 16 18:08 /data
To change the permission on directory we use the chmod command. According to the question that only the owner user (root) and group member (sysadmin) can fully access the directory so:
chmod 770 /data
Q45. CORRECT TEXT
You have a domain in your LAN named example.com and cracker.org. Allow the
- Allow the FTP connection only from local domain.
- Deny the FTP connection from cracker.org
Answer and Explanation:
1. vi /etc/hosts.deny
vsftpd:ALL EXCEPT .example.com
or
1. vi /etc/hosts.deny
vsftpd:ALL
2. vi /etc/hosts.allow
vsftpd:.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.