LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux > 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
 
Thread Tools
Old 11-08-2009, 08:35 AM   #1
mrlinux2000
Member
 
Registered: Feb 2008
Posts: 118
Thanked: 0
Lost password


[Log in to get rid of this advertisement]
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
windows_xp_2003 mrlinux2000 is offline     Reply With Quote
Old 11-08-2009, 08:49 AM   #2
pixellany
Moderator
 
Registered: Nov 2005
Location: Pasadena, CA
Distribution: Arch
Posts: 13,165
Thanked: 285
I think you have to simply assign the user a new password using "passwd username". Replace "username" with the name of your user.
linux pixellany is offline     Reply With Quote
Old 11-08-2009, 09:16 AM   #3
JamesChamberlain
Member
 
Registered: Sep 2009
Location: Wirral, UK
Distribution: Red Hat Enterprise Linux / Fedora 11
Posts: 47
Thanked: 4
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.
windows_98_nt_2000 JamesChamberlain is offline     Reply With Quote
Old 11-08-2009, 10:02 AM   #4
mrlinux2000
Member
 
Registered: Feb 2008
Posts: 118
Thanked: 0

Original Poster
i want to get a passwrod for a user not root and not changing it ...
windows_xp_2003 mrlinux2000 is offline     Reply With Quote
Old 11-08-2009, 10:15 AM   #5
pixellany
Moderator
 
Registered: Nov 2005
Location: Pasadena, CA
Distribution: Arch
Posts: 13,165
Thanked: 285
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.
linux pixellany is offline     Reply With Quote
Old 11-08-2009, 10:26 AM   #6
jlightner
Senior Member
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 3,548
Thanked: 145
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.
jlightner is offline     Reply With Quote
Old 11-08-2009, 10:51 AM   #7
pixellany
Moderator
 
Registered: Nov 2005
Location: Pasadena, CA
Distribution: Arch
Posts: 13,165
Thanked: 285
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....
linux pixellany is offline     Reply With Quote
Old 11-08-2009, 10:58 AM   #8
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,969
Thanked: 19
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.
linuxubuntu rjlee is offline     Reply With Quote
Old 11-08-2009, 11:03 AM   #9
pixellany
Moderator
 
Registered: Nov 2005
Location: Pasadena, CA
Distribution: Arch
Posts: 13,165
Thanked: 285
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......
linux pixellany is offline     Reply With Quote
Old 11-08-2009, 11:18 AM   #10
pcunix
Member
 
Registered: Dec 2004
Location: MA
Distribution: Various
Posts: 127
Thanked: 12
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 12:06 PM..
macos pcunix is offline     Reply With Quote
Old 11-08-2009, 11:53 AM   #11
win32sux
Moderator
 
Registered: Jul 2003
Distribution: Ubuntu 8.10
Posts: 8,607
Thanked: 108
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.
linuxubuntu win32sux is offline     Reply With Quote
Old 11-08-2009, 11:59 AM   #12
win32sux
Moderator
 
Registered: Jul 2003
Distribution: Ubuntu 8.10
Posts: 8,607
Thanked: 108
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?
linuxubuntu win32sux is offline     Reply With Quote
Old 11-08-2009, 12:02 PM   #13
pcunix
Member
 
Registered: Dec 2004
Location: MA
Distribution: Various
Posts: 127
Thanked: 12
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.
macos pcunix is offline     Reply With Quote
Old 11-08-2009, 12:34 PM   #14
win32sux
Moderator
 
Registered: Jul 2003
Distribution: Ubuntu 8.10
Posts: 8,607
Thanked: 108
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 12:39 PM..
linuxubuntu win32sux is offline     Reply With Quote
Old 11-08-2009, 12:56 PM   #15
pcunix
Member
 
Registered: Dec 2004
Location: MA
Distribution: Various
Posts: 127
Thanked: 12
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.
macos pcunix is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 02:22 AM
Lost Password ockertom Linux - Software 5 03-20-2007 12:49 AM
Lost password mijohnst Linux - Security 2 04-06-2004 05:02 PM
lost password waxiem Linux - Software 5 07-04-2003 11:00 AM
Lost my password dlandsurveys Slackware 6 01-28-2003 09:46 AM


All times are GMT -5. The time now is 06:29 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration