Change the root Password to redtophat
Answer and Explanation:
Boot the system in Single user mode
Use the passwd command
Your System is going use as a router for 172.24.0.0/16 and 172.25.0.0/16. Enable the IP Forwarding.
echo “1” >/proc/sys/net/ipv4/ip_forward
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.
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:
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
service syslog restart
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.
You are giving RHCT Exam and in your Exam paper there is a question written, make successfully ping to 192.168.0.254.
Answer and Explanation:
In Network problem think to check:
IP Configuration: use ifconfig command either IP is assigned to interface or not?
Default Gateway is set or not?
Hostname is set or not?
Routing problem is there?
Device Driver Module is loaded or not?
Device is activated or not?
Check In this way:
use ifconfig command and identify which IP is assigned or not.
cat /etc/sysconfig/networkWhat, What is written here. Actually here are these parameters.
NETWORKING=yes or no
GATEWAY=x.x.x.x
HOSTNAME=?
NISDOMAIN=?
Correct the file
Use netconfig command
Either Select Automatically from DHCP or assign the static IP
Use service network restart or start command
Now try to ping it will work.
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).
/tmp is full or not
Quota is already reached
Video 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 file
quota usernameif 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-displayIt 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.
Successfully resolv to server1.example.com where your DNS server is 172.24.254.254
Answer and Explanation:
vi /etc/resolv.conf
nameserver 172.24.254.254
host server1.example.com
On every clients, DNS server is specified in /etc/resolv.conf. When you request by name it tries to resolv from DNS server .
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 password to redhat and login in default Runlevel.
Answer and Explanation:
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.
Restart the System.
You will get the boot loader GRUB screen.
Press a and type 1 or s for single mode
ro root=LABEL=/ rhgb queit s
System will boot on Single User mode.
Use passwd command to change.
Press ctrl+d
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:
Is password correct?
Is account expired?
Is terminal Blocked?
Do these Steps:
Boot the System on Single user mode.
Change the password
Check the account expire date by using chage –l root command.
If account is expired, set net expire date: chage –E “NEVER” root
Check the file /etc/securettyWhich file blocked to root login from certain terminal.
If terminal is deleted or commented write new or uncomment.
Reboot the system and login as a root.
Make a swap partition having 100MB. Make Automatically Usable at System Boot Time.
Answer and Explanation:
1.Use fdisk /dev/hda To create new partition.
Type nFor New partition
It will ask for Logical or Primary Partitions. Press l for logical.
It will ask for the Starting Cylinder: Use the Default by pressing Enter Key.
Type the Size: +100MYou can Specify either Last cylinder of Size here.
Press P to verify the partitions lists and remember the partitions name. Default System ID is 83 that means Linux Native.
Type t to change the System ID of partition.
Type Partition Number
Type 82 that means Linux Swap.
Press w to write on partitions table.
Either Reboot or use partprobe command.
mkswap /dev/hda?To create Swap File system on partition.
swapon /dev/hda?To enable the Swap space from partition.
free –mVerify Either Swap is enabled or not.
vi /etc/fstab
/dev/hda? swapswapdefaults 0 0
Reboot the System and verify that swap is automatically enabled or not.