Sponsored Content
Full Discussion: Password Recovery
Special Forums Cybersecurity Password Recovery Post 302069788 by jallport on Wednesday 29th of March 2006 07:53:44 AM
Old 03-29-2006
PLEASE NOTE: I do not condone the cracking of other people's passwords for anything other than authorised penetration testing and security analysis.

However, if you have 'forgotten' a password for one of your own boxes and still have telnet/SSH access to the box via another account you could try this:

[Summary]
You'll need an offline copy of /etc/passwd and something to generate hashes against a wordlist or brute-force strings.

[Method]
You could 'cat /etc/passwd' and copy/paste from puTTY to (e.g.) Notepad [I assume you're SSH'ing from a Windoze box since you're using puTTY]

You then need something like John The Ripper, a quick machine, and patience.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to password recovery on Ultrix

I got myself a dec 5100 running ultrix with unknow password, how do i recover or change the root password on it? (10 Replies)
Discussion started by: cybermike
10 Replies

2. UNIX for Dummies Questions & Answers

Password recovery

We recently terminated a developer at my place of employment who created scripts on a windows server (that i do not have access to) that invoke FTP sessions on my UnixWare 7.1.1 servers. I need to know the password that is being used. Does anyone know of a good password crack? (8 Replies)
Discussion started by: rm -r *
8 Replies

3. Shell Programming and Scripting

help for db password recovery

hi,all my database (.db) is created by sysbase adaptive server anywhere7.0 ! the user id is DBA. but I lost the password . Could you recovery the passwrod of this db file? thanks ! iwind (1 Reply)
Discussion started by: northwind
1 Replies

4. UNIX for Dummies Questions & Answers

Password Recovery

Hi, I am new to unix and I set a password for a user and now I need to recover what that password was. Is there a way, where as root, I can view what a users passwords is? Thanks, Eric (2 Replies)
Discussion started by: ejbrever
2 Replies

5. Forum Support Area for Unregistered Users & Account Problems

password recovery

hello, my password got lost - and your service to generate new passwords does not work -ive tried it out 50 times the last week or so, never got a single mail from it... please generate a new password for my account "congo" with mailadress. thanks. Thomas (3 Replies)
Discussion started by: congo00000001
3 Replies

6. UNIX for Dummies Questions & Answers

Solaris 8 password recovery plz HELP!!!!!

Hello board, I'm new to Solaris Linux world, trying to learn on my onw, as I notice the windows is a big fraud.... OK let me get to my issue: I have a SOlaris 8 X86 that I don;t have a password and even the screen is disabled(assuming for the security reasons) I just see a... (8 Replies)
Discussion started by: nexOne
8 Replies

7. Solaris

Password Recovery From /etc/shadow file

Is it possible to reset a normal user password , by editing password field in /etc/shadow file? Thanks (6 Replies)
Discussion started by: ksvaisakh
6 Replies

8. Cybersecurity

password recovery

I am trying to access an old email account but cannot recall the password and the backup email account has been closed, also. I need instructions or an expert who can assist recovering my password for web-based email account. (4 Replies)
Discussion started by: pp_mcgee
4 Replies

9. Shell Programming and Scripting

bash script for password recovery

Hi all, I'm a complete newbie to bash scripting, although I have some experience in programming. The thing is that I have a .dmg file on my mac which I protected with a password, and now I've forgotten it. I remember the first few letters of the password and the characters that represent the... (4 Replies)
Discussion started by: sujay.jauhar
4 Replies

10. Homework & Coursework Questions

Password recovery in login script help

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Hi guys. My case study is about creating a script that includes password recovery whenever a user forgets... (1 Reply)
Discussion started by: jenimesh19
1 Replies
PAM::FAQ(3)						User Contributed Perl Documentation					       PAM::FAQ(3)

NAME
Authen::PAM::FAQ - Frequently-Asked Questions about Authen::PAM. SYNOPSIS
perldoc Authen::PAM::FAQ VERSION
This document is currently at version 0.05, as of May 4, 2005 DESCRIPTION
1. Can I authenticate a user non interactively? Yes, you can although not in a very clean way. The PAM library has a mechanism, in a form of a conversation function, to send and receive text data from the user. For details of the format of the conversation function consult the Authen::PAM manual. This function receives a list of code/string pairs. There are two codes (PAM_TEXT_INFO and PAM_ERROR_MSG) for displaying the associated string to the user and two codes (PAM_ECHO_ON and PAM_ECHO_OFF) for getting input from the user. As you can see the codes are rather general and you can not be com- pletely sure when you are asked for a user name and when for a password. However, the common practice is that PAM_ECHO_ON is used for a user name and PAM_ECHO_OFF is used for a password. So, what you can do is to write your own conversation function which ignores the PAM_TEXT_INFO and PAM_ERROR_MSG codes and returns the user name for the code PAM_ECHO_ON and the password for the code PAM_ECHO_OFF. If you pass the user name in the initialization function then usually you will not be asked for it. Here is a simple example how to do this: use Authen::PAM; use POSIX qw(ttyname); $service = "login"; $username = "foo"; $password = "bar"; $tty_name = ttyname(fileno(STDIN)); sub my_conv_func { my @res; while ( @_ ) { my $code = shift; my $msg = shift; my $ans = ""; $ans = $username if ($code == PAM_PROMPT_ECHO_ON() ); $ans = $password if ($code == PAM_PROMPT_ECHO_OFF() ); push @res, (PAM_SUCCESS(),$ans); } push @res, PAM_SUCCESS(); return @res; } ref($pamh = new Authen::PAM($service, $username, &my_conv_func)) || die "Error code $pamh during PAM init!"; $res = $pamh->pam_set_item(PAM_TTY(), $tty_name); $res = $pamh->pam_authenticate; print $pamh->pam_strerror($res)," " unless $res == PAM_SUCCESS(); The Authen::PAM module comes with a default conversation function which you can find in the file PAM.pm. 2. Can I change a password non interactively? All the discussion of the previous question also applies here. There is however one serious complication. When changing a password it is quite possible that the PAM library will send you at lest two PAM_ECHO_OFF prompts - one for the old password and one or two for the new one. Therefore, the first thing you should do is to see what sequence of prompts is produced by your service. Then the conversation func- tion should include some state variable to distinguish the different prompts. Here is an example: use Authen::PAM; $service = "passwd"; $username = "foo"; $oldpassword = "old_pass"; $newpassword = "new_pass"; sub my_conv_func { my @res; while ( @_ ) { my $code = shift; my $msg = shift; my $ans = ""; $ans = $username if ($code == PAM_PROMPT_ECHO_ON() ); if ($code == PAM_PROMPT_ECHO_OFF() ) { $ans = $oldpassword if ($state == 0); $ans = $newpassword if ($state == 1); $ans = $newpassword if ($state == 2); $state++; } push @res, (PAM_SUCCESS(),$ans); } push @res, PAM_SUCCESS(); return @res; } ref($pamh = new Authen::PAM($service, $username, &my_conv_func)) || die "Error code $pamh during PAM init!"; $state = 0; $res = $pamh->pam_chauthtok; print $pamh->pam_strerror($res)," " unless $res == PAM_SUCCESS(); If you are running the script as root then most likely you will not be prompted for an old password. In this case you can simply return the new password at the ECHO_OFF prompt. The $msg variable contains the text of the input prompt which you can use for additional test or for debugging purposes, e.g. if ($code == PAM_PROMPT_ECHO_OFF() ) { if ($state>=1 || $msg=~/new/i) { # are we asked for a new password $ans = $newpassword; } else { $ans = $oldpassword; } $state++; } 3. Why are the constants PAM_AUTHTOK and PAM_OLDAUTHTOK not avaliable? The PAM_AUTHTOK and PAM_OLDAUTHTOK items can be used to pass authentication tokens (passwords) from one module to another. However, they are avaliable only to PAM modules and not to PAM applicatinos. If you have a special setup in which you really need to preset the password from the application (e.g. using a radius server) then you can use the pam_set_authtok module avaliable from <http://www.uni-hohen- heim.de/~schaefer/linux/pam/pam_set_authtok.html>. SEE ALSO
Authen::PAM AUTHOR
Nikolay Pelov <NIKIP at cpan.org> COPYRIGHT
Copyright (c) 1998-2005 Nikolay Pelov. All rights reserved. This file is part of the Authen::PAM library. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.8.4 2005-06-30 PAM::FAQ(3)
All times are GMT -4. The time now is 09:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy