in reply to Using Perl LDAP
sub DN () { 'cn=admin,dc=domain,dc=com' } sub PASSWORD () { 'password' } sub SERVER () { 'localhost' } use Carp; use Net::LDAP; # Create connection to the LDAP server and bind authoratively using # administrator credentials my $ldap = Net::LDAP->new( SERVER ); unless ( defined $ldap ) { croak( 'Cannot create connection to LDAP server -- ', $! ); } $ldap->bind ( 'dn' => DN, 'password' => PASSWORD ); my $result = $ldap->add ( 'cn=domain,ou=v_domains,ou=postfix,ou=system_services,dc=domain,dc +=com', 'attr' => [ 'cn' => 'domain', 'objectClass' => 'inetLocalMailRecipient', 'mailLocalAddress' => 'username@domain, domain', 'mailRoutingAddress' => 'alias' ] ); if ( $result->code ) { carp( 'Error in adding LDAP entry -- ', $result->error ); } $ldap->unbind;
Some links which may be of help to you include:
perl -le 'print+unpack"N",pack"B32","00000000000000000000001001110100"'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Using Perl LDAP
by hiddenlinux (Acolyte) on Jul 18, 2003 at 08:57 UTC | |
by Cmdr_Tofu (Scribe) on Jul 18, 2003 at 10:10 UTC | |
by Excalibor (Pilgrim) on Jul 18, 2003 at 09:46 UTC | |
by blue_cowdawg (Monsignor) on Jul 18, 2003 at 10:11 UTC | |
by Anonymous Monk on Jul 18, 2003 at 11:16 UTC | |
by blue_cowdawg (Monsignor) on Jul 18, 2003 at 13:46 UTC | |
by hiddenlinux (Acolyte) on Jul 18, 2003 at 12:04 UTC | |
by hiddenlinux (Acolyte) on Jul 18, 2003 at 12:23 UTC |