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.
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.
You Completely Install the Redhat Enterprise Linux ES 4 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).
Do These:
1.df –h /tmp /tmp is full remove the unnecessary file
id:5:initdefault:
6.Reboot the System you will get the GUI login Screen.
Your System is going use as a router for 172.24.0.0/16 and 172.25.0.0/16. Enable the IP Forwarding.
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.
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:
Do these Steps:
If account is expired, set net expire date: chage –E “NEVER” root
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.
Who ever creates the files/directories on /archive group owner should be automatically should be the same group owner of /archive.
Answer and Explanation:
1.chmod g+s /archive
2.Verify using: ls -ld /archive
Permission should be like:
drwxrws--- 2 root sysuser 4096 Mar 16 18:08 /archive
If SGID bit is set on directory then who every users creates the files on directory group owner automatically the owner of parent directory.
To set the SGID bit: chmod g+s directory
To Remove the SGID bit: chmod g-s directory
Add a cron schedule to take full backup of /home on every day at 5:30 pm to /dev/st0 device.
Answer and Explanation:
1.vi /var/schedule
30 17 * * * /sbin/dump -0u /dev/st0 /dev/hda7
2.crontab /var/schedule
3.service crond restart
We can add the cron schedule either by specifying the scripts path on /etc/crontab file or by creating on text file on crontab pattern.
cron helps to schedule on recurring events. Pattern of cron is:
MinuteHourDay of MonthMonth Day of WeekCommands
0-590-231-311-120-7 where 0 and 7 means Sunday.
Note * means every. To execute the command on every two minutes */2.
Create the user named eric and deny to interactive login.
Answer and Explanation:
Which shell or program should start at login time is specified in /etc/passwd file. By default Redhat Enterprise Linux assigns the /bin/bash shell to the users. To deny the interactive login, you should write /sbin/nologin or /bin/false instead of login shell.
One Logical Volume named /dev/test0/testvolume1 is created. The initial Size of that disk is 100MB now you required more 200MB. Increase the size of Logical Volume, size should be increase on online.
Answer and Explanation:
1.lvextend –L+200M /dev/test0/testvolume1
Use lvdisplay /dev/test0/testvolume1)
2.ext2online –d /dev/test0/testvolume1
lvextend command is used the increase the size of Logical Volume. Other command lvresize command also here to resize. And to bring increased size on online we use the ext2online command.
Who ever creates the files/directories on /archive group owner should be automatically should be the same group owner of /archive.
Answer and Explanation:
1.chmod g+s /archive
2.Verify using: ls -ld /archive
Permission should be like:
drwxrws--- 2 root sysuser 4096 Mar 16 18:08 /archive
If SGID bit is set on directory then who every users creates the files on directory group owner automatically the owner of parent directory.
To set the SGID bit: chmod g+s directory
To Remove the SGID bit: chmod g-s directory
Make Secondary belongs the both users on sysadmin group.
Answer and Explanation:
1.usermod -G sysadmin john
2.usermod –G sysadmin jane
3.Verify by reading /etc/group file
Using usermod command we can make user belongs to different group. There are two types of group one primary and another is secondary. Primary group can be only one but user can belongs to more than one group as secondary.
usermod -g groupname username To change the primary group of the user
usermod -G groupname username To make user belongs to secondary group.
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 and Explanation:
In the lab server is playing the role of router, IP forwarding is enabled. Just set the Correct IP and gateway, you can ping to 172.25.254.254.
Create the partition having 100MB size and mount it on /mnt/neo
Answer and Explanation:
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 4 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. How will make successfully ping to 192.168.1.0/24 Network’s Host?
Answer and Explanation:
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
2.service network restart
Your System is configured in 192.168.0.0/24 Network and your nameserver is 192.168.0.254. Make successfully resolve to server1.example.com.
Answer and Explanation:
Very Easy question, nameserver is specified in question,
1.vi /etc/resolv.conf
nameserver 192.168.0.254
2.host server1.example.com
Make Successfully Resolve to server1.example.com where DNS Server is 192.168.0.254.
Answer and Explanation: 1. vi /etc/resolv.conf
Write : nameserver 192.168.0.254
Your system is giving error while booting on Runlevel 5 . Make successfully boot your system in runlevel 5.
Answer and Explanation: While you load the X Window System, you will get the problem. To troubleshoot follow the following steps:
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.
id:5:initdefault:
Create the group named training
Answer and Explanation:
To create a group we use the groupadd command.
Verify from: cat /etc/group whether group added or not?
Create the user named jackie, curtin, david
Answer and Explanation:
1.useradd jackie
2.useradd curtin
3. useradd david
useradd command is used to create the user. All user’s information stores in /etc/passwd and user;s shadow password stores in /etc/shadow.
One New Kernel is released named kernel-.2.6.19-11. Kernel is available on ftp://server1.example.com/pub/updates directory for anonymous. Install the Kernel and make the kernel-2.6.18-8 default.
Answer and Explanation:
1.rpm -ivh ftp://server1.example.com/pub/updates/kernel-2.6.19-11.i686.rpm
2.vi /etc/grub.conf
default=1 Change this value to 1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux ES (2.6.19-11)
root (hd0,0)
kernel /vmlinuz-2.6.19-11.EL ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.19-11.EL.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=/ rhgb quiet
initrd /initrd-2.6.9-5.EL.img
According question that kernel is available to anonymous user. You can directly install from the ftp server using rpm command.
When you install the kernel, it will write on /etc/grub.conf file. You can set the default kernel by changing the default value. See on the output of /etc/grub.conf file that new kernel is on first title so it’s index is 0 and previous kernel’s index is 1.
Create the user named jane and john.
Answer and Explanation:
1.useradd jane
2.useradd john
useradd command is used to create the user. All user’s information stores in /etc/passwd and user;s shadow password stores in /etc/shadow.
Backup of the Redhat Enterprise Linux 5 is on /var/ftp/pub, /var/www/html/pub on server named server1.example.com. You can install all required packages using yum by creating the repository file.
Answer and Explanation:
1. Create the repository file
#vi /etc/yum.repos.d/server1.repo
[station?]
name=station?
baseurl=ftp://server1.example.com/pub/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
# yum install
Create the user named user1, user2, user3
Answer and Explanation:
We create the user using useradd command and we change the password of user using passwd command. If you want to set the blank password use: passwd -d username.
Create the group named sysuser.
Answer and Explanation:
1.groupadd sysuser
groupadd command is used to create the group and all group information is stored in /etc/group file.
Make user1, user2 and user3 belongs to training group.
Answer and Explanation:
There are two types of group, I) primary group II) Secondary or supplementary group.
Here user1, user2 and user3 belong as supplementary to training group. So these users get the permission of group member.
Make Secondary belongs the jeff and marion users on sysusers group. But harold user should not belongs to sysusers group.
Answer and Explanation:
1.usermod -G sysusers jeff
2.usermod –G sysuser marion
3.Verify by reading /etc/group file
Using usermod command we can make user belongs to different group. There are two types of group one primary and another is secondary. Primary group can be only one but user can belongs to more than one group as secondary.
usermod -g groupname username To change the primary group of the user
usermod -G groupname username To make user belongs to secondary group.
Make Secondary belongs the jackie and curtin users on sysuser group. But david user should not belongs to sysuser group.
Answer and Explanation:
1.usermod -G sysuser jackie
2.usermod –G sysuser curtin
3.Verify by reading /etc/group file
Using usermod command we can make user belongs to different group. There are two types of group one primary and another is secondary. Primary group can be only one but user can belongs to more than one group as secondary.
usermod -g groupname username To change the primary group of the user
usermod -G groupname username To make user belongs to secondary group.
Add a job on Cron schedule to display Hello World on every two Seconds in terminal 8.
Answer and Explanation:
1.cat >schedule
*/2 * * * * /bin/echo “Hello World” >/dev/tty8
Cron helps to schedule on recurring events. Pattern of Cron is:
MinuteHourDay of MonthMonth Day of WeekCommands
0-590-231-311-120-7 where 0 and 7 means Sunday.
Note * means every. To execute the command on every two minutes */2.
To add the scheduled file on cron job: crontab filename
To List the Cron Shedule: crontab –l
To Edit the Schedule: crontab –e
To Remove the Schedule: crontab –r
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.
You will get: drwxrwx—T
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
There are three Disk Partitions /dev/hda8, /dev/hda9, /dev/hda10 having size 100MB of each partition. Create a Logical Volume named testvolume1 and testvolume2 having a size 250MB. Mount each Logical Volume on lvmtest1, lvmtest2 directory.
Answer and Explanation:
Steps of Creating LVM:
1.pvcreate /dev/hda8 /dev/hda9 /dev/hda10
pvdisplay command is used to display the information of physical volume.
2.vgceate test0 /dev/hda8 /dev/hda9 /dev/hda10
vgdisplay command is used to display the information of Volume Group.
3.lvcreate –L 250M –n testvolume1 test0
lvdisplay command is used to display the information of Logical Volume.
4.lvcreate –L 250M –n testvolume2 test0
5.mkfs –t ext3 /dev/test0/testvolume1
6.mkfs –t ext3 /dev/test0/testvolume2
7.mkdir /lvtest1
8.mkdir /lvtest2
9.mount /dev/test0/testvolume1 /lvtest1
10.mount /dev/test0/testvolume2 /lvtest2
11.vi /etc/fstab
/dev/test0/testvolume2/lvtest2ext3defaults0 0
/dev/test0/testvolume1/lvtest1ext3defaults0 0
To create the LVM( Logical Volume Manager) we required the disks having ‘8e’ Linux LVM type. First we should create the physical Volume, then we can create the Volume group from disks belongs to physical Volume. lvcreate command is used to create the logical volume on volume group. We can specify the size of logical volume with –L option and name with -n option.
Fill up the Form through http://server1.example.com/form.php
Answer and Explanation:
1.Open the Browser and type the above URL.
2.Fill the form as required all information.
One New Kernel is released named kernel-.2.6.9-11. Kernel is available on ftp://server1.example.com/pub/updates directory for anonymous. Install the Kernel and make the kernel-2.6.9-5 default.
Answer and Explanation:
1.rpm -ivh ftp://server1.example.com/pub/updates/kernel-2.6.9-11.i686.rpm
2.vi /etc/grub.conf
default=1 Change this value to 1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux ES (2.6.9-11)
root (hd0,0)
kernel /vmlinuz-2.6.9-11.EL ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.9-11.EL.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=/ rhgb quiet
initrd /initrd-2.6.9-5.EL.img
According question that kernel is available to anonymous user. You can directly install from the ftp server using rpm command.
When you install the kernel, it will write on /etc/grub.conf file. You can set the default kernel by changing the default value. See on the output of /etc/grub.conf file that new kernel is on first title so it’s index is 0 and previous kernel’s index is 1.
Create the directory /archive and group owner should be the sysuser group.
Answer and Explanation:
1.chgrp sysuser /archive
2.Verify using ls -ld /archive command. You should get like
drwxr-x--- 2 root sysadmin 4096 Mar 16 17:59 /archive
chgrp command is used to change the group ownership of particular files or directory.
Another way you can use the chown command.
chown root:sysuser /archive
Add a user named user4 and make primarily belongs to training group. As well account should expire on 30 days from today.
Answer and Explanation:
example: usermod -e “12 Feb 2006” user4
Verify: chage –l user4
/data Directory is shared from the server1.example.com server. Mount the shared directory that:
Answer and Explanation:
/mnt/etc/auto.misc--timeout=50
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.
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
/home1028
/boot 512
/var 1028
/usr2048
Swap->1.5 of RAM Size
/documentconfigure 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.
Create a RAID Device /dev/md0 by creating equal two disks from available free space on your harddisk and mount it on /data.
Answer and Explanation:
Redhat Enterprise Linux 5 Supports the RAID LEVEL 0, RAID LEVEL 1, RAID LEVEL 5 and RAID LEVEL 6 at installation time. You can create it at installation time later no need to type lots of commands for RAID.
At Installation Time:
viii.Click on ok
After Installation: We can create the RAID Device after Installation on command-line.
/dev/md0/dataext3defaults0 0