Linux Microsoft VMware

Thursday, September 27, 2012

Sudo Full Practical Session


Introduction


Before we proceed, it would be best to cover some basic user administration topics that will be very useful in later chapters. Adding Users

One of the most important activities in administering a Linux box is the addition of users. Here you'll find some simple examples to provide a foundation for future chapters. It is not intended to be comprehensive, but is a good memory refresher. You can use the command man useradd to get the help pages on adding users with the useradd command or the man usermod to become more familiar with modifying users with the usermod command.

Wednesday, September 26, 2012

Using chkconfig to Start Daemons at Each runlevel


As stated earlier, the chkconfig command can be used to adjust which applications start at each runlevel. You can use this command with the --list switch to get a full listing of packages listed in /etc/init.d and the runlevels at which they will be on or off:

Basic's of Networking



1. Define Network?
A network is a set of devices connected by physical media links. A network is recursively is a connection of two or more nodes by a physical link or two or more networks connected by one or more nodes.

2. What is a Link?
At the lowest level, a network can consist of two or more computers directly connected by some physical medium such as coaxial cable or optical fiber. Such a physical medium is called as Link.

3. What is a node?
A network can consist of two or more computers directly connected by some physical medium such as coaxial cable or optical fiber. Such a physical medium is called as Links and the computer it connects is called as Nodes.

Friday, September 21, 2012

Linux / Unix Commands For Connecting To The Serial Console


Most embedded Linux / BSD systems such as routers, servers and nas devices comes with console interface (serial port with RS-232). BIOS can use this, and after boot BIOS screen I/O is redirected so that you can use the device. RS-232 is also used for communicating to headless server, where no monitor or keyboard is installed, during boot when operating system is not running yet and therefore no network connection is possible. You need to use a serial cable between your computer and embedded system or server. In this post I will cover five common utilities used for serial communication under Linux / Unix / *BSD and Mac OS X.

How To Check and Use Serial Ports Under Linux


How do I check and configure serial ports under Linux for various purposes such as modem, connecting null modems or connect a dumb terminal?

Linux offers various tools. Linux uses ttySx for a serial port device name. For example, COM1 (DOS/Windows name) is ttyS0, COM2 is ttyS1 and so on.

Task: Display Detected System's Serial Support

Simple run dmesg command

Tuesday, September 18, 2012

Troubleshooting Disk and Data store Related Issues  SHOOT:2


SHOOT: 2

VMFS Lock Volume is Corrupted

Details

You may observe the following events within the /var/log/vmkernel logs within your VMware ESX host:
Volume 4976b16c-bd394790-6fd8-00215aaf0626 (san-lun-100) may be damaged on disk. Corrupt lock detected at offset 0

Note: In this example 4976b16c-bd394790-6fd8-00215aaf0626 represents the UUID of the VMFS datastore and san-lun-100 represents the name of the VMFS datastore.
You may observe the following events within the /var/log/vmkernel logs within your VMware ESX host:
Resource cluster metadata corruption detected Volume 4976b16c-bd394790-6fd8-00215aaf0626 (san-lun-100) may be damaged on disk.

Troubleshooting Disk and Data store Related Issues  SHOOT:1


SHOOT: 1

Troubleshooting a VMFS resource volume that is corrupted

The event indicates the reported VMFS volume is corrupted.

Example

If 4976b16c-bd394790-6fd8-00215aaf0626 represents the UUID and san-lun-100 represents the associated volume label, you see:
For Event: vmfs.lock.corruptondisk

Wednesday, September 12, 2012

Allow A Normal User To Run Commands As root Under Linux / UNIX Operating Systems


From my mail bag:
I would like to run few commands such as stop or start web server as a root user. How do I allow a normal user to run these commands as root?
You need to use the sudo command which is use to execute a command as another user. It allows a permitted user to execute a command as the superuser or another user, as specified in the /etc/sudoers (config file that defines or list of who can run what) file. The sudo command allows users to do tasks on a Linux system as another user.

Wednesday, September 5, 2012

Shell Script To Encrypt Any Given Text File


In cryptography, encryption is the process of transforming information (referred to as plaintext) using an algorithm (called cipher) to make it unreadable to anyone except those possessing special knowledge, usually referred to as a key.
Mcrypt is a simple crypting program, a replacement for the old unix crypt. When encrypting or decrypting a file, a new file is created with the extension .nc and mode 0600. The new file keeps the modification date of the original. The original file may be deleted by specifying the -u parameter. If no files are specified, the standard input is encrypted to the standard output.

Shell Script List All Top IP Address Accessing Apache Web Server


********************************
#!/bin/bash
# Shell Script To List All Top Hitting IP Address to your webserver.
# This may be useful to catch spammers and scrappers.

# where to store final report?
DEST=/var/www/reports/ips

Powered by Blogger.