Skip to main content


Showing posts from 2011

How to disable "Reopen windows when logging back in" in Mac OS X Lion

We might have seen when we log out, restart or shutdown Mac OS X Lion, we get a dialog window with a check box next to “Reopen windows when logging back in” that restores all of your currently open applications and windows. To disable this feature there is no visible preference/configuration item to do this. The mac os x stores all the window related information under under each users preferences directory. Upon next login it loads all the windows based on the saved data under preferences. The following section helps you in how to disable this.
1. Write a shell Script as below and and save as : #!/bin/bash
   echo "#!/bin/bash" > /tmp/
 echo "rm/Users/*/Library/Preferences/ByHost/*" >>/tmp/
   mv /tmp/ /usr/bin/
   chmod +x /usr/bin/
   defaults write LoginHook /usr/bin/
2. Run the with sudo pri…

How to reset root password in OpenSuSE and SuSE Linux Enterprise Desktop.

In case you have forgot the root password in your OpenSuSE or SuSE Linux Enterprise Desktop system, the following steps will help you in resetting your root password.
Turn on your system.In the grub menu select the kernel you want to boot and press tab to shift focus to "Boot Options"Now type ,    init =/bin/bash ( if you are using GRUB boot loader)  or linux init=/bin/bash ( if you are using the LILO boot loader). Press Enter to continue.You will see a prompt such as  (none)# in the teminal.Now run command mount , to verify whether your  "/"  volume is mounted or not.If mounted, Run passwd command in terminal to change the password for root.

FreeFileSync - an open-source file and folder comparison and synchronization tool

We often try to keep a backup of all our data in our computer to a external storage such as HDD, network storage etc.  Over a period of time maintaining a synchronization between data on the computer and external storage becomes if you don not have good backup tool. FreeFileSync  helps us in resolving this poblem.  FreeFileSync is very easy to use and syncs the data in quick time. This tool can be downloaded here.

Linux Stress Utility

Stress is a workload generator for linux operating systems. It allows the user to configure the amout of CPU , memory, I/O and disk stress to be applied on the linux system.  Below example shows you how to create a load of 4 on the linux system.  Note : You need to use this tool wisely, a huge workload created by stress might render the system unusable resulting in force reeboot of the Linux system. You might also need to change the configurations depending on the hardware capability.
The below example puts a load average of 4 on the linux system.

# stress --cpu 2 --io 1 --vm --vm-bytes 128M --timeout 10s --verbose

For downloading and more information on stress, click here

How to find whether your Mac's processor supports AES ( Advanced Encryption Standard) specification or not ?

To find out whether the processor on the  Mac is capable of supporting AES ( Advanced Encryption Standard specifications ) or not ,  we can run the following command to know the status 
$ sysctl -a | grep aes
The output might be : hw.optional.aes: 0
If  "hw.optional.aes:" value is 0 then the processor does not support AES . If value is 1 then processor supports AES.

You also can check the features supported by the processor on the intel site at :  by supplying the processor model number. Processor model number can be found by running following command.

$ sysctl -a | grep machdep.cpu.brand_string
output :  machdep.cpu.brand_string: Intel(R) Core(TM)2 Duo CPU     P8800  @ 2.66GHz

How to erase the harddisk completly using linux ?

Erasing the entire hard disk using Linux:
Run the following command to fill your entire hard disk with zeros $ dd  if=/dev/zero of=/dev/sda  bs=1M
The above command will whole hard disk with zeros. Note: this will take long time to complete.
Erasing/filling the hard Disk with random data:
We can fill the hard disk with random data in case of any security requirement  to prevent data loss. Run the below $ dd  if=/dev/random of=/dev/sda  bs=1M

Erasing the MBR(Master Boot Record) of the Hard Disk.
To Erase only code area in your MBR:   Run  $ dd  if=/dev/zero of=/dev/sda  bs=446 count=1
To Erase entire MBR :
 $ dd if=/dev/zero of=/dev/sda  bs=512 count=1

Note : If linux is not installed, Boot into Linux image from Live CD to perform above operations  on the hard disk.

How to add persistent/permanent routes in Mac OS X

Mac OS X looses static routes when it is rebooted. To preserve the static route on mac we would need to create a startup script which adds your static route upon system startup. The following steps will help  in achieving this.
Create a directory named "addroute" under /System/Library/StartupItems/ with sudo privileges.Under addroute directory create "StartupParameters.plist" with below contents in it      3. Now, create addroute shell script under  /System/Library/StartupItems/addroute directory. The addroute script should be like below. #!/bin/sh
# Setting up static routing tables for Mac OS X                 
. /etc/rc.common
syslogger ( ) {   
        printf "%s\n" "$*" >> /var/log/system.log

StartService ()
        syslogger $(/bin/date) " : Adding static route to route table"
        syslogger $(sudo /sbin/route add
        return 0

StopService ()
        syslogger $(/bin/date) &quo…

How to add persistent/permanent routes in windows and linux

We can add static route in the system using route add command from the command prompt or terminal. But these routes gets erased when we reboot the system. To make your route's persistent even after reboot. follow below command on Windows or Linux
On Windows :
In Command Prompt, Run command as below
C:\> route -p add   mask  172.16.193. 100 metric 1
-p switch will make the route persistent on windows. On Linux : Open Terminal , with root privileges create/edit below file to add the route details as below           $ vim /etc/sysconfig/network-scripts/route-eth0
     2.   Add the route details like below and save the file.    via

     3.   Restart the network service by running " /etc/init.d/network restart ". Now you should be able connect the systems under network through gateway.
Note : if your ip address is configured to eth1 port then you would have to create " route-eth1 &qu…

How to enable ssh connection to vmware esxi server

SSH connection by default is disabled to the VMWare ESXi hosts. We can enable the SSH connection on the ESXi host with following steps:
Login into ESXi shell with your root credentials. ( How login as root can be known here )Open /etc/inetd.conf with vi.Look for #SSH by scrolling down or searching the string.Un-comment the line by removing "#" by pressing X from your keyboard.Save the file.Now get the process id of inetd by running command as " ps | grep inetd "Run "Kill -HUP . This would kill the inetd process daemon and inetd is relaunched again.Now again get the process id of inetd to make sure inetd was lauched again. Now SSH is enabled to the ESXi host.  If inetd was not launched, then restart your ESXi host. This would enable the SSH connection upon restart.

How to get shell access on the VMware ESXi host server

We might sometime need the root access on the VMWare ESXi host to debug an issue. But VMWare ESXi does not provide any console other than the default one. But there is a way to get the shell/terminal access for the root. The below steps should help in that.
 Goto VMware ESXi console. Press Alt+F1 from your keyboard. Type "unsuported" even though you will not see the characters getting displayed on the console.Now , type the root password to get the root access to the ESXi host.