LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 11-08-2009, 07:35 AM   #1
mrlinux2000
Member
 
Registered: Feb 2008
Posts: 144

Rep: Reputation: 15
Lost password


Hello Folks
am a linux admisnistrator "Root", one of my users lost his password and i want to get it back , am using fedora core 3 how can that be done ... am waiting for any kind of help

thank you so much
 
Old 11-08-2009, 07:49 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I think you have to simply assign the user a new password using "passwd username". Replace "username" with the name of your user.
 
Old 11-08-2009, 08:16 AM   #3
JamesChamberlain
Member
 
Registered: Sep 2009
Location: Wirral, UK
Distribution: Red Hat Enterprise Linux / Fedora 11
Posts: 47

Rep: Reputation: 18
You've lost the root password?
Or do you want to change a user password?

Root password can be reset by booting into single user mode.
User password can be reset by doing '# passwd user' as root.
 
Old 11-08-2009, 09:02 AM   #4
mrlinux2000
Member
 
Registered: Feb 2008
Posts: 144

Original Poster
Rep: Reputation: 15
i want to get a passwrod for a user not root and not changing it ...
 
Old 11-08-2009, 09:15 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
You did not respond to my reply in the duplicate thread. I do not believe you can recover a password---I think you have to assign a new one.
 
Old 11-08-2009, 09:26 AM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
The second field of /etc/shadow is the encrypted password of the user. If you have a recent backup you can add that password back by getting it out of the old /etc/shadow and pasting it into the current one.
 
Old 11-08-2009, 09:51 AM   #7
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by jlightner View Post
The second field of /etc/shadow is the encrypted password of the user. If you have a recent backup you can add that password back by getting it out of the old /etc/shadow and pasting it into the current one.
Good point---I never backup stuff in /etc so this obvious option did not make it into my brain....
 
Old 11-08-2009, 09:58 AM   #8
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
Linux passwords are stored using a one-way encryption system. Whenever the password is typed in, it is encrypted into an encoded format. To verify a user's login, the system just compares the encrypted forms.

There is no reverse algorithm for the encryption. If you want to find out the user's password, then the only way to do it is to try every possible combination until you find a match. If it was possible to easily reverse-engineer the password from its encrypted form, then securing the password would be much harder.
 
Old 11-08-2009, 10:03 AM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by jlightner View Post
The second field of /etc/shadow is the encrypted password of the user. If you have a recent backup you can add that password back by getting it out of the old /etc/shadow and pasting it into the current one.
But that does not help if the user has lost his/her password......
 
Old 11-08-2009, 10:18 AM   #10
pcunix
Member
 
Registered: Dec 2004
Location: MA
Distribution: Various
Posts: 149

Rep: Reputation: 23
Yes, there is a reverse.

See [LINK REMOVED BY MODERATOR] for an example of using John the Ripper to check passwords to be sure they aren't easy to crack by such tools.

True, you can't be CERTAIN that was the password, but the chances are good.



// pcunix, the LQ Rules make it clear that this isn't the place to receive or provide help with cracking.

Last edited by win32sux; 11-08-2009 at 11:06 AM.
 
Old 11-08-2009, 10:53 AM   #11
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by pcunix View Post
Yes, there is a reverse.
No, there isn't. A password cracker can't generate the password from the hash. It generates its own hash from its own password and compares the result with the original hash. The direction of the operation isn't reversed at any point.
 
Old 11-08-2009, 10:59 AM   #12
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by mrlinux2000 View Post
i want to get a passwrod for a user not root and not changing it ...
Why don't you want to change it?
 
Old 11-08-2009, 11:02 AM   #13
pcunix
Member
 
Registered: Dec 2004
Location: MA
Distribution: Various
Posts: 149

Rep: Reputation: 23
Quote:
Originally Posted by win32sux View Post
No, there isn't. A password cracker can't generate the password from the hash. It generates its own hash from its own password and compares the result with the original hash. The direction of the operation isn't reversed at any point.
Exactly. And almost always, that IS the original password. The link I gave shows a good example of that where the user password was "fred123". The ripper found exactly that quickly.

That IS a reversal. A brute force reversal, but a reversal none the less.
 
Old 11-08-2009, 11:34 AM   #14
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by pcunix View Post
That IS a reversal. A brute force reversal, but a reversal none the less.
Any type of password cracking which uses guessing (this includes both brute force and dictionary) is NOT doing anything in reverse. It's the exact same operation which was done when the original password hash was originally created, the difference being that you're doing it a gazillion times and the resulting hash of each guess is compared to see if it matches the original one. It's not reversal, the direction remains the same. You're just doing tons of comparison.

Last edited by win32sux; 11-08-2009 at 11:39 AM.
 
Old 11-08-2009, 11:56 AM   #15
pcunix
Member
 
Registered: Dec 2004
Location: MA
Distribution: Various
Posts: 149

Rep: Reputation: 23
Quote:
Originally Posted by pcunix View Post

// pcunix, the LQ Rules make it clear that this isn't the place to receive or provide help with cracking.

The purpose of that is to help administrators detect weak passwords. It's not a cracking tool as you need root to be able to use it!


You know, I understand the need for rules. But I'm getting a bit annoyed by the silliness of some of them.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
need help lost password wrighty2008 Linux - Laptop and Netbook 3 01-05-2009 01:22 AM
Lost Password ockertom Linux - Software 5 03-19-2007 11:49 PM
Lost password mijohnst Linux - Security 2 04-06-2004 04:02 PM
lost password waxiem Linux - Software 5 07-04-2003 10:00 AM
Lost my password dlandsurveys Slackware 6 01-28-2003 08:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration