LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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
 
LinkBack Search this Thread
Old 12-23-2003, 05:23 AM   #1
trouby
Member
 
Registered: Sep 2003
Posts: 59

Rep: Reputation: 15
Create MD5 hash from string


Hey,

Is there any tool to create a hashed MD5 string ? many applications starting to support the password field encrypted starting with {MD5}.

Thanks.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 12-23-2003, 07:35 AM   #2
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Have you looked at md5sum?
 
Old 12-23-2003, 10:43 AM   #3
trouby
Member
 
Registered: Sep 2003
Posts: 59

Original Poster
Rep: Reputation: 15
ye, I tried but it seems it doesn't fit openldap's MD5, anyone know why?
 
Old 01-22-2004, 01:10 PM   #4
stickman
Senior Member
 
Registered: Sep 2002
Location: Nashville, TN
Posts: 1,552

Rep: Reputation: 53
Perhaps it's not comparing the same data.
 
Old 10-16-2008, 08:48 AM   #5
tibbst
LQ Newbie
 
Registered: Oct 2008
Posts: 2

Rep: Reputation: 0
slappasswd(8)

I'm sure you're still looking for this. Or, for those of you who stumble across this looking for the answer, like I did...

# slappasswd -h '{MD5}' -s 'mynewpassword'
{MD5}jnA4PGn3o7fqP3GwLz6XMQ==

I'm pretty sure that's what you were looking for. As I understand it, that's the crypt function using the MD5 algorithm for password hashing. I don't believe the md5sum command is useful in this case.
 
Old 10-17-2008, 01:31 PM   #6
evaluatinglinux
Member
 
Registered: Oct 2008
Posts: 45

Rep: Reputation: 15
I am not sure I understood your requirements clearly. Could you rephrase it in a slightly more detailed manner.

Thanks in advance!


Debian Kernel

Last edited by evaluatinglinux; 10-25-2008 at 02:54 AM.
 
Old 02-13-2011, 08:34 AM   #7
dipu183
LQ Newbie
 
Registered: Feb 2011
Posts: 1

Rep: Reputation: 1
MD5 hashing

try this
echo "STRING" | md5sum

This will give you the md5 hashed value.

linux1:~# echo "STRING" | md5sum
71f48b3561c9e187a7f356729c929a69 -
linux1:~#
 
1 members found this post helpful.
Old 02-13-2011, 04:14 PM   #8
AlphaLexman
LQ Newbie
 
Registered: Jun 2009
Posts: 8

Rep: Reputation: 0
Quote:
Originally Posted by trouby View Post
Is there any tool to create a hashed MD5 string ?
I know this is an old thread, but:
Code:
uuidgen -r
will generate a random-based UUID,
and:
Code:
uuidgen -t
will generate a time-based UUID
 
Old 02-28-2011, 05:02 PM   #9
mightybs
LQ Newbie
 
Registered: Feb 2011
Posts: 1

Rep: Reputation: 2
echo & md5sum

dipu183 you left out an important part:

Quote:
try this
echo "STRING" | md5sum
echo ends it's output with a "\n" unless you do this:

Code:
echo -n "STRING" | md5sum
using this in a bash script I do this to get the string:
Code:
md5=$(echo -n "your string here" | md5sum | cut -f1 -d' ')
That way you cut out the rest of the output from the md5sum command as well, just getting the hash you want.
 
2 members found this post helpful.
Old 02-07-2012, 07:08 PM   #10
RayJ
Member
 
Registered: Sep 2003
Location: Las Vegas
Distribution: Ubuntu 6
Posts: 31

Rep: Reputation: 15
Quote:
Originally Posted by mightybs View Post
dipu183 you left out an important part:



echo ends it's output with a "\n" unless you do this:

Code:
echo -n "STRING" | md5sum
using this in a bash script I do this to get the string:
Code:
md5=$(echo -n "your string here" | md5sum | cut -f1 -d' ')
That way you cut out the rest of the output from the md5sum command as well, just getting the hash you want.
Perfect, Thanks!

--RayJ
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where can I find the Windows XP md5 hash? abefroman General 6 08-12-2005 08:37 AM
gui md5 hash tool monohouse Linux - Software 1 05-17-2005 06:00 PM
checking MD5 hash issey Linux - Newbie 4 03-31-2005 01:15 AM
mass MD5 hash generation w3man Programming 2 01-31-2005 09:05 PM
MD5 hash value dominant Linux - Newbie 2 05-07-2004 03:52 AM


All times are GMT -5. The time now is 05:40 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