Examcollection has service hotline for you to be able to consult us if you have any kind of question. Our objective is always to make our customers satisfied as well as successful. All of us are so proud of the pass rate we promise you will get the Red Hat RH302 certification without any difficulty. Or perhaps you can get 100% income back from the paying fees.
Q61. CORRECT TEXT
Your LAN is 192.168.0.0/24. Block the telnet connection from outside the LAN.
Answer and Explanation:
1. vi /etc/hosts.deny
in.telnetd:ALL EXCEPT 192.168.0.
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. Here in.telnetd is the telnet server program name.
Q62. CORRECT TEXT
There are more then 400 Computers in your Office. You are appointed as a System Administrator.
But you don't have Router. So, you are going to use your One Linux Server as a Router. How will you enable IP packets forward?
Answer and Explanation:
1. /proc is the virtual filesystem, we use /proc to modify the kernel parameters at running time.
# echo "1" >/proc/sys/net/ipv4/ip_forward
2. /etc/sysctl.conf àwhen System Reboot on next time, /etc/rc.d/rc.sysinit scripts reads the file
/etc/sysctl.conf. To enable the IP forwarding on next reboot also you need to set the parameter.
net.ipv4.ip_forward=1
Here 0 means disable, 1 means enable.
Q63. CORRECT TEXT
There is one partition /dev/hda14 mounted on /data. The owner of /data is root user and root group. And Permission is full to owner user, read and execute to group member and no permission to others. Now you should give the full permission to user user1 without changing pervious permission.
Answer and Explanation:
We know that every files/directories are owned by certain user and group. And Permissions are defines to owner user, owner group and other.
-rwxr-x--- àFull permission to owner user, read and write to owner group and no permission to others.
According to question: We should give the full permission to user user1 without changing the previous permission.
ACL (Access Control List), in ext3 file system we can give permission to certain user and certain group without changing previous permission. But that partition should mount using acl option.
Follow the stepsvi /etc/fstab
/dev/hda14 /data ext3 defaults,acl 0 1Either Reboot or use: mount -o remount /datasetfacl -m
u:user1:rwx /dataVerify using: getfacl /data
Q64. CORRECT TEXT
Quota is implemented on /data but not working properly. Find out the
Problem and implement the quota to user1 to have a soft limit 60 inodes
(files) and hard limit of 70 inodes (files).
Answer and Explanation:
Quotas are used to limit a user's or a group of users' ability to consume disk space. This prevents a small group of users from monopolizing disk capacity and potentially interfering with other users or the entire system. Disk quotas are commonly used by ISPs, by Web hosting companies, on FTP sites, and on corporate file servers to ensure continued availability of their systems.
Without quotas, one or more users can upload files on an FTP server to the point of filling a filesystem. Once the affected partition is full, other users are effectively denied upload access to the disk. This is also a reason to mount different filesystem directories on different partitions. For example, if you only had partitions for your root (/) directory and swap space, someone uploading to your computer could fill up all of the space in your root directory (/). Without at least a little free space in the root directory (/), your system could become unstable or even crash.
You have two ways to set quotas for users. You can limit users by inodes or by kilobyte-sized disk blocks. Every Linux file requires an inode. Therefore, you can limit users by the number of files or by absolute space. You can set up different quotas for different filesystems. For example, you can set different quotas for users on the /home and /tmp directories if they are mounted on their own partitions.
Limits on disk blocks restrict the amount of disk space available to a user on your system. Older versions of Red Hat Linux included LinuxConf, which included a graphical tool to configure quotas.
As of this writing, Red Hat no longer has a graphical quota configuration tool. Today, you can configure quotas on RHEL only through the command line interface.
1. vi /etc/fstab
/dev/hda11 /data ext3 defaults,usrquota 1 2
2. Either Reboot the System or remount the partition.
Mount -o remount /dev/hda11 /data
3. touch /data/aquota.user
4. quotacheck -ufm /data
5. quotaon -u /data
6. edquota -u user1 /data
and Specified the Soft limit and hard limit on opened file.
To verify either quota is working or not:
Soft limit specify the limit to generate warnings to users and hard limit can't cross by the user. Use the quota command or repquota command to monitor the quota information.
Q65. CORRECT TEXT
We are working on /data initially the size is 2GB. The /dev/test0/lvtestvolume is mount on /data.
Now you required more space on /data but you already added all disks belong to physical volume.
You saw that you have unallocated space around 5 GB on your harddisk. Increase the size of lvtestvolume by 5GB.
Answer and Explanation:.
1. Create a partition having size 5 GB and change the syste id '8e'.
2. use partprobe command
3. pvcreate /dev/hda9 à Suppose your partition number is hda9.
4. vgextend test0 /dev/hda9 à vgextend command add the physical disk on volume group.
5. lvextend -L+5120M /dev/test0/lvtestvolume
6. verify using lvdisplay /dev/test0/lvtestvolume.
Q66. 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
Q67. CORRECT TEXT
Some users home directory is shared from your system. Using showmount -e localhost command, the shared directory is not shown. Make access the shared users home directory.
Answer and Explanation:
1. Verify the File whether Shared or not ? : cat /etc/exports
2. Start the nfs service: service nfs start
3. Start the portmap service: service portmap start
4. Make automatically start the nfs service on next reboot: chkconfig nfs on
5. Make automatically start the portmap service on next reboot: chkconfig portmap on
6. Verify either sharing or not: showmount -e localhost
7. Check that default firewall is running on system ? if running flush the iptables using iptables –F and stop the iptables service.
Q68. 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.
Q69. CORRECT TEXT
One New Kernel is released named kernel-hugemem. Kernel is available on ftp://server1.example.com under pub directory for anonymous. Install the Kernel and make previous new kernel is default to boot System.
Answer and Explanation:
1. rpm -ivh ftp://server1.example.com/pub/kernel-hugemem-*
2. vi /etc/grub.conf
Set the default to new kernel
default=0
Example of /etc/grub.conf
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux ES (2.6.9-5.ELhugemem)
root (hd0,0)
kernel /vmlinuz-2.6.9-5.ELhugemem ro root=LABEL=/1 rhgb quiet
initrd /initrd-2.6.9-5.ELhugemem.img
title Red Hat Enterprise Linux ES (2.6.9-5.EL)
root (hd0,0)
kernel /vmlinuz-2.6.9-5.EL ro root=LABEL=/1 rhgb quiet
initrd /initrd-2.6.9-5.EL.img
rpm command is used to install, update and remove the rpm package. -ivh option is install,
verbose, and display the hash mark.
Q70. CORRECT TEXT
Make on /storage directory that only the user owner and group owner member can fully access.
Answer and Explanation:
1. chmod 770 /storage
2. Verify using : ls -ld /storage
Preview should be like:
drwxrwx--- 2 root sysusers 4096 Mar 16 18:08 /storage
To change the permission on directory we use the chmod command. According to the question that only the owner user (root) and group member (sysusers) can fully access the directory so:
chmod 770 /archive