LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-01-2007, 12:24 AM   #1
celeron
LQ Newbie
 
Registered: Nov 2006
Posts: 26

Rep: Reputation: 15
Howto convert base64 to md5


Hi, all
I have a LDAP database on Redhat 8.x. When I use ldapsearch comand, I receive userPassword at base64 hash format (userPassword:: e0NSWVBUfSQxJEZ1dVR0cGt0JFd0RkM1eUpOeTd2bmQ1cXNzY3ZMTC8=). Now, I want to convert this hash to MD5 hash. After, I will enter this MD5 hash to /etc/shadow and convert /etc/passwd to ldif file.
Do you have any solutions for this?

Thanks.
 
Old 03-01-2007, 01:30 AM   #2
puffinman
Member
 
Registered: Jan 2005
Location: Atlanta, GA
Distribution: Gentoo, Slackware
Posts: 217

Rep: Reputation: 31
You can use openssl to decode the base64 and the pipe it to md5sum like so

Code:
openssl enc -d -base64 -in myb64passwd.txt | md5sum
Depending on the format of your password file you'll probably have to wrap it in some sort of loop to process each password with md5sum individually.
 
Old 03-01-2007, 02:14 AM   #3
celeron
LQ Newbie
 
Registered: Nov 2006
Posts: 26

Original Poster
Rep: Reputation: 15
howto convert base64 to md5.

Thanks for regarding.
I have just tried your solution but I can't use hash which export from openssl command.
It displays result:
[root@abc ~]# openssl enc -d -base64 -in myb64passwd.txt | md5sum
d41d8cd98f00b204e9800998ecf8427e -

Please give me more information.

Thanks.
 
Old 03-01-2007, 02:19 AM   #4
puffinman
Member
 
Registered: Jan 2005
Location: Atlanta, GA
Distribution: Gentoo, Slackware
Posts: 217

Rep: Reputation: 31
Yeah, that's md5sum giving you the answer. Look at the man pages for openssl and for md5sum.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Quick Q: convert ps to pdf-HOWTO smiley_lauf Linux - Newbie 3 02-14-2006 09:38 PM
HOWTO: Convert MPEG2 into MP4 cato4liberty Linux - Software 2 02-06-2006 12:09 PM
howto convert .flac to .mp3 Lleb_KCir Linux - Software 4 05-21-2005 06:07 PM
howto convert .avi to svcd? Brain Drop Linux - Software 3 11-28-2004 09:13 PM
Howto convert Gentoo wlan scripts to Debian? Naughtyus Debian 1 02-25-2004 03:55 PM

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

All times are GMT -5. The time now is 08:35 AM.

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