Tuesday, April 18, 2006

Forgot password for Windows 2000?

well, this trick can work only if you have got a dual boot machine with linux as one of the os. Also, either you should be a root or the windows partition should be mounten with appropriate permission.

just delete the file
and you are done. you can boot your machine in windows and can get entry with
user : administrator
passwd :

leave the password field null.

Saturday, April 15, 2006

Running commands using script

#Written by Vaibhav.
#guptav[at]cse[dot]iitb[dot]ac[dot]in on Mon Mar 7

use Expect;
#List of IPs in file 'IPS'
close IP;
my $newpassword = "yourpassword";

foreach $ip(@IPS) {
chomp $ip;
print "-------$ip-------\n";
my $timeout = 50;
my $aft = new Expect;
$aft->spawn("ssh $ip")
or die "Cannot ssh to the machine \n";
$aft->expect($timeout,'-re','\? $');
$aft->expect($timeout,'-re','password: $');
$aft->expect($timeout,'-re','# $');
$aft->send("ls\n"); # OR LIST OF COMMANDS
$aft->expect($timeout,'-re','# $');