Restoring a Corrupted Registry using Linux Live CD

By shankar

To run the following commands, you must either use a Boot CD that will give you read/write access to the Windows partition, or put your drive into a working system and run these commands on your Windows Partition from that system. Note that the Windows

Show Hidden Files&Folders, If disabled by virus

By shankar

Method 1:


Go to registry editor by running regedit in the run box.Go to this key: 


HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced

Favorite Folder on Windows Explorer

By shankar

Right Click the windows explorer going through Accossroies and select the shortcuts tab,


C:\windows\explorer.exe /n,/e,x:\favorute folder

SAP Logon INI File Installation on windows

By shankar

If we manually install the SAP 710,we need to configure the settings on by hand.
Step: 1
Before start doing changes, we need to copy the”SAPLOGON.ini” file to “c:\windows\” ,



1. Open the SAP logon to confirm that the environment variable was setup during installation.

Create a Vista password reset disk using a USB flash drive

By shankar

Creating a password reset disk Follow these steps to create a password reset disk:
1. Insert your USB flash drive and wait for it to initialize and receive a drive letter.

SAP 4.7 Installation Steps

By shankar

SAP4.7 Installation On Server 2003
SAP 4.7 INSTALLATION GUIDE
1. CREATE C PARTITION 6GB AND D PARTITION 70GB. INSTALL O.S SERVER.
SET SYSTEM YEAR TO 2011 OR Later
2. CREATE LOOP BACK ADAPTER. 

START→ SETTINGS→ CONTROL PANEL ADD OR REMOVE HARDWARE→ NEXT→ NEXT→ SELECT ADD ANEW DEVICE NEXT SELECT WANT TO SELECT THE HARDWARESELECT NETWORK ADAPTER SELECT MICROSOFT NEXT NEXT FINISH.


Don't display the last user who logged in

By shankar

Windows Vista is designed so that when you press Ctrl+Alt+Delete to log in, it will display the name of the user who logged in most recently. This can be a bit of a problem if multiple users share a common PC. They may forget to check to see who was logged in previously and key

Relocate your offline files

By shankar

When you use Vista's Offline Files feature, the offline file cache is automatically placed on your C: drive. But my laptop has two hard drives in it, and I wanted to configure Vista to place my offline files onto my secondary hard drive. I accomplished the task by following these steps:

Delay Windows Activation

By shankar

Typically, when an organization deploys Vista, it will create a master image, run SYSPREP, and deploy the image. But it might be a while between the time that SYSPREP is run and when Vista is actually deployed. Microsoft will allow you to extend the activation period by

Eliminate cached logons

By shankar

Windows is designed to allow users to log on using cached logins if no domain controller is available to authenticate the request. If you want to make sure that a login request is always authenticated by a domain controller, you could change the number of cached logons that

Change the name of the registered user

By shankar

When you install Windows, you're prompted to enter a username and a company name. But since it's fairly common for companies to merge, you may want to change the name of the company Windows is registered to by using this hack:

Increase the maximum number of downloads

By shankar

I'm constantly downloading files. Sometimes I need to download a lot of files, and Windows' limit on the number of files that can be downloaded simultaneously gets in the way. If you're in the same problem, you can tweak the registry so

Disable the Autorun on Windows

By shankar

Its a bit annoying to insert a CD and have Windows open it Internet Explorer and display a bunch of information. I would rather just be able to navigate through the disc's file system and go directly to what I need. Fortunately, it's easy to create a registry setting that disables Auto Play:

Quick HOWTO : IPTables in Linux

By Parthiban Ponnusamy

Features:
 1. Firewall for Linux
 2. Interface to Netfilter, which is loaded by the kernel

Squid Proxy Caching server Installation and Configuration in Linux

By Parthiban Ponnusamy

Below are the steps to setup the Squid Proxy Caching server on Red Hat Enterprise Linux

1. Install Required Packages for Proxy Server:
   
    Install the  "squid-2.5.STABLE14-1.4E"  RPM packages on the server

Notes : Services Management in AIX (System Resource Controller)

By Parthiban Ponnusamy

srcmstr daemon controls all the other services or daemons in AIX.. 


lssrc -a              To list the status of all subsystems


lssrc -s nfsd        To list the status of the subsystem nfsd

Video Tutorial : How to Install Webmin in Fedora 10

By Parthiban Ponnusamy

Video Tutorial for Webmin installation in Linux..


Tips : Webmin in Linux

