The Problem The ‘root’ entry was removed from /etc/shadow and /etc/passwd. How to recover the deleted root user entry. Solution To be able to recover the deleted root user entry from /etc/shadow and /etc/passwd file, we need to boot the system into single user mode. Follow the steps below to boot the system into single […]
Archives for December 2017
How to recover from deleted root entry in /etc/shadow and/or /etc/passwd files in CentOS / RHEL 6
The Problem The ‘root’ entry was removed from /etc/shadow and /etc/passwd. How to recover the deleted root user entry. Solution To be able to recover the deleted root user entry from /etc/shadow and /etc/passwd file, we need to boot the system into single user mode. Follow the post below to boot the system into single […]
‘ip’ Command cheat sheet (Command Line Reference)
ip command provided by the iproute package is used to adjust addresses, link state, routing tables, neighbour objects, and manage a system’s network components. The ip command is a powerful tool designed to replace many of the old net-tools commands still in use like ifconfig. Below is a command line reference/cheat sheet of the ‘ip’ […]
How to Configure Interface bonding (NIC Teaming) on Oracle Linux 6
This is a short howto post on configuring interface bonding on oracle enterprise Linux 6. The names of the network interfaces have changed in Oracle Linux 6. For example, it starts from em1, so eth0 = em1, eth1 = em2. And For Intel 10 Gb it is p3p1, p3p2, p4p1, p4p2 and so on. The […]
How to install and configure sosreport under CentOS / RHEL
The sosreport tool collects information about a system, such as hardware configuration, installed software packages, configuration, and operational state. This information is stored in a single compressed file in the /var/tmp directory, and the file can be sent to a support representative to assist in troubleshooting a problem. The sosreport tool replaces an earlier version […]
Examples of using tcpdump command for network troubleshooting
The tcpdump utility allows you to capture packets that flow within your network to assist in network troubleshooting. The following are several examples of using tcpdump with different options. Traffic is captured based on a specified filter. A variety of options exist, including: Options Description -D Print a list of network interfaces. -i Specify an […]
How to use netstat command under Linux (Examples included)
The netstat command displays current TCP/IP network connections, routing tables, interface statistics, masquerade connections, and multicast memberships. The ss command provides dump socket statistics but also shows information similar to netstat. A number of command-line options and arguments exist, but netstat by itself displays a list of open sockets. Sockets are the interface between the […]
What are Symbolic Links (Soft Links) and how to create them under Linux
What is a Soft Link – Symbolic links link files and directories located across different file systems. – A symbolic link is a pointer that contains the path name to another file or directory. – The link makes the file or directory easier to access if it has a long path name. – A symbolic […]
Creating and Removing Files and Directories Under Linux
Here is an absolute beginner post on creating and removing Files and Directories under Linux. Creating Files The touch command creates a new empty file. $ touch filename You can create multiple files with the same command. If the file name or directory name already exists, the touch command updates the modification time and access […]
CentOS / RHEL 5 : How to configure Interface bonding (NIC teaming)
Follow the 4 steps below to configure the bonding interface in CentOS/RHEL 5. 1. configure bonding driver. # grep bond0 /etc/modprobe.conf alias bond0 bonding 2. configure under-layer interfaces # cat /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE=eth1 BOOTPROTO=none ONBOOT=yes MASTER=bond0 SLAVE=yes # cat /etc/sysconfig/network-scripts/ifcfg-eth2 DEVICE=eth2 BOOTPROTO=none ONBOOT=yes MASTER=bond0 SLAVE=yes 3. configure bonding interface with bonding parameters: # cat /etc/sysconfig/network-scripts/ifcfg-bond0 DEVICE=bond0 […]