Automating System Administration with Perl by David N. Blank-Edelman

Automating System Administration with Perl by David N. Blank-Edelman

Author:David N. Blank-Edelman
Format: mobi, epub, pdf
Tags: COMPUTERS / Programming Languages / JavaScript
Publisher: O'Reilly Media
Published: 2009-05-13T23:00:00+00:00


To find anyone with the last name Finkelstein or Hodgkin:

(|(sn=Finkelstein)(sn=Hodgkin))

To find all of the Finkelsteins who do not work in Boston:

(&(sn=Finkelstein)(!(l=Boston)))

To find all the Finkelsteins or Hodgkins who do not work in Boston:

(&(|(sn=Finkelstein)(sn=Hodgkin))(!(l=Boston)))

Here are two code examples that take an LDAP server name and an LDAP filter and return the results of the query:

use Net::LDAP;

use Net::LDAP::LDIF;

my $server = $ARGV[0];

my $port = getservbyname('ldap','tcp') || '389';

my $basedn = 'c=US';

my $scope = 'sub';



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.