By Parthiban Ponnusamy

Webmin is a great to tool which provides GUI Web interface for all most all the tasks in Linux/Unix.


For more info,

Video Tutorial : Set up a secure virtual host in Apache Webserver

By Parthiban Ponnusamy

Hope this video tutorial is useful...


Video Tutorial : Install squid server on fedora

By Parthiban Ponnusamy

Hope this tutorial is useful...


Notes : Some Useful Notes for AIX Admins

By Parthiban Ponnusamy

To Check Maintenance level,
oslevel -s
instfix -i | grep ML


Check for disk mirroring,

Quick HOWTO : Device (Hardware) Management in AIX

By Parthiban Ponnusamy

A Quick HOWTO reference on AIX device management Commands.


Install devices for attached peripherals  cfgmgr –v

The above command scan for Hardware changes and

Quick HOWTO : AIX Software/Patch Management

By Parthiban Ponnusamy







Here is the quick HOWTO for AIX Software management..

Install Software  -  installp -a
Uninstall software - installp -u

Quick HOWTO : NFS (Network File system) Setup in Linux

By Parthiban Ponnusamy

Friends, Here is the Quick HOWTO again.. Hope this post is useful for quick reference


Points to Note:
 1. NFS is transparent access to remote file systems
 2. It is Installed by default
 3. Uses RPC for communications


Steps:
 1. Export a directory on the server using: /etc/exports


Entry something like this,
  a. /path_to_directory     IP_ADDR(rw)  


[example :  /nfs1          192.168.75.110(rw) ]
               
  c. mkdir /nfs1
  d. start NFS server - 'service nfs start'
  e. Confirm export(s) - 'exportfs -v'


Note: NFS matches remote user's UID to local /etc/passwd to determine ACLs


Now login to remote machine and do following.


 3. Mount exports on a remote system
  a. mount -t nfs REMOTE MACHINE IP:SHARE_NAME   LOCAL_MOUNT_POINT


 [ Example:  mount -t nfs 192.168.75.199:/nfs2 /nfs2 ]


 4. Allow local 'root' user the ability to write to /nfs1 export
  a. /etc/exports: (rw,no_root_squash)


 5. Setup mount points so that they're available upon reboot in /etc/fstab


Unmount and confirm that NFS mount points will be available when the client system changes runlevels (reboots, starts, etc.) - 'mount -a'




showmount -a 192.168.75.199 - shows mounts on this system (connected NFS clients)


 6. Attempt to mount /nfs1 from an unauthorized system

  • Fails because client's IP does not match server's /etc/exports
  • Update server's /etc/exports to allow additional hosts/subnet/etc.
  • exportfs -a - to update the export table



Quick HOWTO : Kernel Upgrade in Linux

By Parthiban Ponnusamy

Here is the Quick HOWTO Steps to upgrade the Kernel in Linux..


 Steps:
 1. Update the kernel
  a. use 'uname -a' to reveal current version
  b. use 'rpm -qa | grep -i kernel' - to reveal installed version
  c. cat /etc/grub.conf -> /boot/grub/grub.conf - "" ""

 2. Proper installation method is as follows:
  a. 'rpm -ivh kernel*rpm' - install a separate version

Note: Install the following kernel packages if necessary:
  a. kernel-devel* - if module compilation is necessary
  b. kernel-headers* - if recompilation is necessary


Install:
  a. rpm -ivh kernel-2.6.18-53.el5.i686.rpm 
Note: This will update GRUB (/boot/grub/grub.conf)
Note: Will also place the new kernel in the /boot file system

Examine traces in:
 a. /boot
 b. /boot/grub/grub.conf

3. Remove traces of former kernel using 'rpm -e [--nodeps]'
 a. kernel-2.6.18-8.el5 - removes older version
 b. kernel-headers-2.6.18-8.el5 - force remove ignoring dependencies 'rpm -e --nodeps kernel-headers-2.6.18-8.el5'
 c. kernel-devel-2.6.18-8.el5

4. Install new 'kernel-headers' and 'kernel-devel' packages using YUM:
 a. yum -y install kernel-headers
 b. yum -y install kernel-devel

5. Confirm that the 3 'kernel-*' packages are installed:
 a. rpm -qa | grep kernel

Note: Removal of older kernel-* packages cleans up:
 a. /boot
 b. /boot/grub/grub.conf (menu.lst)

Quick HOWTO : Crontab Quick Reference

By Parthiban Ponnusamy

