Berkeley CSUA MOTD:Entry 42064
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2024/11/23 [General] UID:1000 Activity:popular
11/23   

2006/3/2 [Computer/SW/Languages/Perl] UID:42064 Activity:kinda low
3/2     LDAP help: I am trying to dump the userPassword from an ldap database
        with ldapsearch but it is coming out base64 encoded:
        userPassword:: e2NyeXB0fWhhKllueGJrSXhrR2M=
        Is there a shell tool to decode this ... I want to avoid re-writing
        the whole thing in perl (I'm not that familar with LDAP or encodings
        and this isn't important enough to spend a lot of time on ... but I've
        answered a lot of motd questions in my areas of expertise so hoping
        somebody can return the favor.)
        \_ If you've got OpenSSL installed:
        \_ If you have OpenSSL installed:
                $ echo '[passwd]' | openssl base64 -d
           If you've got perl and Base64.pm installed:
           If you have perl and Base64.pm installed:
                $ perl -e 'use MIME::Base64; print decode_base64($ARGV[0])' [passwd]
           Some versions of uudecode also support base64 decoding:
                $ echo '[passwd]' | uudecode -rm
        \- I have to do this once in a blue moon and use the emacs base64*
           functions. Wont work on shell stream but YMMV.
           \_ These answers are great!  Feel the love.