Which code snippet contains the correct query?

The following excerpt is from a Perl script that reads a LDAP database and writes a LDIF file:
Case Study Title (Case Study):
$ldap = Net::LDAP->new( ‘ldap.server.com’ );
$mesg = $ldap->bind( ‘cn=incadmin,o=inc’, password => ‘secret’ );
[YOUR ANSWER GOES HERE]
Net::LDAP::LDIF->new( *STDOUT,"w" )->write( $mesg->entries ); $mesg = ldap->unbind;
Which code snippet contains the correct query?
A. $mesg = $ldap->search(
base => ‘o=inc’,
);
B. $mesg = $ldap->search(
base => ‘cn=incadmin,o=inc’,
scope => ‘one’,
filter => ‘(objectclass=*)’
);
C. $mesg = $ldap->search(
base => ‘o=inc’,
scope => ‘sub’,
filter => ‘(objectclass=*)’
);
D. $mesg = $ldap->search(
base => ‘o=inc’,
recursive => ‘yes’,
filter => ‘(*)’
);

Download Printable PDF. VALID exam to help you PASS.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.