Monday, December 14, 2009

Enable remote root login and sshd on Solaris-10 after fresh Solaris-10 installation

Enable sshd on solaris-10

1. Change the file /etc/ssh/sshd_config from PermitRootLogin no to PermitRootLogin yes

2. restart the services
#svcadm restart svc:/network/ssh:default


Enable remote root login on Solaris-10

1. Open file /etc/default/login

2. Comment out line CONSOLE=/dev/console as #CONSOLE=/dev/console

Thursday, November 19, 2009

sys-unconfig on solaris

To change solaris config info like NIS server,
login as root and do sys-unconfig. Provide configuration info as needed.

Friday, October 23, 2009

Java 1.5 Certification resources (310-055)

Online Resources :
-----------------
SCJP Tiger Study Guide (Link)

Javabeat.net Notes (Link)

Examulator.com (Link)

An SCJP 5.0 Certification primer(Link)

How to test a product?

1. Requirements based testing - Test it based on Product Requirements doc
2. Parallel testing - Test it against competitor and peer products
3. Scenario testing - Assume different scenarios for different kinds of end users.
4. Usability testing - Based on usage of the product
5. Function testing - Based on functionality
6. Fault Injection - Inject problems
7. Stress testing - Stress it out
8. Performance testing - metrics
9. Regulations - specs

A blog article on all possible test scenarios for a stapler is available in the following location:
http://www.testingreflections.com/node/view/928

Monday, September 07, 2009

Installing thunderbird on Jaunty Ubuntu Linux

Do:
sudo apt-get install thunderbird

Go to: Applications --> Internet --> Thunderbird

To login as root in Ubuntu Jaunty, do:
sudo bash
enter your user password when it prompts for password. You become root then.

Install vpn client on Ubuntu linux - jaunty

mkdir vpnclient

Change to that directory:

cd vpnclient

* Download cisco-decrypt file which will be used to decrypt the group password from your pcf file:

wget http://www.debuntu.org/files/cisco-decrypt.c

sudo apt-get install libgcrypt11-dev

gcc -Wall -o cisco-decrypt cisco-decrypt.c $(libgcrypt-config --libs --cflags)

chmod +x cisco-decrypt

sudo cp cisco-decrypt /usr/bin

* Download pcf2vpnc to convert pcf files in vpnc configuration format

wget http://svn.unix-ag.uni-kl.de/vpnc/trunk/pcf2vpnc

chmod +x pcf2vpnc

sudo cp pcf2vpnc /usr/bin

* Go to windows vpn profiles directory and convert .pcf files to .conf files

pcf2vpnc cisco.pcf > cisco.conf

Note:replace above cisco.pcf with your own .pcf file.

sudo cp cisco.conf /etc/vpnc/

* install vpnc and connect to vpn

sudo apt-get install vpnc resolvconf

sudo vpnc cisco

Enter username for :
Enter password for :
VPNC started in background (pid: 6092)…

* To disconnect simply do

sudo vpnc-disconnect

Source:
=======
http://www.ubuntugeek.com/how-to-setup-cisco-vpn-using-vpnc-ubuntu-jaunty-9-04.html

Wednesday, August 26, 2009

How to find out if solaris machine is 32 or 64 bits?

# /usr/bin/isainfo -kv
64-bit amd64 kernel modules

# uname -a
SunOS jack 5.10 Generic_137138-09 i86pc i386 i86pc

# cat /etc/release
Solaris 10 10/08 s10x_u6wos_07b X86
Copyright 2008 Sun Microsystems, Inc. All Rights Reserved.
Use is subject to license terms.
Assembled 27 October 2008

Configure FTP for root logins

1. Remove 'root' line from /etc/ftpusers.

2. Edit file /etc/ftpaccess and comment out 'deny-uid' and 'deny-gid' lines. If the file doesn't exist, there is no need to create it.

NOTE: If you are using Solaris 9 or Solaris 10, the ftp* files are located in /etc/ftpd

Configure Telnet for root logins

Edit file /etc/default/login and comment out the following line as follows:
# If CONSOLE is set, root can only login on that device.
# Comment this line out to allow remote login by root.
#
# CONSOLE=/dev/console

Enable ssh root login in Solaris 10

1. Change the file /etc/ssh/sshd_config with PermitRootLogin yes to replace PermitRootLogin no

2. restart the services
#svcadm restart svc:/network/ssh:default

Thursday, August 06, 2009

Booting solaris from CD

Open terminal
Enter command: halt in command line. White screen will appear.
Enter command: boot cdroom

Saturday, July 18, 2009

create and delete a soft link on solaris

To create a symbolic link, enter
--------------------------------
$ ln -s {/path/to/file-name} {link-name}
$ ln -s /shared/sales/data/file.txt foo.txt
$ ls -l foo.txt

To delete a link, enter
-----------------------
$ rm {link-name}
$ rm foo.txt
$ ls -l
$ ls -l /shared/sales/data/file.txt

Friday, July 17, 2009

Idhi chala hot guru!

Listen to Hyderabad Radio Mirchi 98.3 FM Online live streaming in
http://www.voicevibes.net

Monday, July 13, 2009

USCIS - Change of Address rule

USCIS regulations require aliens to notify the Attorney General in
writing of a change of address within 10 days of the change. USCIS has
confirmed that this requirement applies to all immigrants and
non-immigrants in the U.S. The AR-11 change of address form can be
completed online at the following link:
https://egov.uscis.gov/crisgwi/go?action=coa.

Please note, in addition to the online AR-11 form, you must also update
your address online for each pending application with USCIS.
Instructions can be found at the link above. You do not need to submit
address-changes for approved petitions.

Thursday, March 12, 2009

Opinions on some trivial questions

Why do you wish a person "many happy returns of the day" on their birthday?

The happy returns on your birthday refer to solar returns - the moment when the sun returns to the zodiac sign and degree it occupied at your birth. A horoscope is drawn up for the precise moment of your solar return, in order to predict your year ahead - hopefully a happy one!
Jessica Adams, North Sydney

It began as an occult wish, recalling our birth and anticipating the next life: that we shall come back as, say Attila the Hun rather than Attila's horse, or Cleopatra rather than one of her eunuchs.
Paul Roberts, Lake Cathie

You are wishing them that their birthday will "return" again - many times i.e. that they will have a long life.
Amber Jones, Surry Hills

This phrase came into use when people revolved around their families (before the days of confuddling and befusing technological contraptions) and they would, when it came to their birthdays, go home to their families to celebrate with the family. When they said "many happy returns" it meant "We hope you have many more happy days like that returning to your family..."
Cam Wilson, Warrawee


Why, from newborn babyhood onward, do people rub their eyes when they're tired?

From observations of my own two daughters, I think the reason is that as we become tired and as we go to sleep, one of the first signs is our eyes become tired and eyelids start to droop. This makes our eyes a little irritated and it is a natural response to rub them. It also helps us keep awake if we don't want to go to sleep. I know that when my daughters were young, they would fight to the death to stay up and continue playing, continually rubbing their eyes to stay awake.
John Frith, Paddington

Rubbing your eyes causes your heart rate to slow down, preparing your body for sleep. The outer eyes contain the rectus muscles, which are responsible for moving our eyeballs. When you rub your eyes, and apply pressure to these muscles, you also stimulate the vagus nerve that runs along side the rectus muscles. The vagus nerve has many functions, one of which is controlling heart rate.
David Buley, Seaforth

It pressures the rectus muscles in the outer eye, which in turn stimulate the vagus nerve. The nerve causes the heart rate to slow, enabling us to sleep more easily. Unfortunately, grubby knuckles often introduce eye infections in this way.
Paul Roberts, Lake Cathie

What determines if an event will be stored in your short-term or long-term memory?

It depends on how many times you are told it/repeat it. Interestingly, a person with an IQ of 90-110 has to hear something seven times to commit it to long-term memory. Someone with an IQ of 130-140 must hear it three times. And someone with an IQ of 160 or above can remember something after hearing it once. This, of course, leads to the question, does Stephen Hawking remember things before he hears them?
Cam Wilson, Warrawee

The former you really don't care about or signifies no betterment or detriment of the person and the latter has a lasting impact on oneself, hence the brain remembers.
Luke Toland, Burwood

Dunno, but I clearly remember a blouse that a colleague once wore at work when we were only 17. I'm now 63 and sometimes forget where my bathroom is!
Sandy Parkinson, Hilton WA

Long term memories are reinforced repeatedly by experience in a highly systematised data base. Many sensory experiences combine to extract memories through several types of association. Take graveyard. I grew up overlooking one retaining all my ancestors, excavated a few holes there myself and once had a part in Hamlet. Short term memories are briefly processed for a short term need. A young man will remember a girls phone number just as long as it takes him to finish another drink or meet someone sexier.
Paul Roberts, Lake Cathie

This is determined by the time limit applied at trivia nights: usually the recollection of an event becomes vividly stark, the moment the quizmaster closes answers for that particular round.
Bob Dengate, Bathurst

In cricket, why do bowlers bowl from both ends of the wicket? Wouldn't it be better and save time if just the batsmen swapped ends, rather than rearranging the field?

Cricketers change ends to give those fieldsmen who have been standing around doing nothing but getting sunburnt a little exercise and a change of solar aspect. It also helps to even out the pitch stress at the batter's end and the bowling run-up area.
J. Barrie Brown, Gordon

So Warney can bowl into the foot marks.
Simon Goldschmidt, Darlinghurst

If you did that, you might as well play baseball, a game of far less variety, complexity, imagination and subtlety.
Nick Herd, Clovelly

Saving time by batsmen changing ends. A good idea! But it would save even more time if the winner was the captain who called the toss correctly, and then everyone went home without having to be bored rigid by the playing, and worse, the commentators.
David Bishop, Port Macquarie

Oscar Wilde summed up cricket as organised loafing. The whole idea is to waste as much time as possible. It is the perfect antidote to the work ethic and as close as you'll get in sport to looking at a lighted candle chanting Ohm.
Paul Roberts, Lake Cathie

Why the batsmen don't swap? An innovation that cuts ad time is unlikely to make it.
David Ash, Bondi Beach

(a) It helps even out the wear on the turf.

(b) It gives the outfielders something to do to avoid falling asleep.

(c) To ensure that one bowler/player may not always be facing in to the sun (only really relevant outside UK).

(d) Allows for spectators to buy another beer without missing play.

(e) It helps drag out an already long and arduous game

(f) They have always done it that way?
Trevor Doornbos, East Ryde

Essentially, changing ends shares the wear of batting and bowling on the turf and enables the pitch to last longer. It also made for a more challenging game as the batsmen had to adapt to changing wind direction and sun glare while on the changeover, the fielding team could also discuss tactics. Conversely, it also enabled the batsman to get some relief from the bowlers every so often. In the early days of cricket, once a bowler started at one end, he had to only bowl from that end but in 1889 the rules were changed to allow a bowler to change ends as often as he likes in an innings (subject to not bowling two consecutive overs).
David Buley, Seaforth

Can you imagine a game at Old Trafford where Brian Statham didn't hold on to his end?
Bob Dengate, Bathurst

Source: http://www.smh.com.au/news/big-questions/why-do-you-wish-a-person-many-happy-returns-of-the-day-on-theirbirthday/2005/08/25/1124562965035.html

Wednesday, March 11, 2009

Cinderalla Man

Watch the movie "Cinderalla Man". It is based on a true story.
This movie shows importance of strong character and determination in life to bounce back. Truly inspiring.

Friday, February 20, 2009

Why we love cats and dogs...

http://www.pbs.org/


Few useful scripts

Getting directory size in unix
-------------------------------
This little hackish script gets you the exact size of a directory
(recursively) in bytes. It's nothing fancy, we just trick rsync
into telling us and scrub the output.

Script:
-------
#!/bin/bash

DIR=${1?Specify a directory}

[ -d "$DIR" ] || { echo "Not a directory: $DIR" && exit 1; }

# We don't actually copy anything (-n is --dry-run)
rsync -n -r "$DIR" /dev/null/ | tail -n1 | perl -pe 's/.*size is ([0-9]+) .*/$1/'

***************************************************

Grep a class name in a jar
---------------------------
Usage:
-------
$ grepjar EXP JARS...
$ grepjar MyClass myapp.jar

Usable with find.
find ~/.m2/repository/ -name '*.jar' -exec grepjar.sh MyClass {} \;

Or find and xargs
find ~/.m2/repository/ -name '*.jar' | xargs grepjar.sh MyClass

Script:
-------
#!/bin/bash

EXP=${1?must specify a pattern}
shift

for n in "$@"; do
jar tvf "$n" | egrep "$EXP"
[ $? -eq 0 ] && echo "$n"
done

***************************************************

Relative to Absolute file path conversions:
-------------------------------------------
Here is a little perl script that can turn relative file paths into absolute file paths.
Couldn't find a command for it, so this is the next best thing.

put this in a bin directory in your path somewhere
rel2abs

#!/usr/bin/perl
use File::Spec;
foreach (@ARGV) {
push @files, File::Spec->rel2abs($_);
}
print join(" ",@files) . "\n";

then just chmod it

# chmod 755 /usr/local/bin/rel2abs

then run it

# rel2abs ~/././*
/root/anaconda-ks.cfg /root/Desktop /root/install.log /root/install.log.syslog /root/setup.txt

***************************************************
Source: http://docs.codehaus.org/display/ninja/Home

Wednesday, February 18, 2009

Finding MAC address on Solaris 10

For users with no root permission:
arp host-name

Saturday, February 14, 2009

Thursday, February 05, 2009

Obama's inaugural address photo

This is a photo taken using a panorama image
capturing device called Gigapan created by
the Carnegie Mellon university and a Canon
G10 camera.

The photographer had to click 220 snaps from
that camera to get this complete view of
Obama's inaugural address. It took a Macbook
Pro around 7hours to process the complete
image.

click here to look at the image.
http://gigapan.org/viewGigapanFullscreen.php

Thursday, January 29, 2009

Allow users to do remote login through terminal services

http://technet.microsoft.com/en-us/library/cc781509.aspx

Tip:
To open group policy object editor, you need not add a snap gpedit.msc in Windows Start menu. This is a short cut.

Monday, January 12, 2009

fold it...

If vi editor complains that line is too long, then do the following.
1. Close the file.
2. use fold command as - fold debug.out > debug_fold.out
3. Use debug_fold.out

Sunday, January 11, 2009

Configuring Reverse Proxy in few secs.

Sometimes we may have to configure a load balancer in front of bunch of web servers or just one web server to test some problem. Configuring load balancer could take time. A simple way to do this is to configure reverse proxy plugin in a web server or an app server that is already deployed. It takes few seconds to do this.

For ex: If you have Sun Web sever 7.0 configured, it takes few seconds to do this.

Click on Configurations tab and select the configuration.
Click Virtual Servers tab and select the virtual server.
Click Content Handling > Reverse Proxy tab.
Click New Proxy URI button.

Specify values for the following parameters:
URI - The reverse proxy URI
Server URL - Comma separated URLs of the remote server.
If multiple values are given, the server will distribute load among the specified servers.

If you want to simply route all requests to another web server or app server you can say
URI - /
Server URL - http://avatar.red.iplanet.com:80/opensso

Let us say this reverse proxy plugin is configured on http://bull.red.iplanet.com:5555
webserver, with above paramters, any http request to bull.red.iplanet.com:5555 will be routed
to avatar.red.iplanet.com:80 and user accessing bull,red,iplanet.com:80 will never know that
he is indeed accessing avatar.red.iplanet.com:80.