This is very awesome and useful, not just for only Exchange. I would be curious on how to do this through CDO as well.
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of > Harikrishnan Bhaskaran > Sent: Wednesday, March 27, 2002 1:41 PM > To: '[EMAIL PROTECTED]' > Subject: Fetching assoc-nt-account for Exchange 5.5 mailbox via > Net::LDAP > > > Hi, > > I am unable to fetch the value of assoc-nt-account via Net::LDAP. > I get an empty value instead. However I am able to create exchange > accounts, set assoc-nt-accounts and so on. Exchange 5.5 is running > on a Win 2K Server authenticating against an NT 4.0 domain controller. > Would that make a difference? I have followed the code > sample in http://perl-ldap.sourceforge.net/faqomatic/cache/65.html > > I did follow the thread > http://aspn.activestate.com/ASPN/Mail/Message/perl-NTAdmins/753857 > and I am familiar with the hex<->sid<->account conversions. > I am just trying to somehow extract the value of assoc-nt-account. > I have tried using ADSI via Win32::OLE and I have got the same > result - I can fetch everything except for the nt account info. > > >From the same code I have derived the following code to iterate all > mailboxes and thier NT user-ids. I am able to fetch all other > values (cn, sn, etc..) of the mailbox. > > ------------------------------- > $exch = new Net::LDAP('DEVEXCH', debug =>0) || die $@; > > $exch->bind( 'cn=admin_account,cn=DEVDOMAIN,cn=admin', version =>3, > password=>'somepassword'); > > my $result = $exch->search(base => "o=\"My Org\"", filter > =>"(objectclass=organizationalperson)"); > > my $max = $result->count; > for( my $index = 0 ; $index < $max ; $index++) { > my $entry = $result->entry($index); > print $entry->dn(), "\n"; > # foreach my $attr ($entry->attributes, 'assoc-nt-account', > 'nt-security-descriptor') { > foreach my $attr ('assoc-nt-account', 'nt-security-descriptor') { > foreach my $value ($entry->get_value($attr)) { > print $attr, ": ", $value, "\n"; > } > } > > ------------------------------- > > Any help is appreciated > > -- > Hari Bhaskaran > _______________________________________________ > Perl-Win32-Admin mailing list > [EMAIL PROTECTED] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
