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. |
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 |
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. |
Yeah, that's md5sum giving you the answer. Look at the man pages for openssl and for md5sum.
|
All times are GMT -5. The time now is 04:38 PM. |