redhat trainings day11.ppt
TRANSCRIPT
-
8/21/2019 RedHat Trainings Day11.ppt
1/36
RH133
Red Hat Enterprise Linux
System Administration
Welcome!
-
8/21/2019 RedHat Trainings Day11.ppt
2/36
2
Object ives Day 11
Troubleshooting Understanding Troubleshooting Troubleshooting Procedures
Common Troubleshooting Problems and Solutions
X Windows Problems Booting Problems User Management Problems Basic Network Related Problems
Using Rescue Environment FromCD-ROMNFS, FTP, HTTP Servers
Using Run Level 1 Using Syslogs to Solve Problems
-
8/21/2019 RedHat Trainings Day11.ppt
3/36
3
Understanding Troubleshooting
-
8/21/2019 RedHat Trainings Day11.ppt
4/36
4
What is Troubleshooting?
Troubleshooting help you to diagnose and solve technical problems that are
occurring with your computer.
The process of Troubleshooting is both science and art.
The science comes from the concepts of hypothesis testing,
experimentation, comparison and reproducing results.
The science always to focus on likely causes
The art of troubleshooting comes from realization that operating
system, services and applications do not always work as we hope
or anticipate, or even as their creators hops or anticipate.
The art permits us consider the off-the wall and unlikely as
possibilities
-
8/21/2019 RedHat Trainings Day11.ppt
5/36
5
Golden Rules
Two troubleshooting golden rules:
Prioritize problems according to severity
Spend reasonable amount of time on each problem given its
priority
Try to solve root of problem
Always start from very basic step first
Avoid missing underlying cause
Justify why a certain solution is successful
-
8/21/2019 RedHat Trainings Day11.ppt
6/36
6
Troubleshooting Categories
Two categories of problems:
Hardware-related
Software-related
-
8/21/2019 RedHat Trainings Day11.ppt
7/367
Troubleshooting Procedures
-
8/21/2019 RedHat Trainings Day11.ppt
8/368
-
8/21/2019 RedHat Trainings Day11.ppt
9/36
9
Common Troubleshooting
Problems and Solutions
-
8/21/2019 RedHat Trainings Day11.ppt
10/36
10
X Windows Problems and Solutions
Problems
Unable to load Desktop
Monitor Resolution
Mouse Problem
Hangs While loading Desktop
Solutions
system-config-display
Is xfs is running
[ Try to start service permanently using chkconfig]
Is gpm is running
[ Try to start service permanently using chkconfig] Is /home or /tmp is full
Is user reached a hard quota limit
Is hostname resolved properly
-
8/21/2019 RedHat Trainings Day11.ppt
11/36
11
Booting Problems
Problems
1. Kernel does not load at all, or loads partially before a panicoccurs
2. Kernel loads completely, but panic or fails when it tries tomount filesystem and run /sbin/init
3. No bootloader splash screen or prompt appears
4. Kernel loads completely, and /etc/rc.d/rc.sysinit is started andinterrupted
5. Run Level errors
6. System coming up in emergency mode, asking root
password for maintenance.
-
8/21/2019 RedHat Trainings Day11.ppt
12/36
12
Booting Problems
Solutions
Problem 1
GRUB is misconfigured
Boot Sector is corrupt
Bad BIOS settings Problem 2
Corrupt kernel
Incorrect Parameters passed to the kernel by the bootloader
Problem 3
Bootloader is misconfigured
/sbin/init is corrupted or /etc/inittab is misconfigured
Root filesystem is damaged and unmountable
-
8/21/2019 RedHat Trainings Day11.ppt
13/36
13
Booting Problems
Solutions
Problem 4
/bin/bash is missing or corrupted
/etc/fstab may have an error
Error in RAID or QUOTA specifications Problem 5
/etc/inittab is misconfigured
Service-specific error
Misconfigured X or related services in run level 5
Problem 6
Problem with /etc/fstab file check for labels, using e2labelcommand.
Remount the partitions using
mounto remount, defaults /dev/sda2 /
Press CTRL+D for saving.
-
8/21/2019 RedHat Trainings Day11.ppt
14/36
14
User Management Problems
Problems
Unable to Login
Forgot password
Solutions
User is using nologin shell in /etc/passwd User account is locked
User account is expired, issue chageE NEVER root
User is having no password, use passwd for new password
Change users password [ using runlevel 1 if roots password]
Check for any /etc/nologin file / folder, if found, delete them. Check for permissions on /tmp directory, it should be
rwxrwxrwt, if not, issuechmod 1777 /tmp
Check /etc/pam.d/login file for optional words.
Check /etc/securetty for permissions (600) and #
-
8/21/2019 RedHat Trainings Day11.ppt
15/36
15
Basic Network Related Problems
Problems
Unable to ping to other network
Unable to resolve host name
Network Interface is not up
Unable to display IP-Address Solutions
Use neat / neat-tui command
Enter valid entries for DNS server
Enter valid entries for DHCP server [ If required ]
Enter valid entries for Default Gateway Try to UP Ethernet Interface using ifup command
-
8/21/2019 RedHat Trainings Day11.ppt
16/36
16
Using Rescue Environment
-
8/21/2019 RedHat Trainings Day11.ppt
17/36
17
Rescue Environment From
CD-ROM
NFS Server
FTP Server
HTTP Server
-
8/21/2019 RedHat Trainings Day11.ppt
18/36
18
Steps
CD-ROM
Boot from first RHEL installation CD
Type linux rescue at boot prompt
NFS, FTP and HTTP Server
Boot from first RHEL installation CD Type linux rescue askmethod at boot prompt
[ Note :- use only linux rescuewith using BOOT.ISO disk ]
-
8/21/2019 RedHat Trainings Day11.ppt
19/36
19
Additional Boot Options
-
8/21/2019 RedHat Trainings Day11.ppt
20/36
20
Boot Time Command Arguments
askmethod
This command asks you to select the installation method you would like to
use when booting from the Red Hat Linux CD-ROM.
dd
This argument causes the installation program to prompt you to use a driver
diskette.
driverdisk
This command performs the same function as the dd command and also
prompts you to use a driver diskette during the installation of Red Hat Linux.
expert
This command turns on the following special features:
allows partitioning of removable media
prompts for driver diskette
-
8/21/2019 RedHat Trainings Day11.ppt
21/36
21
lowres
This command forces the graphical (GUI) installation program to run at
a lower resolution (640x480).
resolution=
Tells the installation program which video mode to run. It accepts any
standard resolution, such as 640x480, 800x600, 1024x768, and so on.
textThis command disables the graphical installation program and forces
the installation program to run in text mode.
-
8/21/2019 RedHat Trainings Day11.ppt
22/36
22
Using Syslogs to Solve Problems
-
8/21/2019 RedHat Trainings Day11.ppt
23/36
23
Important Log Files
/var/log/dmesg : Kernel log messages
/var/log/messages : Standard system error messages
/var/log/secure : Security, authentication, and xinetd messages
-
8/21/2019 RedHat Trainings Day11.ppt
24/36
24
Disabling Command Line Access
1. Setting the disable_command_line gconf key
Set the /desktop/gnome/lockdown/disable_command_line key by using GConf editor
2. Disabling Console Switching
/etc/X11/xorg.conf.
Section "Serverflags"
Option "DontVTSwitch" "yes"
EndSection
3. Removing the Open Terminal menu i tem from the desktop backgrou nd menu
gconf-editor -- unsetting the /apps/nautilus/preferences/show_desktop key.
-
8/21/2019 RedHat Trainings Day11.ppt
25/36
25
NIC Bonding
The Linux bonding provides a method for aggregating multiple networkinterfaces into a single logical bonded interface. The behavior of thebonded interfaces depends upon the mode;
Hot standby
Load balancing services.
Additionally, link integrity monitoring may be performed.
-
8/21/2019 RedHat Trainings Day11.ppt
26/36
26
Step-1: Create bond0 configuration file
vi /etc/sysconfig/network-scripts/ifcfg-bond0
Append following lines to it:
DEVICE=bond0
IPADDR=192.168.1.20NETWORK=192.168.1.0
NETMASK=255.255.255.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
-
8/21/2019 RedHat Trainings Day11.ppt
27/36
27
Step-2: Modify ifcfg-eth0 file
vi /etc/sysconfig/network-scripts/ifcfg-eth0
Modify/append directive as follows:
DEVICE=eth0
USERCTL=noONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
-
8/21/2019 RedHat Trainings Day11.ppt
28/36
28
Step-3: Modify ifcfg-eth1 file
vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
USERCTL=no
ONBOOT=yesMASTER=bond0
SLAVE=yes
BOOTPROTO=none
-
8/21/2019 RedHat Trainings Day11.ppt
29/36
29
Step-4: Load bond driver/module
vi /etc/modprobe.conf
alias bond0 bonding
options bond0 mode=balance-alb miimon=100
-
8/21/2019 RedHat Trainings Day11.ppt
30/36
30
Step-5: Test configuration
Load the bonding module
# modprobe bonding
Restart the service
service network restart
Verify
less /proc/net/bonding/bond0
ifconfig
-
8/21/2019 RedHat Trainings Day11.ppt
31/36
31
Restricting users to their home Use rbash i.e. restricted bash shell. A restricted shell is used to set up an
environment more controlled than the standard shell. It behaves identically to bashwith the exception that the following are disallowed or not performed:
Changing directories with cd
Setting or unsetting the values of SHELL, PATH, ENV, or BASH_ENV
Specifying command names containing /
Specifying a file name containing a / as an argument to the . builtin command Specifying a filename containing a slash as an argument to the -p option to the hash
builtin command
Importing function definitions from the shell environment at startup
Parsing the value of SHELLOPTS from the shell environment at startup
Redirecting output using the >, >|, , >&, &>, and >> redirection operators
Using the exec builtin command to replace the shell with another command
Adding or deleting builtin commands with the -f and -d options to the enable builtincommand
Using the enable builtin command to enable disabled shell builtins
Specifying the -p option to the command builtin command
Turning off restricted mode with set +r or set +o restricted.
-
8/21/2019 RedHat Trainings Day11.ppt
32/36
32
Restricting users to their home
Open /etc/passwd file and setup shell to /bin/rbash
vi /etc/passwd
For example here is a sample entry for user aryan:
aryan:x:500:501::/home/aryan:/bin/rbash
-
8/21/2019 RedHat Trainings Day11.ppt
33/36
?
Questions
-
8/21/2019 RedHat Trainings Day11.ppt
34/36
What have we learnt ?
TroubleshootingUnderstanding TroubleshootingTroubleshooting Procedures
Common Troubleshooting Problems and Solutions
X Windows ProblemsBooting ProblemsUser Management ProblemsBasic Network Related Problems
Using Rescue Environment FromCD-ROMNFS, FTP, HTTP Servers
Using Run Level 1Using Syslogs to Solve Problems
-
8/21/2019 RedHat Trainings Day11.ppt
35/36
?
Questions
Day 11 Complete
-
8/21/2019 RedHat Trainings Day11.ppt
36/36
Thank You !!!