[erlang-questions] eldap badmach

Torbjorn Tornkvist <>
Wed Mar 11 23:50:31 CET 2009


Jose Enrique Benitez Jimenez wrote:
> hello everyone,
>  
> I am try to use eldap but I get an error, I donwload these files form internet,
> eldap.erl
> eldap.hrl
> ELDAPv3.hrl
> ELDAPv3.asn
> README.example
>  
> so i compile eldap.erl and get eldap.beam, in the shell i write:

Hm...have you compiled *all* the files?

I suggest you download the code from github.

1. git clone git://github.com/etnt/eldap.git
2. cd eldap
3. make

You should see something like this:
--------------------------------
# make
(cd src;make)
make[1]: Entering directory `/home/tobbe/git/eldap/src'
erlc ELDAPv3.asn
Erlang ASN.1 version "1.6.2" compiling
"/home/tobbe/git/eldap/src/ELDAPv3.asn"
Compiler Options: [ber,report_errors,
                   {cwd,"/home/tobbe/git/eldap/src"},
                   {outdir,"/home/tobbe/git/eldap/src"},
                   {i,"."},
                   {i,"/home/tobbe/git/eldap/src"}]
--{generated,"/home/tobbe/git/eldap/src/ELDAPv3.asn1db"}--
--{generated,"/home/tobbe/git/eldap/src/ELDAPv3.hrl"}--
--{generated,"/home/tobbe/git/eldap/src/ELDAPv3.erl"}--
ok
mv ELDAPv3.beam ../ebin
erlc -I ./src -I ../include +debug_info -o ../ebin eldap.erl
./eldap.erl:411: Warning: variable 'From' is unused
./eldap.erl:764: Warning: function log1/3 is unused
./eldap.erl:883: Warning: variable 'Rest' is unused
make[1]: Leaving directory `/home/tobbe/git/eldap/src'
-----------------------

Look at the doc/README.example.
Is it still not working ?

--Tobbe

> 7> {R,S1}=eldap:open(["10.0.0.3"],[]).                                                                    
> {ok,<0.41.0>}
> 8> eldap:simple_bind(S1,"UID=sAMAccountName, CU=, DC=uci,DC=cu",uF2SODWAHiK0eJboFFQLAvVzJ).
> {error,
>     {'EXIT',
>         {{badmatch,
>              {'EXIT',
>                  {undef,
>                      [{'ELDAPv3',encode,
>                           ['LDAPMessage',
>                            {'LDAPMessage',1,
>                                {bindRequest,
>                                    {'BindRequest',3,
>                                        "UID=sAMAccountName, CU=, DC=uci,DC=cu",
>                                        {simple,uF2SODWAHiK0eJboFFQLAvVzJ}}},
>                                asn1_NOVALUE}]},
>                       {asn1rt,encode,3},
>                       {eldap,send_request,4},
>                       {eldap,request,4},
>                       {eldap,exec_simple_bind,1},
>                       {eldap,do_the_simple_bind,3},
>                       {eldap,loop,2}]}}},
>          [{eldap,send_request,4},
>           {eldap,request,4},
>           {eldap,exec_simple_bind,1},
>           {eldap,do_the_simple_bind,3},
>           {eldap,loop,2}]}}}
> I dont know what does it mean, there are something wrong with the eldap module or my ldap configuration, this is very important for my thesis.
> Thanks a lot. 




More information about the erlang-questions mailing list