Red Red Red Red Hat Hat Hat Hat RH302 RH302 RH302 RH302
Red Red Red Red Hat Hat Hat Hat RH302 RH302 RH302 RH302
Version : Demo
1. Change the root Password to redtophat
Answer:
2. Dig Server1.example.com, Resolve to successfully through DNS Where DNS server is 172.24.254.254
Answer:
# dig server1.example.com
#host server1.example.com DNS is the Domain Name System, which maintains a database that can help
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,
Answer:
3.It will ask for Logical or Primary Partitions. Press l for logical.
4:It will ask for the Starting Cylinder: Use the Default by pressing Enter Key.
5.Type the Size: +100M-> You can Specify either Last cylinder of Size here.
6.Press P to verify the partitions lists and remember the partitions name.
7.Press w to write on partitions table.
10.Or
12.mkdir /mnt/neo
13.vi /etc/fstab
14.Write:
4. Your System is going use as a router for 172.24.0.0/16 and 172.25.0.0/16. Enable the IP Forwarding.
Answer:
2.vi /etc/sysctl.conf net.ipv4.ip_forward=1 /proc is the virtual filesystem, containing the information about
the running kernel. To change the parameter of running kernel you should modify on /proc. From Next
reboot the system, kernel will take the value from /etc/sysctl.conf.
5. 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:
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. neo user tried by: dd if=/dev/zero of=/home/neo/somefile bs=1024 count=70 files created successfully.
Again neo tried to create file having 70K using following command: dd if=/dev/zero of=/home/neo/somefile
bs=1024 count=70 But he is unable to create the file. Make the user can create the file less then 70K.
Answer:
Very Tricky question from redhat. Actually question is giving scenario to you to implement quota to neo user.
You should apply the quota to neo user on /home that neo user shouldn't occupied space more than 70K.
1.vi /etc/fstab LABEL=/home /home ext3 defaults,usrquota 0 0 To enable the quota on filesystem you
should mount the filesystem with usrquota for user quota and grpquota for group quota.
3.mount -o remount /home-> Remounting the /home with updated mount options. You can verify that /home
/dev/mapper/vo-myvol 2 30 70 1 0 0
Can you set the hard limit 70 and soft limit as you think like 30.
7. 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:
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
8. 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:
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 kilobytesized
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
1.vi /etc/fstab
3.touch /data/aquota.user
5.quotaon -u /data
and Specified the Soft limit and hard limit on opened file.
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.
9. 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
Answer:
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 equalRH302 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.
10. Create one partitions having size 100MB and mount it on /data.
Answer:
4. It will ask for the Starting Cylinder: Use the Default by pressing Enter Key.
5. Type the Size: +100M ->You can Specify either Last cylinder of Size here.
6. Press P to verify the partitions lists and remember the partitions name.
Or
10. vi /etc/fstab
Write:
11. You are new System Administrator and from now you are going to handle the system and your main
task is Network monitoring, Backup and Restore. But you don't know the root password. Change the root
Answer:
When you Boot the System, it starts on default Runlevel specified in /etc/inittab:
Id:?:initdefault:
When System Successfully boot, it will ask for username and password. But you don't
know the root's password. To change the root password you need to boot the system into
single user mode. You can pass the kernel arguments from the boot loader.
6.Press ctrl+d
12. 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:
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.
13. 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:
2.quota username if quota is already reached remove unnecessary file from home directory.
3.Boot the System in runlevel 3. you can pass the Kernel Argument from boot loader.
4.Use command: system-config-display It will display a dialog to configure the monitor, Video card,
resolution etc.
6.Reboot the System you will get the GUI login Screen.
14. There are two different networks, 192.168.0.0/24 and 192.168.1.0/24. Your System is in 192.168.0.0/24
Network. One RHEL 5 Installed System is going to use as a Router. All required configuration is already
done on Linux Server. Where 192.168.0.254 and 192.168.1.254 IP Address are assigned on that Server.
Answer:
1. vi /etc/sysconfig/network
GATEWAY=192.168.0.254 OR vi /etc/sysconf/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.0.?
NETMASK=255.255.255.0
GATEWAY=192.168.0.254
Explanation: Gateway defines the way to exit the packets. According to question System working as a
router for two networks have IP Address 192.168.0.254 and 192.168.1.254. To get the hosts on
15. Make a swap partition having 100MB. Make Automatically Usable at System Boot Time.
Answer:
3.It will ask for Logical or Primary Partitions. Press l for logical.
4.It will ask for the Starting Cylinder: Use the Default by pressing Enter Key.
5.Type the Size: +100M ->You can Specify either Last cylinder of Size here.
6.Press P to verify the partitions lists and remember the partitions name. Default System ID is 83 that
16:Reboot the System and verify that swap is automatically enabled or not.
16. 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
Answer:
By Default system accept the logs only generated from local host. To accept the Log
enables logging from remote machines -x disables DNS lookups on messages recieved with -r 2. service
syslog restart
17. 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
Answer:
Check 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.
18. You are giving RHCT Exam and in your Exam paper there is a question written, make successfully ping
to 192.168.0.254.
Answer:
2. cat /etc/sysconfig/network What, What is written here. Actually here are these
parameters.
NETWORKING=yes or no
GATEWAY=x.x.x.x
HOSTNAME=?
NISDOMAIN=?
GATEWAY=x.x.x.x
Answer:
1. hostname station?.example.com This will set the host name only for current session. To set hostname
permanently.
20. The System you are using is for NFS (Network File Services). Some important data are shared from
your system. Make automatically start the nfs and portmap services at boot time.
Answer:
Answer and Explanation: We can control the services for current session and for next boot time also. For
current Session, we use service servicename start or restart or stop or status. For automatically on next
reboot time:
1.chkconfig servicename on or off eg: chkconfig nfs on chkconfig portmap on or ntsysv Select the nfs and
portmap services.
2.Reboot the system and identify whether services are running or not.
21. 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:
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 steps
22. There are two different networks 192.168.0.0/24 and 192.168.1.0/24. Where 192.168.0.254 and
192.168.1.254 IP Address are assigned on Server. Verify your network settings by pinging 192.168.1.0/24
Network's Host.
Answer:
1.vi /etc/sysconfing/network
NETWORKING=yes
HOSTNAME=station?.example.com
GATEWAY=192.168.0.254
IPADDR=X.X.X.X
NETMASK=X.X.X.X
GATEWAY=192.168.0.254
2. ifdown eth0
3. ifup eth0
23. Your system is giving error while booting on Runlevel 5 . Make successfully boot your system in runlevel
5.
Answer:
While you load the X Window System, you will get the problem. To troubleshoot follow the following steps:
24. Your System is configured in 192.168.0.0/24 Network and your nameserver is 192.168.0.254. Make
Answer:
2. host server1.example.com
Explanation: DNS is the Domain Name System, which maintains a database that can help your computer
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
25. One Package named zsh is dump on ftp://server1.example.com under /pub/updates directory and your
26. Add a new logical partition having size 100MB and create the /data which will be the mount point for the
new partition.
Answer:
4. It will ask for the Starting Cylinder: Use the Default by pressing Enter Key.
5. Type the Size: +100M ->You can Specify either Last cylinder of Size here.
6. Press P to verify the partitions lists and remember the partitions name.
10. Or
12. vi /etc/fstab
13. Write:
27. There is a server having 172.24.254.254 and 172.25.254.254. Your System lies on 172.24.0.0/16. Make
successfully ping to 172.25.254.254 by Assigning following IP: 172.24.0.x Where x is your station number.
Answer:
IPADDR=x.x.x.x
NETMASK=x.x.x.x
2. Enter the IP Address as given station number by your examiner: example: 172.24.0.1
5. press on ok
6. ifdown eth0
7. ifup eth0
8. verify using ifconfig In the lab server is playing the role of router, IP forwarding is enabled. Just set the
Answer:
Explanation: DNS is the Domain Name System, which maintains a database that can help your computer
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. #host server1.example.com
Answer:
Explanation: DNS is the Domain Name System, which maintains a database that can help your computer
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
30. One Logical Volume is created named as myvol under vo volume group and is mounted. The Initial Size
of that Logical Volume is 400MB. Make successfully that the size of Logical Volume 200MB without losing
any data. The size of logical volume 200MB to 210MB will be acceptable.
Answer:
Answer and Explanation: 1.First check the size of Logical Volume: lvdisplay /dev/vo/myvol
2.Make sure that the filesystem is in a consistent state before reducing: # fsck -f /dev/vo/myvol
4.It is now possible to reduce the logical volume. #lvreduce /dev/vo/myvol -L 200M