[Samba] How to bind properly to Samba4 LDAP server?

Indexer indexer at internode.on.net
Fri Dec 17 18:28:26 MST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


>> 
>> Here is my simple script written in Perl: http://pastebin.com/eF0hh5Ee
>> After adding some debugging options, this is what I get when trying to run it: http://pastebin.com/2py5EixU

Your bind DN is wrong. It should be

$mesg = $ldap->bind( "cn=Administrator,cn=Users,".$dc, password => "pa$$w0rd" );

You should also be using TLS or SSL to connect.

http://search.cpan.org/~gbarr/perl-ldap/lib/Net/LDAP.pod#start_tls

>> 
>> Please give me a clue how to bind properly to Samba4 LDAP server. Maybe should I use SASL authentication? If yes, with which mechanism?
> 
> The following might give you a hint, but not sure how you would do it
> from perl code:
> 
> $ kinit user
> user at EXAMPLE.COM's Password:
> $ ldapsearch -Y GSSAPI sAMAccountName=user
> [...]
> 

Here is a quick google example of how to use KRB5 to bind to LDAP

http://www.bishnet.net/tim/blog/2008/01/18/connecting-to-ldap-using-kerberos-authentication-in-perl/

Enjoy.

William Brown

pgp.mit.edu



-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)

iQIcBAEBAgAGBQJNDA49AAoJEHF16AnLoz6JULEP/0Mr07WAfHvatBwClUo4f7rS
ipM13BSd54Oe27UTeRIXSj/mrnFEpptjbs8p5BHAhoxbkH9lyaiVMmM33BwOBo7y
sb79n4vsb28HjF2PYRVmumlmeuoG/sVCDW62m2rrHdwh50pFmyWKAvbDKKt5Nsj5
hkMVErLhHYnSTaThEaITgAqvZycxcpDz239m73263tgcTtrxGV0BoIhjtfrpOFUP
9K+txJfMdDo7UmODFyeqYnMdEG+dq1MaFyeUGgydvs3TMnx+DfgFqCbdMcLNvjYz
D092+AXCkrhkb7Pb5aTjzzQdFdcc5yTCtoRKaOhi+kS9XFnvj8PMTjQ7aoHGbm/d
yX8w/hG3Kd6BDscWyF/AdUYSH5IUIVBmlycnUFAWioy3COVQjSiKv6vM3F4BPPQP
/+pqb/PNW9pINW0Gs7G0waSrkx23fGKfZmnx7kH1w8aTQbFJ922Px38OU4FZFwUZ
SXT7EGcBjzjTHCOyahpFvp3ZJOSgsgyK1SwqvYvzVG43fX9idykQYdDCor8dXphp
J07y+PMUCnFpKZW5XvF+IkFHJSrmhdml0HNapmzJOlLSjP1nEP8tqItdjMMZ+2Xw
PRNpGb9FbTmRQIoC6MF5A8f7qoFhN8OpIIXhyy7lzB/mL1vM2tDHlU9lqGGtjlmn
8OJBFYb+9tMum36FrJwK
=/iRE
-----END PGP SIGNATURE-----


More information about the samba mailing list