Part 2: Some Standard declarations and personalizing for your site

More foundational work. This stuff will configure for your site, and the routines that follow will regularly rely on them.

First, let's declare our modules:

use strict;
use Net::LDAP;
use Authen::SASL;
use IO::Socket::SSL;
use Digest::SHA qw/sha1_base64/;
use Mail::Sendmail;
use Crypt::SmbHash;
use CGI;
use CGI qw/:standard/;

And let's set some variables that will be different for everybody:

my $secondaryLdap = "";
my $primaryLdap = "";
my $caFile = '/location/of/certificate/authority/file.txt';
my $defaultBase = "dc=example,dc=com";
my $peopleBase = "ou=People,dc=example,dc=com";
my $groupBase = "ou=Groups,dc=example,dc=com";
my $mailServer = "";
my $adminEmail = "admin\";

And let's declare a few variables that we will use throughout:

my $base;
my $ldap;
my $ssl;
my $mesg;
my $CGI;