nerdexam
Linux_FoundationLinux_Foundation

LFCS · Question #162

LFCS Question #162: Real Exam Question with Answer & Explanation

Sign in or unlock LFCS to reveal the answer and full explanation for question #162. The question stem and answer options stay visible for context.

Submitted by yuki_2020· Apr 18, 2026Operation of Running Systems

Question

The following excerpt is from a Perl script that reads a LDAP database and writes a LDIF file: $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?

Options

  • 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 => '(*)' );

Unlock LFCS to see the answer

You've previewed enough free LFCS questions. Unlock LFCS for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#LDAP#LDAP Search#Perl Scripting#Directory Services
Full LFCS PracticeBrowse All LFCS Questions