Automatic logout of inactive sessions in Linux and UNIX

To setup automatic logout of the inactive sessions in UNIX and Linux,
Set the TMOUT variable in /etc/bash.bashrc.local and /etc/profile.local


For Example:


TMOUT=<TIme in minutes>

TMOUT=0  is to set infinite time out or disable the automatic logout


To set this time out setting for a particular user:

Add Virtual Interfaces in Linux - Quick HOWTO

Add Virtual Interfaces in Linux - Quick HOWTO       


To add a virtual interface in Linux, Type the following command in your Linux Terminal 
Command: 


ifconfig <VIRTUAL_INTERFACE_DEVICE> <IP_ADDRESS> netmask <SUBNET_MASK> up 


For example, 


ifconfig eth0:1 192.168.1.6 netmask 255.255.255.0 up This will create a new 


virtual interface named eth0:1 and assigns the IP Address 192.168.1.6 to that 


To Make this Virtual Interface Permenant


Object Data Manager (ODM) in AIX - Quick Overview

Object Data Manager (ODM)

What is ODM?


ODM
  • Maintains system config, device and vital product data
  • Provide a more robust, secure and sharable resource
  • Provide a reliable object oriented database facility
Data Managed By ODM
  • Device Configuration Information
  • Software Vital Product Data
  • SRC information
  • Communications configuration data
  • Menus and commands for SMIT

Change Network speed in AIX

To change the Network Card (NIC) speed in AIX, follow the steps given below.


# ifconfig en0 down detach


# chdev -l ent0 -a media_speed=......




# ifconfig en0 up


You are done. 

AIX NIM Quick HOWTO Guide

To list all the mksysb resources
# lsnim -t mksysb
# lsnim -t spot


To list all the machines
# lsnim -t standalone
        OR
# lsnim -c machines


To reset the NIM status of system host-10

System dump in AIX

If a kernel panic occures, a dump will be invoked automatically in AIX. The followings are dumped during the dump process.
  1. List of currently running processes and related information about the process

Backup and Recovery in AIX






Backup rootvg using mksysb command. 
Backup and restore other volume groups using savevg and restvg commands. 
Restore files backed-up using restore commands

View AIX Boot and Console Logs

 Boot and console messages can be used to identify and fix problems. These messages are automatically stored on disk by AIX. To view the stored messages, use the alog command. 

For example,

Nessus vulnerability and Port scanner

The Nessus® vulnerability scanner is the leader in active scanners, featuring high-speed discovery, configuration auditing, asset profiling, sensitive data discovery and vulnerability analysis of your security posture. 

Nessus scanners can be distributed throughout an entire enterprise, inside DMZs and across physically separate networks.

Features:
 1. Vulnerability Scanner
 2. Port Scanner
 3. Host and Device detection

Logrotate in Linux - Quick HOWTO

1.About Log rotate

The logrotate program is a log file manager. It is used to regularly cycle (or rotate) log files by removing the oldest ones from your system and creating new log files. It may be used to rotate based on the age of the file or the file’s size, and usually runs automatically through the cron utility. .

  • It is installed by default on Linux
  • Runs as daily cron job and the cron script located in /etc/cron.daily directory
  • Configuration file is /etc/logrotate.conf
  • While installing RPM’s, the applications put log rotation configuration in /etc/logrotate.d/ for its specific application logs. Log rotate daemon scans this directory for specific configuration files for specific application/service logs rotation method

Free Open Source Linux Systems Management Software - Spacewalk

Spacewalk is an open source Linux systems management solution. It is the community project for Red Hat Network Satellite


It is free and Open source..


What Spacewalk can do for you?
  • Inventory your Linux servers (hardware and software information)
  • Install and update software and patches on your Linux systems
  • Collect and distribute your custom software packages into manageable groups
  • Provision (kickstart) your Linux systems
  • Manage and deploy configuration files to your Linux systems
  • Monitor your systems
  • Provision virtual guests
  • Start/stop/configure virtual guests
  • Distribute content across multiple geographical sites in an efficient manner
Spacewalk manages software content updates for Red Hat derived distributions such as

Change shell limits of User in Linux

Switch to particular user from root account and type the following to see current limits of that user


ulimit -a  -- show all limits
ulimit -u  -- Max User files
ulimit -s  -- Stack Size
ulimit -i   -- Pending signals
ulimit -p  -- Max process allowed



Edit /etc/security/limits.conf and add soft and hard limit for user shell limits:


To change the "soft" and "hard" limits for the maximum number of

Expand Virtual disk (VMDK) in VMware


How to Grow a virtual disk in a VMWare virtual machine

A VMDK file can be grown while no virtual machine is using it. Growing the VMDK only makes the virtual harddrive bigger - filesystem within the VMDK must still to be grown with other methods. 

On ESX Server:
          vmkfstools -X <newsize>Gb  filename.vmdk
On ESX 3.5, you can also edit the VM settings and edit the harddrive when the VM is not running.

Note:  On ESX the filename.vmdk file is just a  file containing metainformation and "filename-flat.vmdk" is the actual data file. 

However, vmkfstools operations are used on the metafile

Xen Virtualization - Installation & Configuration HOWTO


Installing and Configuring Xen
Xen is a server virtualisation solution that works on the principle of Paravirtualisation. 
Paravirtualization requires modifying the operating system to run on Xen. Paravirtualized operating systems "know" that they are virtualized. 
This is achieved by modifying the kernel. Xen is a virtual machine hypervisor.
Xen Hypervisor Requirements

  • A pre-existing Linux or BSD installation as kernel needs to be modified, preferably something running Kernel 2.6 and having Grub as bootloader.
  • x86-compatible system with at least 256MB RAM. More is better.
  • 5GB of spare disk space additional to the disk space you need to install your favorite distribution.
  • Hardware based Xen virtualisation requires Intel VT or AMD-V ( Pacifica ) Processor. To check for Intel VT support look for the 'vmx' flag, or for AMD-V support check for 'svm' flag.
Checking if the processor supports hardware virtualisation.
For Intel
cat /proc/cpuinfo|grep vmx
For AMD
cat /proc/cpuinfo|grep vmx
Installing Xen
There are 3 ways of installing Xen. But installing using yum is the fastest and easiest option. Following are the 3 methods by which Xen can be installed.

Repair corrupt RPM Database


Sometimes RPM databases become corrupt. You will no longer be able to install/upgrade/remove programs using YUM or RPM command. Even RPM quey simply gets hung. 
This is the case when you need to repair RPM databases. To repair do the following:

cp -rp /var/lib/rpm{,`data +%F`.bk}

This command is to take a backup of  ' /var/lib/rpm' directory

rm -f /var/lib/rpm/__db*

This command clears the RPM database. Then enter the following command,

Clear page file in XP/Windows 7 at shutdown (pagefile.sys)


To save on RAM, Windows uses your Page File as a sort of cache. 
Clearing the Windows paging file (Pagefile.sys) during the shutdown process, so that no unsecured data is contained in the paging file when the shutdown process is complete. 

Note: If you enable this feature, the shutdown time may be increased.


To Clear the page file in windows XP and Windows 7 during shutdown of PC,
Click Start --> Run --> Type "regedit"
This will explore Windows registry editor. Navigate the following registry key.