Thursday, December 8, 2011

Message: "The command prompt has been disabled by your administrator"


When you attempt to run CMD.exe or a batch file, you may receive the message "The command prompt has been disabled by your administrator". This is caused by restrictions placed in Registry. DisableCMDvalue is set to 1 or via Group Policy. To enable Task Manager, try any of these methods:

Method 1: Using the console registry tool
  • Click Start, Run and type this command exactly as given below: (better - Copy and paste)
Method 2: Edit the registry directly
  • Open Registry Editor (Regedit.exe) and navigate to:
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\System]
  • In the right-pane, double-click DisableCMD and set it's data to 0
Method 3: Using Group Policy Editor in Windows XP Professional.
  • Click Start, Run, type gpedit.msc and click OK.
  • Navigate to User Configuration \ Administrative Templates \ System
  • Double-click the Prevent access to the command prompt

How to increase swap space on OpenSolaris 2008.11

su - root # become root

swap -sh
# find out how big your swapdevice is

zfs get volsize rpool/swap
# find out how big your ZFS swapdevice is

zfs set volsize=2G rpool/swap
# enlarge it to (eg:) 2G, 2048M, however you wish to denote it

init 6
# reboot


Thursday, July 28, 2011

Load balancing with Linux

We want to balance http traffic on a particular link to two backend web servers

User link: http://192.168.1.20

LoadBalancer: 192.168.1.10

Web Server 1: 192.168.1.4

Web Server 2: 192.168.1.5

Method 1

Install the balance module

aptitude install balance

/etc/network/interfaces

auto eth0:1

iface eth0:1 inet static

address 92.168.1.10

netmask 255.255.255.0

post-up /root/balance-script.sh

/root/balance-script.sh

/usr/sbin/balance -b 192.168.1.20 80 192.168.1.4:80 192.168.1.5:80 %

or

/usr/sbin/balance -b ::ffff:192.168.1.20 80 192.168.1.4:80 192.168.1.5:80 %

/etc/sysctl.conf

echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf

Set the web servers default gateway to the Loadbalancer and reboot.

Method 2

Coming soon!

Mac Time Machine to a network share

1. Open a Terminal window and paste this

  defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

2. Run this script to create a sparse bundle on your Desktop

http://db.tt/TF5nIQ0

3. Copy the sparsefile to the root folder of your network share,

4. Open Time Machine preferences and choose the network share, your backup should start in a few minutes

Install Tata Photon+ on a Mac

1. Download the drivers from here

http://www.tataphoton.com/tata-photon-download-dialer.aspx

or

http://www.huaweidevice.com/resource/mini/200910149695/testmobile1014/index.html

or

download this file, rename the extension to .zip and install the file in the .iso

http://gmiddlecote.files.wordpress.com/2011/05/rename_to_zip.pdf

2. After installing the packages, it will automatically add a device “HUAWEIMobile-Modem” to your Network Preferences

3. After selecting this option in Network Preferences we can add the following

Configuration: Default

Telephone Number: #777

Account Name: internet

Password:internet

4. Apply the changes and click "Connect"