Folks, 
Here is the quick reference for Crontab. Cron is the easy way to run the programs/tasks at scheduled time.. Hope this quick reference for Linux admins..


Features:
  1. Scheduler
  2. Rules (Cron entries) are based on times:
   a. minute (0-59)
   b. hour (0-23)
   c. day of the month (1-31)
   d. month (1-12)
   e. day of the week (Sun,Mon,Tue, etc. OR 0-7)
   f. command to execute (shell, perl, php, etc.)
 3. Wakes up every minute in search of programs to execute
 4. Reads cron entries from multiple files
 5. Maintains per-user and system-wide (/etc/crontab) schedules

/etc:
cron.d/      
cron.deny - denies cron execution by user
cron.monthly/ - runs jobs monthly
cron.weekly/ - runs jobs weekly 
cron.daily/ - runs jobs daily
cron.hourly/ - runs jobs hourly
crontab - contains system-wide schedules

Note: '*' wildcard in a time column means to run for all values

Per-user Crontabs:
Stored in: /var/spool/cron

Note: 'crontab -l' - enumerates per-user cron entries


System-wide Crontab:
Stored in: /etc/crontab

Note: 'crontab -l -u username' - enumerates per-user cron entries

Quick HOWTO : Redhat Package Management (RPM)

By Parthiban Ponnusamy

Folks, Here is Quick Reference and HOWTO for RPM (Redhat Package Management). Hope it will be useful..


 Features:
  1. Provides package management
   a. Query
   b. Install
   c. Uninstall
   d. Upgrade
   e. Verify
  2. Auto-verifies packages using GPG, MD5, SHA1SUMs
  3. Automatically reports on unresolved dependencies




Install (Does NOT overwrite previous package):
Note: Use this method to install a new version of the kernel
  1. rpm -ivh *.rpm
  2. rpm -ivh http://192.168.75.100/RH5/i386/Server/dhcp-3.0.5-7.el5.i386.rpm



Upgrade (Installs or overwrites existing package):
  1. rpm -Uvh *.rpm
  2. rpm -Uvh http://192.168.75.100/RH5/i386/Server/dhcp-3.0.5-7.el5.i386.rpm

Freshen (Updates an existing package):
Note: Will NOT install the package, if it doesn't exist locally

  1. rpm -Fvh *.rpm - freshens the current version of a package


Removal:
 1. rpm -ev *.rpm - removes a pacakge
Note: removal process considers dependencies and will complain if the removal will break 1 or more packages. To get around this, use '--nodeps' option with 'rpm -ev --nodeps *.rpm'

 2. rpm -ev gftp


Query:


  1. rpm -qa - shows all installed packages
  2. rpm -qa | wc -l - this dumps all packages and provides a count
  3. rpm -qa | grep -i sendmail
  4. rpm -qi nano - dumps info. about the 'sendmail' package as it's recorded in the local RPM database
  5. rpm -qf /usr/bin/nano - dumps package membership info. for the 'nano' file
  6. rpm -qpi http://192.168.75.100/RH5/i386/Server/dhcp-3.0.5-7.el5.i386.rpm - dumps info. about the uninstalled 'dhcp' package, which resides on the repository
  7. rpm -ql package_name - returns all included files


Verify:
  1. rpm -Va - verifies ALL packages on the system, returning info. only if there are discrepancies from the original installation

  2. rpm -Vf /usr/bin/nano

Task: Change '/usr/bin/nano' then verify

SM5....T   /usr/bin/nano

S(file size), M(mode or permissions), 5(MD5), T(mod time)
  3. rpm -Vp nano

Quick HOWTO: Resize Logical Volume (LV) in Linux

By Parthiban Ponnusamy

Here is the quick steps to Resize Logical Volume in Linux..


If you want grow (resize) 'logvolopt1' to 20GB


 1. lvresize -L 20GB /dev/volgroup001/logvolopt1
 2. lvdisplay - to confirm new size of logical volume
 3. df -h - will still reveal the current size
 4. Resize the file system to update the INODE table on the logical volume to account for the new storage in 'logvolopt1'
  'resize2fs -f -p /dev/volgroup001/logvolopt1'

Note: You may resize file systems online if the following are met:


  a. 2.6x kernel series
  b. MUST be formatted with ext3

If you want to shrink (resize) 'logvolopt1' to 15GB


 1. lvresize -L 15GB /dev/volgroup001/logvolopt1
 2. lvdisplay
 3. df -h
 4. resize2fs -f -p /dev/volgroup001/logvolopt1


 Note: online shrinking is not supported


 5. df -h

Note: Check disk utilization prior to shrinking to reduce the risk of losing data.. 


Hope these Quick HOWTO will help administrators for quick reference.
cheers :-)



Quick HOWTO : Lock and unlock a user in AIX

By Parthiban Ponnusamy

To unlock,

chuser account_locked=false user
or
chsec -f /etc/security/user -a account_locked=false -s user

To lock,

chuser account_locked=true user
or
chsec -f /etc/security/user -a account_locked=true -s user

Video Tutorial : Configuring Linux IP tables

By Parthiban Ponnusamy


Linux IP TABLES Configuration... Simple HOWTO..

Hope it will be helpful..

Quick HOWTO : Extend a filesystem in AIX command line

By Parthiban Ponnusamy

Suppose you want to extend /usr file system to 4GB


chfs -a size=4G /usr
or
chfs -a size=4000M /usr


or you want to add some more space like 2GB with existing size
chfs -a size=+2G /usr 


You can extend the root file system same way. Suppose the new size you want is 2GB, then


chfs -a size=2G / 
or
chfs -a size=2000M /


Hope this will be helpful :)


Quick HOWTO : Samba Implementation with Active directory authentication in Linux

By Parthiban Ponnusamy

Advantages:



1. Administrator don’t need to create/maintain separate accounts for samba shares
2. Users don’t need to remember separate password for samba
3. Users can change their samba password without system administrator’s help
4. Users home drive can be mapped via login script while they are logging into their PC/Laptops/Citrix



Implementation:



We are going to use, Kerberos Authentication method here. There are two files to edit to achieve this,

a. /etc/samba/smb.conf
b. /etc/krb5.conf


Do the modifications to /etc/samba/smb.conf as follows,




#========== Global Settings ========


[global]


log file = /var/log/samba/%m.log
realm = (DOMAIN NAME IN CAPS)
dns proxy = no
server string = Samba Server
password server = (domain controller name)
path = /var/spool/cups
workgroup = (Netbios name of domain)
security = ADS
max log size = 50
pam password change = yes

wins server = (wins server name)



#======= Share Definitions =========


[homes]
comment = Home Directories
browseable = no
writable = yes




[printers]
comment = All Printers
guest ok = yes
writeable = no
printable = yes
public = yes
use client driver = yes
path = /var/spool/samba




Do the Modifications to /etc/krb5.conf as follows,


[logging]


default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log

[libdefaults]
ticket_lifetime = 24000
default_realm = (DOMAIN NAME IN CAPS)
dns_lookup_realm = false
dns_lookup_kdc = false




[realms]


(DOMAIN NAME IN CAPS) = {
kdc = (domain controller server):88
admin_server = (domain controller server):749
default_domain = (domain name)
}

[domain_realm]
.(domain name) = (DOMAIN NAME IN CAPS)
.(domain name) = (DOMAIN NAME IN CAPS)



[kdc]


profile = /var/kerberos/krb5kdc/kdc.conf

[appdefaults]
pam = {
debug = false
ticket_lifetime = 36000
renew_lifetime = 36000
forwardable = true
krb4_convert = false
}



Type the following command in terminal,

service winbind start



kinit administrator@DOMAINNAME




net ads join -U administrator 


You will be asked to enter the AD Administrator password. When the command line doesn't return a value, you're now connected to the Active Directory. Now you are done with the setup. :)



Quick HOWTO : Simple steps to Kickstart a Linux Server with CD/DVD

By Parthiban Ponnusamy

1.  Copy the /root/anaconda-ks.cfg as a base from your customized installation of Linux
2.  Setup a web-server with the loopback dvd mounted and reachable
3.  Make sure the kickstart file is reachable through the web-server
4.  Boot the client to be kickstarted with options

Options are:

linux ks=http://<your webserver>/<your ks-file>

Example:
linux ks=http://192.168.1.1/linuxkickstartfile.ks.

Thats all... Done :)

Quick HOWTO : Removing/Installing Tape drive in AIX

By Parthiban Ponnusamy

To remove Tape drive in AIX

rmdev -dl rmt0  or smirrty rmdev


if u r not keeping the definition, while u removing, you need to poweroff the tape drive and on again to redetect

To detect again,

cfgmgr -v
or
cfgmgr -l <devicename> -v


Tape drive will be automatically detected and available for use.

Tips : Some useful notes for Linux

