Re: Can't delete directory entry in AD using Net::LDAP

2011-10-27 Thread Tessio Fechine
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

Can't delete directory entry in AD using Net::LDAP

2011-10-26 Thread Tessio Fechine
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

Re: Can't delete directory entry in AD using Net::LDAP

2011-10-26 Thread Rob Dixon
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

Re: solved [was Re: Net::LDAP]

2006-07-09 Thread Dr.Ruud
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

Net::LDAP

2006-07-06 Thread Beast
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

solved [was Re: Net::LDAP]

2006-07-06 Thread Beast
). --- 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

Retrieve lsit of computers using net::ldap

2006-03-02 Thread perl
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

Re: Retrieve lsit of computers using net::ldap

2006-03-02 Thread Tom Phoenix
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

Net::LDAP error

2003-06-20 Thread Matt Thoene
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

Net::LDAP

2003-03-11 Thread Susan Aurand
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]

Re: Net::LDAP

2003-03-11 Thread Chris Ridd
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

Help with Net::LDAP::LDIF

2001-09-17 Thread William Skinner
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

Re: Help with Net::LDAP::LDIF

2001-09-17 Thread Andrea Holstein
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