Repair Outlook PST File - Quick HOWTO


We need to Run the Inbox Repair Tool (scanpst.exe)  to repair the outlook PST file.

  1. Go to  "C:\Program Files\Microsoft Office\Office12"
  2. Double click the scanpst.exe file to open the program.
  3. Type the path and file name of the PST file, or Click Browse to locate the file.
  4. Click on the option which says Repair. (Ensure that backup check box is checked)
  5. This might take sometime depending on the size of the Outlook PST file.

You are done. This will repair most of the errors in PST file. Enjoy..!

Different types of shell in UNIX and Linux


Unix Shell
A shell is  command interpreter between user and Unix kernel as well as provides a strong scripting language in UNIX
Following are the different types of Unix shells:
B shell - /bin/sh – This is the default Unix shell for many Unix operating systems .
Bourne shell was written by S. R. Bourne and its more emphasis is to use it as a scripting language rather than an interactive shell .
Some of the features are :
Provided support for environment variables using parameters and exportable variables.
Redirection of program output and error .
Command substitution using back quotes: `command`.
embed a file/commands using input redirector <<
“for ~ do ~ done” loops
“case ~ in ~ esac” for selecting and responding to a data value.
C-shell /bin/csh was designed to provide the interactive features lacking in b shell such as job control and aliasing .
K shell /bin/ksh – was created by David Korn and has features of both B shell and C shell along with some additional features .
Bash – the Bourne again shell was developed by GNU project .It is based on B shell language and has features of C and K shells.
tcsh is the default shell of FreeBSD and its descendants. Essentially it is C shell with programmable command line completion, command-line editing, and a few other features.
Zsh is a shell designed for interactive use and it has many of the useful features of bash, ksh, and tcsh along with many new features.
Unix Shell configuration files :

b shell
—————————————————–
shell prompt : $
executable file : /bin/sh
Read on interactive/non interactive login to bash
/etc/profile
~/.profile

bash shell
—————————————————–
shell prompt : $
executable file : /bin/bash
Read on interactive/non interactive login to bash
/etc/profile
~/.profile
~/.bash_profile
~/.bash_login
Always read on invoking bash
~/.bashrc
/etc/profile login login login
~/.profile login login

csh shell
——————————————————
shell prompt : %
executable file : /bin/csh
Read on csh shell invocation .
/etc/csh.cshrc
~/.cshrc
Read on interactive/non interactive login to tcsh shell
/etc/.login
~/.login
~/.logout
/etc/csh.login

ksh
—————————————————–
shell prompt : $
executable file : /bin/ksh
Read on interactive/non interactive login to bash
/etc/profile
~/.profile

tcsh shell
——————————————————
shell prompt : &
executable file : /bin/tcsh
Read on tcsh shell invocation .
~/.tcshrc
/etc/csh.cshrc
~/.cshrc
Read on interactive/non interactive login to tcsh shell
/etc/.login
~/.login
~/.logout
/etc/csh.login

zsh
—————————————————–
shell prompt : $
executable file : zsh
Configuration files :
Always read on invoking zsh
~/.zshenv always
/etc/zshenv always
only read on interactive login to zsh.
~/.zshrc
/etc/zshrc
Read on interactive/non interactive login to zsh
/etc/zprofile login
/etc/zlogin login
/etc/zlogout login
/.zprofile login
~/.zlogin login
~/.zlogout login


Tech Tip: Move your scripting/coding environment to the cloud by accessing your virtual workstations or virtual servers with 24x7 live support from CloudDesktopOnline.com. For other advanced cloud solutions and products visit www.Apps4Rent.com.

Create Specific size files in Windows

In some situations, you may need to create files with particular size for testing purpose in windows. For example, you may want to test the file transfer speeds. In these situations, you can create the test files using the fsutil command.


Here is the command to create files manually in windows:


fsutil file createnew c:\test.txt 5000000


Hope this tip will help everyone...!

Imaging Tool: Ghost Alternative - PING (Partimage Is Not Ghost)

PING is a live Linux ISO, which can be burnt on a CD and booted, or integrated into a PXE / RIS environment for Image Backup and Restoration.



Several tools have been added and written, so to make this ISO the perfect choice to backup and restore whole partitions, an easy way. It sounds like Symantec Ghost(tm), but has even better features, and is totally free.


Features include: 
  • Probably the best available Linux toolbox for rescuing a system;
  • Backup and Restore partitions or files locally or to the network (MS Network Shared directory, NFS, FTP or SSHFS);
  • Backup and Restore the BIOS data as well;
  • Either burn a bootable CD / DVD, either integrate within a PXE / RIS environment;
  • Possibility to Blank local admin's password;
  • Create your own restoration bootable DVD;
  • Partition and Format a disk before installing Windows (so to make sure your unattended Windows installation will happen on the right partition);

  • Specific advantages PING brings you over DOS and Ghost :
    • Most network cards automatically recognized by the Kernel (unlike DOS);
    • Most CD/DVD readers automatically recognized by the Kernel (unlike DOS);
    • You don't have to run a Ghostcast server to receive images over the network;
    • More supported file systems (Including Linux/UNIX/Windows File systems)
    • You can store an image on several CD/DVD (CD/DVD-spanning);
    • You can backup and restore BIOS settings too;
    • Much much smaller than WinPE / BartPE;

For More Info and Download, visit http://ping.windowsdream.com/

Migrating / Upgrading EPO Server


Migrating EPO Server to New Server

If migrating to Server having the same IP address and same NetBios name, then

Step1: Check and note for the following in the current EPO Server, which have to be same on the New Server.
            a)   Database server should be same version and service pack (SQL or MSDE)
b)     All Service ports using by the ePO server
c)    Version and  Patch applied
d)     Agent Version

Step2: Backup your database.

Step3: Install EPO Server on the new server with the above requirement (As in Step1)

Step4: Restore Database.

Step5: Restart the New EPO Server



If migrating to Server having different IP address and different NetBIOS name, then

Follow Step1 to Step5, then make the old ePO server off from the network and,

Step6: Re-install agent to all the client machines (managed system) from the New EPO Server Console.

Visit https://kc.mcafee.com/ and search for the KB article


Note: For ePO 4.0 -> Export the agent server secure communication keys and Repository public key (ePO console -> configurations -> server settings -> Security keys -> edit)

Configuring Samba Server in Linux : Quick HOWTO


SAMBA(SMB server) is a file sharing server. Which is used to share files between Windows, Linux and Unix Systems. SMB(Server Message Block) is a proprietary protocol which is developed by Microsoft


This article explains how to install and configure SAMBA in Linux.


Step 1: Create a directory where you want to keep data and share with other remote systems(either windows/Linux/UNIX).
#mkdir /sales


Step 2 : Installing Samba server
#yum install samba*


Step 3 : Now we have to configure the samba server. Edit the main configuration file (/etc/samba/smb.conf)


specify the work group where this server belongs 


#vi /etc/samba/smb.conf


search for workgroup word and specify your work group name


workgroup = SALES-DEPT.


Why we require this workgroup? 
When windows user try to access any network resource they first try to access my network places and then search for workgroup then to server. So definitly we have to specify this workgroup entry in smb.conf file.


Now we have to give a name to this samba server, search for "server string" with out quotes then provide the samba server name (here that name is sales-share)


server string = sales-share


Now specify the share details, which folder you want to share. To whom you want to share? Goto last line of the smb.conf file specify your shared folder details as follows.


[sales-dir]
comment = "This is the Sales data which is shared with my windows users"
path = /sales
valid users = user1 user2
writable = no
privatable = no
browsable =yes. 


After giving this seven entries just save and exit the file.


Let me explain each and every thing what we used here.
a.[sales-dir] -- This is the share name, so when ever any user accessed the samba server through network this will be visible as folder shared.
b.comment -- This is just a comment, which will help to know what is this share for.
c.path -- This is used to specify which folder on my samba machine to share.
d.valid users -- This will specifies which user is having access on this folder.
e.writable -- This will specify whether users are able to write or not, In this example the can just read the folder and copy.
f.Privatable -- This will indicate whether this folder is private or not.
g.browsable -- This is used to specify whether the folder content is browsable or not.


You can specify the Read-Only and Write Access to specified using keywords "read only" and "write list"


example: write list = user1, user3
              read only = user2, user4


Step 4 : Now create passwords for the users who are going to access this samba share remotely.
#smbpasswd -a user1
#smbpasswd -a user2


generate the passwords for this two users and this passwords will be stored in /etc/samba/smbpasswd


Step 5 : check for the syntax for your smb.conf file if in case you did any mistake
#testparm


Step 6 : Restart the samba service
#service smb restart


Step 7 : Permanently on the smb service, So that after rebooting the system too our server will start running.
#chkconfig smb on


step 8: change the selinux security context for the shared folder
#chcon -Rt samba_share_t /sales


Thats all. You have done configuring the samba server.

Backup and Restore MySQL database


Databases are used to store large amount of precious data and it becomes very important to Backup your data. This article explains the how to backup and restore the MySQL Database.




Backing Up MySQL Database:


MySQL database backup can be accomplished in two ways:


1. Copying the raw mysql database files &
2. Exporting tables to text files


Copying the MySQL database files:


MySQL uses the same table format on different platforms, so it's possible to copy MySQL table and index files from one platform and use them on another without any difficulties (assuming, of course, that you're using the same version of MySQL on both platforms).


Exporting tables to text files:


The MySQLDump is handy utility that can be used to quickly backup the MySQL Database to the text files. 


The syntax for the command is as follows.


mysqldump -u [Username] -p [password] [databasename] > [backupfile.sql]
[username] - this is your database username
[password]- this is the password for your database
[databasename] - the name of your database
[backupfile.sql] - the filename for your database backup


For example,


If you want to backup MySQL Database named "accounts" into text file accounts.sql. Here are the scenarios of taking the backup. Assuming that both user name and password of the database is "admin".


1) Taking the full backup of all the tables including the data. Use the following command to accomplish this:
mysqldump -u admin -p admin accounts > accounts.sql


2) Taking the backup of table structures only. Use the following command to accomplish this:
mysqldump -u admin -p admin --no-data accounts > accounts.sql


3) Taking the backup data only. Use the following command to accomplish this:
mysqldump -u admin -p admin --no-create-info accounts > accounts.sql


Restoring MySQL Database:


You can use the following to command to restore the accounts database from accounts.sql backup file.


mysql - u admin -p admin accounts < accounts.sql

Script to find out particular file type in UNIX

In day to day system administration tasks, In some situations, you may need to find out a particular file type (ex: script files, regular files, etc..)  in large file systems. I had a situation to find out only script files (Shell and Perl Scripts) which are using "rsh" in the script code in a very large file system which contains more than 1,00,000 files.


I wrote a simple script to achieve this task. I am sharing this here, because this may be helpful to others as well.This script can be altered little to find out other file types as well.



#!/bin/ksh
find /GIS -type f | while read filename
 do
 filetype=$(file $filename | awk -F: '{print $2}'| awk '{print $2}')
 if [ "$filetype" == "script" ];then
    grep -i rsh $filename > /dev/null
    if [ $? -eq 0 ];then
       echo "$filename" >> /tmp/rsh_scripts_report
    fi
 fi
done

Howto shutdown oracle database?

To Find out the Database processes:
ps -eaf |grep pmon


Change the environment to that particular database:
. ora8env <database>


echo $ORACLE_SID


Type:
sqlplus


To login provide the username as follows:
username : / as sysdba


Now issue the following commands:
select * from v$database;
shutdown immediate;


Now your database will start to shutdown. You're done..!

Cobbler Install server for Linux


Cobbler is a Linux installation server that allows for rapid setup of network installation environments. It glues together and automates many associated Linux tasks so you do not have to hop between lots of various commands and applications when rolling out new systems, and, in some cases, changing existing ones.


With a simple series of commands, network installs can be configured for PXE, reinstallations, media-based net-installs, and virtualized installs (supporting Xen, qemu, KVM, and some variants of VMware). Cobbler uses a helper program called 'koan' (which interacts with Cobbler) for reinstallation and virtualization support.


Cobbler is a small and lightweight application (about 15k lines of Python code). It tries to be extremely simple to use both for very small and very large installations -- as well as easy to work on, extend, and hack. It avoids being "enterprisey" (as in complicated) whenever possible, but is highly useful in all sorts of enterprises by having a lot of advanced features and doing small things to save a large amount of time in repeated tasks.


Cobbler can also optionally help with managing DHCP, DNS, and yum package mirroring infrastructure -- in this regard, it is a more generalized automation app, rather than just dealing specifically with installations. There is also a lightweight built-in configuration management system, as well as support for integrating with configuration management systems like Puppet. Cobbler has a command line interface, a web interface and also several API access options. That sounds like a lot, but it's really pretty simple.


New users may like to start with the web app after doing the initial setup steps on the command line (cobbler check; cobbler import) as it will give them a good idea of all of the features available. Advanced features don't have to be understood all at once, they can be incorporated over time as the need for them arises.


For more informations, Visit https://fedorahosted.org/cobbler/

Troubleshooting issues using lsof in Linux


The lsof is an excellent utility that can be used to identify process or user that is locking system resource such as file or network socket.


Basically, The /etc/services system files is usually used to map a numeric port number to a descriptive port name defined by user.


Usage:


lsof without any command options to list system wide resources that are using by processes running in the system.


To report all processes that are accessing the TCP sockets found on the system
lsof -i TCP


To find out what process is holding TCP port 8080.
lsof -i tcp:8080


To show all resources that are being held by process id 857
lsof -p 857


Some programs might running on the Linux servers by more than one instance. 


In this case, type lsof -c ProgramName instead of lsof -p PID to get a broader scope of view.


For example:


To find out what are the resources held by all sendmail processes running on the system.


lsof -c sendmail


To confirm resources that are being held by user id user1
lsof -u user1


To find out what are the processes that are locking the specify file /home/user1/myfile
lsof /home/user1/myfile

Override LVM Quorum Check in Linux


Normally, volume groups are automatically activated during system startup. Unless you intentionally deactivate a volume group using vgchange, you will probably not need to reactivate a volume group.


However, LVM does require that a "quorum" of disks in a volume group be available. During normal system operation, LVM needs a quorum of more than half of the disks in a volume group for activation. 


If, during run time, a disk fails and causes quorum to be lost, LVM alerts you with a message to the console, but keeps the volume group active.


If there is no other way to make a quorum available, the -q option to the vgchange command will override the quorum check.


EXAMPLE:


vgchange -a y -q n /dev/vg01


You should attempt to return the disabled disks to the volume group as soon as possible. When you return a disk to service that was not online when you originally activated the volume group, use the activation command again to attach the now accessible disks to the volume group.

AIX NFS Error and Solution - RPC: 1832-010 Authentication error

[root-prodsrv1][/]> mount prodsrv2:/Softwares /wasinstall
mount: 1831-008 giving up on:
prodsrv2:/SwRep
vmount: The file access permissions do not allow the specified action.
NFS fsinfo failed for server prodsrv2: error 7 (RPC: 1832-010 Authentication error)


[root-prodsrv1][/]> nfso -a | grep port
portcheck = 0
nfs_use_reserved_ports = 0


[root-prodsrv1][/]> nfso -po portcheck=1
Setting portcheck to 1
Setting portcheck to 1 in nextboot file


[root-prodsrv1][/]> nfso -po nfs_use_reserved_ports=1
Setting nfs_use_reserved_ports to 1
Setting nfs_use_reserved_ports to 1 in nextboot file


[root-prodsrv1][/]> mount prodsrv2:/Software /wasinstall
[root-prodsrv1][/]>