Re: sed or awk: decode base64 string in passwd-like file
Denny Schierz (linuxmail@4lin.net on 2011-06-29 16:42 +0200):
> I have a file with strings like:
>
> testds@domain.foo:e0NSWVBUfVUx=:500:12002::/imap/spool/domain.foo/%1n/%
> n:storage=50
>
> I need to decode the second field (password field), with something
> like:
>
> echo e0NSWVBUfVUx= | openssl base64 -d
I certainly hope you're not expecting to recover the plaintext
password with this. But just to be sure: password fields are usually
generated using a one-way hash, which means you CAN NOT decode it, only
brute-force. If this field really contains a recoverable password, then
that's a huge security risk and you should think about changing
software.
For base64 decoding using CLI, take a look at coreutils' base64 or
uudeview.
Regards.
Arno
Reply to: