Wednesday 30 November 2016

Some basic network protocols


  • Ethernet - Provides for transport of information between physical locations on Ethernet cable.                    Data is passed in Ethernet packet.
  • SLIP - Serial line IP (SLIP), a form of data encapsulation for serial lines.
  • PPP -   Point to point protocol (PPP). A form of serial line data encapsulation that is an improvement   over SLIP.
  • IP -     Internet Protocol (IP). Except for ARP and RARP all protocols' data packets will be packaged into an IP data packet. Provides the mechanism to use software to address and manage data packets being sent to computers.
  • ICMP - Internet control message protocol (ICMP) provides management and error reporting to help manage the process of sending data between computers.
  • ARP - Address resolution protocol (ARP) enables the packaging of IP data into Ethernet packages. It is the system and messaging protocol that is used to find the Ethernet (hardware) address from a specific IP number. Without this protocol, the Ethernet package could not be generated from the IP package, because the Ethernet address could not be determined.
  • TCP - A reliable connection oriented protocol used to control the management of application level services between computers.
  • UDP - An unreliable connection less protocol used to control the management of application level services between computers.
  • DNS - Domain Name Service, allows the network to determine IP addresses from names and vice versa.
  • RARP - Reverse address resolution protocol (RARP) is used to allow a computer without a local permanent data storage media to determine its IP address from its ethernet address.
  • BOOTP - Bootstrap protocol is used to assign an IP address to diskless computers and tell it what server and file to load which will provide it with an operating system.
  • DHCP - Dynamic host configuration protocol (DHCP) is a method of assigning and controlling the IP addresses of computers on a given network. It is a server based service that automatically assigns IP numbers when a computer boots. This way the IP address of a computer does not need to be assigned manually. This makes changing networks easier to manage. DHCP can perform all the functions of BOOTP.
  • IGMP - Internet Group Management Protocol used to support multicasting.
  • SNMP - Simple Network Management Protocol (SNMP). Used to manage all types of network elements based on various data sent and received.
  • RIP - Routing Information Protocol (RIP), used to dynamically update router tables on WANs or the internet.
  • OSPF - Open Shortest Path First (OSPF) dynamic routing protocol.
  • BGP - Border Gateway Protocol (BGP). A dynamic router protocol to communicate between routers on different systems.
  • CIDR - Classless Interdomain Routing (CIDR).
  • FTP - File Transfer Protocol (FTP). Allows file transfer between two computers with login required.
  • TFTP - Trivial File Transfer Protocol (TFTP). Allows file transfer between two computers with no login required. It is limited, and is intended for diskless stations.
  • SMTP - Simple Mail Transfer Protocol (SMTP).
  • NFS - Network File System (NFS). A protocol that allows UNIX and Linux systems remotely mount each other's file systems.
  • Telnet - A method of opening a user session on a remote host.
  • Ping - A program that uses ICMP to send diagnostic messages to other computers to tell if they are reachable over the network.
  • Rlogin - Remote login between UNIX hosts. This is outdated and is replaced by Telnet.
  • WIFI/WIMAX Protocols
  • Bluetooth protocol
  • Fibre Channel network protocols
  • Internet Protocol Suite or TCP/IP model or TCP/IP stack
  • OSI protocols family of information exchange standards developed jointly by the ISO and the ITU-T
  • Routing protocols
  • List of IP protocol numbers, protocol numbers used in the Protocol field of the IPv4 header and the Next Header field of IPv6 header
  • Yahoo! Messenger, underlying protocol used by the Yahoo messenger
  • RTPS protocol, an interoperability protocol
  • SSH       Secure Shell
  • SMB      Server Message Block, one version of which was also known as CIFS (Common Internet File System)
  • FTP           File Transfer Protocol
  • SMTP       Simple Mail Transfer Protocol
  • TCP          Transmission Control Protocol
  • Telnet        Telephone Network
  • HTTP        Hyper Text Transfer Protocol
  • HTTPs      Secure Hyper Text Transfer Protocol
  • POP          Post Office Protocol
  • HTCPCP  Hyper Text Coffee Pot Control Protocol
  • MTP         Media Transfer Protocol
  • SFTP        Secure File Transfer Protocol
  • SSL          Secure Socket Layer
  • TLS          Transport Layer Security
  • E6             Ethernet globalization protocols
  • NTP          Network time protocol
  • PPP           Point to Point Protocol
  • NNTP       Network News Transfer Protocol
  • QOTD      Quote Of The Day
  • IMAP        Internet Message Access Protocol
  • Bitcoin Protocol   Protocol for Bitcoin transactions and transfers on the web

Monday 21 November 2016

KERNEL_DATA_INPAGE_ERROR Blue Screen of Death



Error Name: KERNEL_DATA_INPAGE_ERROR
STOP Code: 0x0000007a
The KERNEL_DATA_INPAGE_ERROR Blue Screen of Death occurs whenever Windows has trouble reading something kept in the memory properly. This can apply to both kinds of memory: stored memory on your hard drive, but also dynamic memory in your RAM, which is usually what technicians refer to as “memory”.

Fortunately, this one has two very simple solutions, and if they don’t work, you simply have defective hardware. The solutions are below, but first, I’ll give you a few screenshots of what this error should look like.

This error as seen in Windows 8.

This error as seen in older versions of Windows.
The first possible solution is that your hard drive is the one causing the problem. To check if your hard drive is causing the issue in Windows XP, Vista or 7 , open a Windows Search (Windows Key + F), and type in ‘chkdsk’. Execute it — you can’t run a disk check while actively using Windows, but you can schedule it to start automatically the next time your computer is turned on. Wrap up what you need to and reboot — the disk check process can take a very long time, especially on large and/or slow hard drives. Watch some TV, play a game, take a nap … whatever you want to pass the time.

To do this in Windows 8 open Windows search (Windows Key + F) and then type ‘cmd’. Right click on the Command Prompt and choose “Run as Administrator” from the bar at the bottom of the screen. You will need to provide administrator authentication and then the Command Prompt windows will come up. Type the command “chkdsk C: /f /r /x” where ‘C:’ is the letter of the drive you wish to examine or repair. This is most commonly drive “C:” but it may be different in your case.

When the disk check is finished, your computer will automatically reboot. The disk check will fix any problems it encounters in your hard drive — and it likely will encounter some, even if they aren’t the cause of this particular error.

The second possible solution is that your RAM is causing the problem. RAM stands for Random Access Memory, and Windows makes constant usage of it to keep multiple applications running and keep tabs on important system data. To check if one of your RAM sticks is causing the problem, open another Windows Search and type in Memory Diagnostics Tool. What follows is similar to the disk check process — you can restart immediately to check your memory or you can schedule it for the next time your computer is on. Save what you need to and run the Memory Diagnostic.

After both of these processes are finished, you should be able to determine what’s causing the problem. If the Memory Diagnostic doesn’t flag any problems with your RAM, then your hard drive is the culprit. If, however, it does find issues, it means you have defective RAM that needs to be removed or replaced.
If using a laptop — or you simply don’t know how to replace RAM — call your manufacturer or a technician to help you from here. You’ve done your part.

Friday 18 November 2016

HOW TO RECOVER FORGOTTEN ROOT PASSWORD ON REDHAT/CENTOS



Posted by Admin   on Friday, November 18, 2016


In this Artical we are going to learn how to recover forgotten root password.
As a Linux Administrator some time we face challenges when some how we forgot the root password and without root access we can't do any kind of administrative task's in Linux.But luckily there is a easy way to recover the forgotten password.
So let's have look at the step's to recover the root password.
STEP 1 >>

Restart the system and press any key to interrupt the normal boot process to use the menu before it enters in to the Operating System.
After interrupt the normal boot process system will allow us to use the menu to edit the grub so that we can recover the root password.

As we can see the system is allowing us to edit the menu by press "e". So press "e" to go toward next step.

Note :- If you have protected your GRUB by password then it will ask to press "p" to enter the password to unlock the GRUB and then it will allow to edit the menu by pressing "e".
STEP 2 >>

After the main menu now we moved to a new page where we have to edit the kernel argument by pressing "e", As we can see in the snapshot above the Kernel argument is there on second line.

Note : -We can move the cursor by UP and Down arrow on the keyboard.
So select the second line as selected above on the snapshot and press "e" to edit the kernel argument.

As we can see after edit the kernel argument we are able to make changes in the line.

STEP 3 >>

So remove the rhgb quiet type single as shown in the snapshot above and then press ENTER.

After make changes the line would look like this as shown in the snapshot above.
Now as shown on the snapshot above select the kernel line and press "b" to boot Operating System in a Single User Mode.
Now it will take to the shell prompt.
STEP 4 >>
At shell prompt just type below command to reset the password.
$  passwd root    # To reset the root password
Output :

So this is how we can recover the root password.


HOW TO CONFIGURE VNC SERVER IN RHEL/CENTOS/FEDORA



VNC is also known as ( Virtual Network Computing) is a great tool for Graphical Desktop Sharing which allows you to take remote of Linux operating systems using VNC client tool i.e. VNC Viewer, Also you can take remote of Linux Systems from Windows Operating System using same VNC viewer client tool but windows verison (VNC Viewer.exe). It uses Remote Frame Buffer Protocol to remotely control another Computer. VNC is works like Remote Desktop Connections (MSTSC).

Not only in Linux, VNC is available for all known Operating Systems like MAC OS X, Microsoft Windows. The Different variations VNC are Real VNC, Tight VNC, Ultra VNC and so on...

The VNC contains Server and Client end applications, to take control the system desktop remotely, Where in Linux Server-End package includes vnc-server and from client it's VNC Viewer (Available for all OS like Windows, Linux....etc...) OR we can take web based remote from client end by URL "http://VNC-Server-IP-Address:Port-Number".

Ports are used by VNC Server :

a. 5801 - Used to Client Connection over HTTP
b. 5901 - Used to Client connection over RFB (Remote Frame Buffer Protocol)
c. 6001 - Used to X-Application Connectivity.

So let's have a look at Configuration part of VNC Server and VNC Client.

VNC SERVER SIDE CONFIGURATION

STEP 1 : GNOME Desktop Installation >>
   [root@localhost ~]# yum -y groupinstall "X Window System" "Desktop"

STEP 2 : VNC-Server Package Installation >>

Packages Required :

vnc-server.xxx.xxx.rpm

Before Package installation we can check if it's already installed or not by below command.
  
[root@localhost ~]# rpm -qa | grep vnc   # Check if vnc package is installed or not
By-Default the vnc-server package is installed on system but if it's not there then we can install the packages in two ways :

Installation by .rpm Package for Example :
rpm -ivh <Package Name>
 
[root@localhost packages]# rpm -ivh vnc-server-4.1.2-14.el5_3.1.i386.rpm
   Preparing...                ########################################### [100%]
1:vnc-server             ########################################### [100%]
[root@localhost packages]#

Note : You can get the vnc-server-4.1.2-14.el5_3.1.i386.rpm Package from Redhat/CentOS Installation media.
Install by yum Package Manager :
yum -y install <Package Name>
   [root@localhost packages]# yum -y install vnc-server
  
   Loaded plugins: fastestmirror
   Loading mirror speeds from cached hostfile
    * addons: mirrors.vonline.vn
    * base: mirrors.vonline.vn
    * epel: epel.mirror.net.in
    * extras: centos.mirror.net.in
    * updates: centos.mirror.net.in
   Setting up Install Process
   Resolving Dependencies
   --> Running transaction check
   ---> Package vnc-server.i386 0:4.1.2-14.el5_6.6 set to be updated
   --> Finished Dependency Resolution

   Dependencies Resolved

   ================================================================================
    Package            Arch         Version                     Repository    Size
   ================================================================================
   Installing:
    vnc-server         i386         4.1.2-14.el5_6.6            base         2.0 M

   Transaction Summary
   ================================================================================
   Install       1 Package(s)
   Upgrade       0 Package(s)

   Total download size: 2.0 M
   Downloading Packages:
   vnc-server-4.1.2-14.el5_6.6.i386.rpm                     | 2.0 MB     00:17    
   Running rpm_check_debug
   Running Transaction Test
   Finished Transaction Test
   Transaction Test Succeeded
   Running Transaction
     Installing     : vnc-server                                               1/1

   Installed:
     vnc-server.i386 0:4.1.2-14.el5_6.6                                           

   Complete!
   [root@localhost packages]#
STEP 3 : Set the Password for Users for Authentication >>

We need Username and Password for authentication while taking remote from client side, so let's create a password for user root using command vncpasswd.
After run the command it will ask to enter password twice, So enter the same password twice to set the password for VNC remote connection as shown below.
   [root@localhost ~]# vncpasswd
   Password:
   Verify:
   [root@localhost ~]#
Above password will be used while taking remote of  the VNC Server.

Here we set the password for the user root as shown on the output above, but if you want you can create your own username and can be used to take remote of vnc server.

Let's take an Example :

First create a user and set password for that as shown below :
   [root@localhost ~]# useradd elinuxbook
   [root@localhost ~]# passwd elinuxbook
   Changing password for user elinuxbook.
   New UNIX password:

   Retype new UNIX password:

   passwd: all authentication tokens updated successfully.
   [root@localhost ~]#
Now switch to above created user and create password for VNC Remote Authentication using command vncpasswd as shown below :
   [root@localhost ~]# su - elinuxbook
   [elinuxbook@localhost ~]$ vncpasswd elinuxbook
   Password:
   Verify:
   [elinuxbook@localhost ~]$
Note : Keep in mind that above created password for user elinuxbook using command vncpasswd will be used as a VNC remote authentication.

The passwords we have created in above steps using command vncpasswd for user "root" "elinuxbook" are stored in a file "/home/elinuxbook/.vnc/passwd" which is located at home directory of the user.

Note : .vnc is a hidden directory which can be shown by command ls -a as shown below :
   [elinuxbook@localhost .vnc]$ cd
   [elinuxbook@localhost ~]$ ls -a
   .   .bash_history  .bash_profile  elinuxbook  .viminfo
   ..  .bash_logout   .bashrc        .mozilla    .vnc
   [elinuxbook@localhost ~]$ cd .vnc
   [elinuxbook@localhost .vnc]$ ls
   passwd
   [elinuxbook@localhost .vnc]$
As shown on above output the directory .vnc (Highlighted in color Yellow is a hidden directory) and the passwd file is highlighted by Orange color.

STEP 4 : Configure main Configuration File of VNC Server >>

The main configuration file of VNC Server is located at "/etc/sysconfig/vncservers" which is we need to configure to adding users, So follow the below steps.

Edit the 
/etc/sysconfig/vncservers Configuration file do the required changed as shown below.
   # Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.

   # Use "-nohttpd" to prevent web-based VNC clients connecting.

   # Use "-localhost" to prevent remote VNC clients connecting except when
   # doing so through a secure tunnel.  See the "-via" option in the
   # `man vncviewer' manual page.

   # VNCSERVERS="2:myusername"
   # VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"

   VNCSERVERS="1:root"
   VNCSERVERARGS[1]="-geometry 800x600"
As shown on output above just edit the /etc/sysconfig/vncservers file and add the hilighted lines by yellow color to your bottom of your configuration file.

Note : replace your username with root and replace the grometry as per your need.

We can mention multiple users as shown below :
   # Use "-nolisten tcp" to prevent X connections to your VNC server via TCP.

   # Use "-nohttpd" to prevent web-based VNC clients connecting.

   # Use "-localhost" to prevent remote VNC clients connecting except when
   # doing so through a secure tunnel.  See the "-via" option in the
   # `man vncviewer' manual page.

   # VNCSERVERS="2:myusername"
   # VNCSERVERARGS[2]="-geometry 800x600 -nolisten tcp -nohttpd -localhost"

   VNCSERVERS="1:root 2:elinuxbook"
   VNCSERVERARGS[1]="-geometry 800x600"
   VNCSERVERARGS[2]="-geometry 800x600"
Now start the VNC Service by below command :
   [root@localhost ~]# /etc/init.d/vncserver start
  
   Starting VNC server: 1:root
   New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1

   Creating default startup script /root/.vnc/xstartup
   Starting applications specified in /root/.vnc/xstartup
   Log file is /root/.vnc/localhost.localdomain:1.log

   2:elinuxbook xauth:  /tmp/.gdmUJKWQY not writable, changes will be ignored

   New 'localhost.localdomain:2 (elinuxbook)' desktop is localhost.localdomain:2

   Creating default startup script /home/elinuxbook/.vnc/xstartup
   Starting applications specified in /home/elinuxbook/.vnc/xstartup
   Log file is /home/elinuxbook/.vnc/localhost.localdomain:2.log
 
                                                              [  OK  ]
   [root@localhost ~]#