LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 11-19-2012, 02:27 AM   #1
unixedway
LQ Newbie
 
Registered: Mar 2009
Distribution: Suse , Mint
Posts: 14

Rep: Reputation: 1
decrypt linux passwords


Is ther anyway to decrypt the passwords in /etc/shadow ? if i have a root password and i want to know some users passwords .
Iam asking this not to know people passwords but i need to migrate old imap mail system to another one and the migration tool needs the mailbox username and password.
i found some info that stats linux using irreversible DES algorithm .any ideas?

Thank you
 
Old 11-19-2012, 03:04 AM   #2
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,831

Rep: Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285
I think there is no such tool, so you cannot recover password from /etc/shadow
 
Old 11-19-2012, 05:17 AM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
Passwords are hashed (you can see it as one way encryption) before they are stored. There is no way to reverse the process except with brute force.

There is no need for you to know their passwords. You can always become the specific user once you're root.

And 'cracking' user's passwords is an abuse of your root powers.
 
Old 11-19-2012, 05:56 AM   #4
unixedway
LQ Newbie
 
Registered: Mar 2009
Distribution: Suse , Mint
Posts: 14

Original Poster
Rep: Reputation: 1
as i said in my post i need to migrate from old mail system to another and the migration needs password to access the user cyrus mailbox


Quote:
Originally Posted by Wim Sturkenboom View Post
Passwords are hashed (you can see it as one way encryption) before they are stored. There is no way to reverse the process except with brute force.

There is no need for you to know their passwords. You can always become the specific user once you're root.

And 'cracking' user's passwords is an abuse of your root powers.
 
Old 11-19-2012, 06:00 AM   #5
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,831

Rep: Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285
ask users to save their mails, you will not be able to migrate them (if the old system is not fully compatible with the new one)
 
Old 11-19-2012, 06:14 AM   #6
unixedway
LQ Newbie
 
Registered: Mar 2009
Distribution: Suse , Mint
Posts: 14

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by pan64 View Post
ask users to save their mails, you will not be able to migrate them (if the old system is not fully compatible with the new one)
There is a migration tool but need passwords, yes its not compatible the old one is cyrus and postfix and the new is zimbra , iam just trying to make things easer for users , i hope they can to the new system and find everything as it is , and the big problem is i cant export the users passwords to the new mail coz zimbra uses ldap i have to give them new passwords , i think its realy bad for large sites
 
Old 11-19-2012, 06:52 AM   #7
sundialsvcs
Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 5,381

Rep: Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109Reputation: 1109
You ought to be able to migrate the data by accessing the storage database of that IMAP server directly.

Or, perhaps you can show users how to "push" their mailbox contents into your new server.

Perhaps you can "force-change" their passwords on the old system if it is now permanently offline. If it is not, then in any case you will have to in some way cooperate with them.
 
Old 11-19-2012, 04:38 PM   #8
wpeckham
Member
 
Registered: Apr 2010
Location: USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix
Posts: 775

Rep: Reputation: 173Reputation: 173
Passwords

That hash is a B1T(H to break, it can take months of continuous processing (and then the result is not assured). Do not waste your time.

If the users are not yet on the second system, and the crypt libs are compatible, migrate the account INCLUDING the passwords from the old server to the new. While you cannot break the hash, you CAN copy it and use it to load the new system! (I will not tell you how old this trick is, but the guy that taught it to me has retired for more than 20 years!)
 
Old 11-19-2012, 04:45 PM   #9
foodown
Member
 
Registered: Jun 2009
Location: Texas
Distribution: Slackware
Posts: 609

Rep: Reputation: 218Reputation: 218Reputation: 218
Quote:
Originally Posted by unixedway View Post
Is ther anyway to decrypt the passwords in /etc/shadow ? if i have a root password and i want to know some users passwords .
Iam asking this not to know people passwords but i need to migrate old imap mail system to another one and the migration tool needs the mailbox username and password.
i found some info that stats linux using irreversible DES algorithm .any ideas?

Thank you
You should not do that.

How many users are we talking about?

You could always (during a window where the services were made inaccessible) make a copy of the shadow file, then remove the hashes entirely (which will make their passwords ""), do your migrations, and then put the original shadow file back into place.

It's a pretty jank way to do it, but it'd work.

(EDIT: Cracking passwords, even for arguably "well meaning" reasons, is unethical; it doesn't stand up to the test of reciprocity, at least not from over here.)

Last edited by foodown; 11-19-2012 at 04:48 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to encrypt / decrypt passwords in a file vicosobase Linux - Newbie 3 08-14-2012 03:07 PM
encrypt/decrypt from linux console ReshmiS Linux - Newbie 3 02-09-2010 01:00 AM
Decrypt Password in linux abrenar Linux - Software 8 03-03-2009 01:59 PM
Encrypt/Decrypt file in Linux , How to ? shipon_97 Linux - Newbie 1 09-05-2007 03:35 AM
Is there a way to sync Samba passwords with linux user passwords MarleyGPN Linux - Networking 2 09-09-2003 10:59 AM


All times are GMT -5. The time now is 11:41 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
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration