strict;
use Net::LDAP;
my $server = '192.168.56.1';
my $port = '389';
my $mesg;
my $c = Net::LDAP-new($server, port = $port) or
die Unable to connect to $server: $@\n;
my $binddn = cn=Peter Parker,cn=users,dc=example,dc=**com;
my $passwd = secret;
$mesg = $c-bind($binddn
Hello,
I'm trying to delete a user entry in Active Directory using this code:
#!/usr/bin/perl -w
use strict;
use Net::LDAP;
my $server = '192.168.56.1';
my $port = '389';
my $mesg;
my $c = Net::LDAP-new($server, port = $port) or
die Unable to connect to $server: $@\n;
my $binddn = cn
On 26/10/2011 23:01, Tessio Fechine wrote:
Hello,
I'm trying to delete a user entry in Active Directory using this code:
#!/usr/bin/perl -w
use strict;
use Net::LDAP;
my $server = '192.168.56.1';
my $port = '389';
my $mesg;
my $c = Net::LDAP-new($server, port = $port) or
die Unable
Beast schreef:
This aparently because of input is coming from STDIN and LANG=utf8
chomp($username=STDIN);
my $exists = ldap_search($username);
after set LANG=en_US it works.
Anyone know the reason?
I guess your input-data wasn't utf8-encoded.
If your data was ASCII-only (so no characters
I have script which running fine on FC5 (perl v 5.8.1) but not working
on RH9(5.8.0).
---
my $ldap = Net::LDAP-new($ldap_host);
die Unable to contact $ldap_host\n unless defined $ldap;
my $mesg = $ldap-bind;
$mesg = $ldap-search(
base = $ldap_base,
scope = 'one',
filter = uid=$uid
).
---
my $ldap = Net::LDAP-new($ldap_host);
die Unable to contact $ldap_host\n unless defined $ldap;
my $mesg = $ldap-bind;
$mesg = $ldap-search(
base = $ldap_base,
scope = 'one',
filter = uid=$uid,
attrs = ['uid'] );
---
If it run on RH9, it simply hanging.
But if I change to:
my
Hi,
I'm trying to retrieve a list of computer names using net::ldap, but my script
returns no values. It's my first time working with the protocol, so I can't
figure out why it doesn't work. I checked the docs several times, but the ldap
filter usage is still not clear.
Can anyone point out
On 3/2/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Can anyone point out how use the ldap search object to get a list of
computers in an OU?
The Net::LDAP FAQ has some example code, and links to other resources.
Does anything there help you?
http://search.cpan.org/~gbarr/perl-ldap-0.33
Hello,
I'm troubleshooting a control panel product called Vishwakarma. One of
the use statements is...
use Net::LDAP qw(:all) ;
...which looks ok to me. However, I'm getting the following error...
LDAP.pm: :all is not exported by the Net::LDAP::Constant module
This error isn't too
Hello,
Can anyone tell me why I am receiving an error can't locate Net/LDAP.pm in @ INC (@INC
includes
/usr/lib/perl5/5.6.1 etc, etc etc, etc.
Thanks - Susan
P.S - No, I am not a Student.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On 11/3/03 5:17 pm, Susan Aurand [EMAIL PROTECTED] wrote:
Hello,
Can anyone tell me why I am receiving an error can't locate Net/LDAP.pm in @
INC (@INC includes
/usr/lib/perl5/5.6.1 etc, etc etc, etc.
How did you install perl-ldap? What is your complete @INC variable, and
where on your box
using
is;
#!/usr/bin/perl -w
use Net::LDAP;
use Net::LDAP::LDIF;
$user = $ARGV[0];
$server = ldap.host.com;
$port = 389;
$rootdn = uid=privuser,ou=Special Users,dc=ldap,dc=com;
$pw = password;
$LDIFfile = /root/ldap/ldif/$user.ldif;
$ldif = new Net::LDAP::LDIF($LDIFfile,r);
@entries = $ldif-read
William Skinner wrote:
for (@entries){
$res = $c-add($_);
warn Error in add for . $_-dn().: error code .$res-code.\n
if $res-code();
}
print The error message is: .$res-error.\n;
$c-unbind();
The error is;
Can't call method error on an undefined value at
13 matches
Mail list logo