Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Md5 password generator
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
trouby
Apprentice
Apprentice


Joined: 04 Oct 2003
Posts: 168

PostPosted: Tue Dec 23, 2003 12:35 pm    Post subject: Md5 password generator Reply with quote

Hey,

Is there any tool to create a hashed MD5 string ? Ldap config file can use {MD5} with MD5 string as its password and I have nothing to create that HASHED password with,

Thanks.
Back to top
View user's profile Send private message
aridhol
Guru
Guru


Joined: 20 Jan 2003
Posts: 509
Location: Stockholm, Sweden

PostPosted: Tue Dec 23, 2003 12:49 pm    Post subject: Reply with quote

A quick googling on your topic title gave me this:
http://www.trilug.org/~jeremy/md5.php
_________________
72 of Pitcairn Islands 49 inhabitants use Seti@Home
"If you buy a DVD you have a copy. If you want a backup copy you buy another one."
"Anyone who is capable of getting themselves made President should on no account be allowed to do the job."
Back to top
View user's profile Send private message
thodi
Tux's lil' helper
Tux's lil' helper


Joined: 20 Oct 2003
Posts: 92
Location: Emden, Germany (Old Europe)

PostPosted: Tue Dec 23, 2003 12:54 pm    Post subject: Re: Md5 password generator Reply with quote

trouby wrote:
Is there any tool to create a hashed MD5 string ?

md5sum, should be in coreutils.
Code:

echo password | md5sum -

_________________
Hier fliegen gleich die Löcher aus dem Käse
Jabber: thodi@jabber.org
Back to top
View user's profile Send private message
trouby
Apprentice
Apprentice


Joined: 04 Oct 2003
Posts: 168

PostPosted: Tue Dec 23, 2003 1:44 pm    Post subject: Reply with quote

fine, thanks.
Back to top
View user's profile Send private message
trouby
Apprentice
Apprentice


Joined: 04 Oct 2003
Posts: 168

PostPosted: Tue Dec 23, 2003 4:44 pm    Post subject: Reply with quote

md5sum works fine but it doesn't fit the {MD5}(hashed MD5 string) that slapd.conf expects, anyone?
Back to top
View user's profile Send private message
thodi
Tux's lil' helper
Tux's lil' helper


Joined: 20 Oct 2003
Posts: 92
Location: Emden, Germany (Old Europe)

PostPosted: Tue Dec 23, 2003 5:58 pm    Post subject: Reply with quote

Code:

echo password | md5sum - | perl -ne '/(\w+)/ && print "{MD5}$1"'

_________________
Hier fliegen gleich die Löcher aus dem Käse
Jabber: thodi@jabber.org
Back to top
View user's profile Send private message
zhenlin
Veteran
Veteran


Joined: 09 Nov 2002
Posts: 1361

PostPosted: Wed Dec 24, 2003 3:31 am    Post subject: Reply with quote

Use the correct tool for the job!

Code:
$ slappasswd -h '{MD5}'
New password:
Re-enter new password:
{MD5}bx7QAqtVlYWQFOvwlRUi2Q==


SHA1 hashing is stronger though, I think by 32 bits. (160 bits of hash space!)
Back to top
View user's profile Send private message
trouby
Apprentice
Apprentice


Joined: 04 Oct 2003
Posts: 168

PostPosted: Wed Dec 24, 2003 10:03 am    Post subject: Reply with quote

That's exactly what I needed!
Well, MD5 is enough for me since the ldap is anyway not accessible for anyone but for several internal applications.


Thanks.
Back to top
View user's profile Send private message
garfield
n00b
n00b


Joined: 03 Oct 2003
Posts: 14
Location: Aalborg, Denmark

PostPosted: Wed Dec 31, 2003 4:17 pm    Post subject: Reply with quote

thodi wrote:
Code:

echo password | md5sum - | perl -ne '/(\w+)/ && print "{MD5}$1"'

This will NOT give the md5sum for password since echo sends a newline along with password to md5sum. You'll have to use the -n option with echo to get the correct password. Without the Perl stuff the code will be
Code:

echo -n password | md5sum
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum