Forum Moderators: bakedjake
The first trick would be for you to find out what kind of encryption system is standard on your box(es). There are many different types, and it's easy to determine once you look at the shadow files.
These are the standard types of encrypted passwords on *NIX systems and what they look like in a shadow file:
DES/crypt: abJnggxhB/yWI
MD5: $1$L/321sYmS$ygjf8.6wKiHfNF3rir2ca/
Blowfish: $2$
NT-Hash $3$
This is from my FreeBSD system, check your crypt(3) man page for more details on the salt types.
Once you've determined your salt type, which is most likely MD5, you could try to use something like crypt-pw (available at [freshmeat.net...] (Note: you need to build from source with ./configure && make) for crypt, and something that will generate MD5 passwords for you (I tried out [ripe.net...] briefly ), and there you can generate a test password to try out.
If you don't want to use an online service, you can write your own program that will spit out the MD5 password. Should be straight-forward, and I wrote a quickie Perl program that should do what you need, based on Crypt::PasswdMD5 ( [cpan.uwinnipeg.ca...] )
#!/usr/bin/perluse Crypt::PasswdMD5;
my $password = @ARGV[0];
$cryptedpassword = unix_md5_crypt($password, $salt);
print "$cryptedpassword\n";
The above takes the password as the argument.