By Parthiban Ponnusamy

Task
File / Command
Startup script
/etc/rc.d/rc
Kernel
/boot/vmlinuz
Kernel Parameters
sysctl -a
Reconfigure the kernel
cd /usr/src/linux 
make mrproper  
make menuconfig  
make dep  
make clean  
make bzImage 
make install 
make modules 
make modules_install
cp arch/i386/boot/bzImage /boot/vmlinuz-2.2.16 
mkinitrd /boot/initrd-2.2.16.img 2.2.16 
vi /etc/lilo.conf 
lilo
List modules
lsmod
Load module
insmod
Unload module
rmmod
Initialize system
netconf
Physical RAM
free -m
Kernel Bits
getconf LONG_BIT
Crash utility
lcrash
Trace System Calls
strace
Machine model
uname -m
OS Level
uname -r
Run Level
runlevel
Hardware Information
dmidecode
Timezone Management
/etc/sysconfig/clock
NTP Daemon
/etc/ntp.conf
/etc/rc.d/init.d/xntpd

Video Tutorial : How To Install Red Hat Enterprise Linux via VNC

By Parthiban Ponnusamy

This tutorial is really useful... Installing Linux through VNC !


Quick HOWTO : Simple steps to Install YUM Update Server in Linux

By Parthiban Ponnusamy

There are several ways. I provided one of the simple way with simple steps.. Follow the steps mentioned below.

1.Copy all data to /var/ftp/pub/Server
2. Install the createrepo rpm (If its not inistalled)
3. cd /etc/yum.repos.d/
4. vi parthi.repo

[parthi]
name=repository
baseurl=file:///var/ftp/pub/Server (Use ftp URL to setup this in client side)
enabled=1
keepcache=0



(there should not be any other *.repo file exists..remove or rename the other repositories)

5. createrepo -v /var/ftp/pub/Server
6. yum clean all
7. yum update
8. You are done… Start using yum, it should work :)

Quick HOWTO : Connecting an iSCSI storage to a Linux Server

By Parthiban Ponnusamy

To connect a Linux Server to an iSCSI storage, Follow the steps

1. Install “iscsi-initiator” RPM Package in the linux server
2. Usually iscsi unique id located in the /etc/iscsi/iscsid.conf. provide this to your storage admin to assign the
    LUN
3. Use the command “iscsiadm -m discovery -t sendtargets -p <iSCSI storage IP>”
4. Then do “service iscsi restart”
5. Now give “fdisk –l”. Now you can able to see the new disk detected in the linux server.
6. create a file system on the disk and mount the same

You are done :)

Tips : Find Command helper..

By Parthiban Ponnusamy

Using this site, you can get the complete find command and its parameters easily.. Hope it will be very useful in day to day Unix activities. The Link is below..


Tips : Command to unlock an user account in HP-UX

By Parthiban Ponnusamy

To Unlock an User Account,

/usr/lbin/modprpw -k USERNAME

Hope this will be helpful for someone.

Scripts : Shell script to send mail using telnet in Linux

By Parthiban Ponnusamy

while [ $count = 1 ]
do
( echo open MAIL-SERVER-NAME 25
sleep 8
echo helo MAIL-SERVER-NAME
echo mail from: SENDER-ADDRESS
sleep 2
echo rcpt to: RECIPIENT-ADDRESS
sleep 2
echo data
sleep 2
echo subject:  YOUR-SUBJECT-HERE
echo
echo
echo this is a test mail
sleep 5
echo .
sleep 5
echo quit ) | telnet
count=2
done

Quick HOWTO : Steps to create swap file in Linux

By Parthiban Ponnusamy

Step 1:

Create the file.

This file will be 1024*524288 bytes. Generally it is a good
idea to create the swap file twice as big as the amount of
RAM that you have installed if you are under a 1 GB.

However, if you have larger amounts of RAM, it's best to run
your own tests with free to see how you're using the swap
file.


$ dd if=/dev/zero of=/swapfile0 bs=1024 count=524288


Step 2:

Setup the swap area on the file you created.

$ mkswap /swapfile0


Step 3:

Enable the file for swapping

$ swapon /swapfile0


Step 4:

Permanently enable the swap file on boot.
Add the following lines to /etc/fstab.

/swapfile0 swap swap defaults 0 0


Step 5:

Check that the swap file is working the the free command. Also,
reboot too to make sure the swap file works on restart and that
/etc/fstab was correctly configured.