Re: Help with Active Directory interaction

2008-08-13 Thread Peter Karman
John Arends wrote on 8/13/08 4:21 PM: Thanks Graham. That fixed the problem and the script works now. I actually am able to set the password during the account creation process. I have seen some reports of people unable to do that. I checked my comments in Net::LDAP::Class::User::AD and appa

Re: Help with Active Directory interaction

2008-08-13 Thread John Arends
Thanks Graham. That fixed the problem and the script works now. I actually am able to set the password during the account creation process. I have seen some reports of people unable to do that. Another curiosity that may interest someone is that it appears I can not modify a user and add a gro

Re: Help with Active Directory interaction

2008-08-13 Thread Graham Barr
"ou=my guest accounts,ou=subOU,ou=myOU,dc=ad,dc=myorg,dc=edu" probably does. you need to prefix that with the RDN for the entry. Graham. On Aug 13, 2008, at 2:18 PM, John Arends wrote: That was a really stupid typo which has now been fixed. I'm now getting errors that the entry exists, but

Re: Help with Active Directory interaction

2008-08-13 Thread John Arends
That was a really stupid typo which has now been fixed. I'm now getting errors that the entry exists, but I know for a fact that it does not. failed to add entry: 2071: UpdErr: DSID-030502F7, problem 6005 (ENTRY_EXISTS), data 0 Daniel Stutz wrote: displayeName should read displayName.

Re: Help with Active Directory interaction

2008-08-13 Thread Daniel Stutz
displayeName should read displayName. Regards, Daniel John Arends schrieb: Thanks for the suggestions so far but I'm still not having any luck. I cleaned up the script a bit based on several of the suggestions. I decided to take the password bit out for now. I can't create an account with no

Re: Help with Active Directory interaction

2008-08-13 Thread John Arends
Thanks for the suggestions so far but I'm still not having any luck. I cleaned up the script a bit based on several of the suggestions. I decided to take the password bit out for now. I can't create an account with no password, so I'm setting userAccountControl to 514 so the account will be cr

Re: Help with Active Directory interaction

2008-08-13 Thread Peter Karman
On 08/13/2008 10:20 AM, Barrett, John wrote: > You might want to check your variable names for consistency - $first vs. > $firstname > > > #!/usr/bin/perl > use strict; # get in the habit. > use Net::LDAP; > use Unicode::Map8; > -- Peter Karman . [EMAIL PROTECTED] . http://peknet.c

RE: Help with Active Directory interaction

2008-08-13 Thread Barrett, John
You might want to check your variable names for consistency - $first vs. $firstname -Original Message- From: John Arends [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 12, 2008 3:53 PM To: perl-ldap@perl.org Subject: Re: Help with Active Directory interaction Now that I'm bindi

Re: Help with Active Directory interaction

2008-08-12 Thread Peter Karman
On 08/12/2008 03:53 PM, John Arends wrote: > Now that I'm binding ok, I'm trying to create a user but running into > additional problems. > > I'm running into this error: > > failed to add entry: 0057: LdapErr: DSID-0C090B38, comment: Error in > attribute conversion operation, data 0, vece

Re: Help with Active Directory interaction

2008-08-12 Thread John Arends
Now that I'm binding ok, I'm trying to create a user but running into additional problems. I'm running into this error: failed to add entry: 0057: LdapErr: DSID-0C090B38, comment: Error in attribute conversion operation, data 0, vece at ./create.pl line 36. Thoughts? #!/usr/bin/perl us

Re: Help with Active Directory interaction

2008-08-12 Thread Peter Karman
On 08/12/2008 01:07 PM, John Arends wrote: > I am trying to write a script to do some work with Active Directory. > Since my scripts need to run on a Linux machine, I have to use Net::LDAP. > Or try the new Net::LDAP::Class (your script rewritten below): #!/usr/bin/perl use strict; use warnin

Re: Help with Active Directory interaction

2008-08-12 Thread John Arends
Bingo. Adding that line showed me I was not binding correctly. I was able to fix the problem. I'm learning as I go so I appreciate the help. Christopher A Bongaarts wrote: You don't know if you're binding correctly, as you're not checking the return value from the search. Try adding, between

Re: Help with Active Directory interaction

2008-08-12 Thread Rick Sanders
John, > Since I'm not getting any good diagnostic info, I'm having a hard time > figuring >out where to begin troubleshooting. Add the line "$ldap->debug(12);" and you'll get more info. >When I run the code I can tell I am binding because I don't get error >messages (I do get an error if I pu

Re: Help with Active Directory interaction

2008-08-12 Thread Christopher A Bongaarts
In the immortal words of John Arends: > When I run the code I can tell I am binding because I don't get error > messages (I do get an error if I put in a bogus server). You don't know if you're binding correctly, as you're not checking the return value from the search. Try adding, between thes

Re: Help with Active Directory interaction

2008-08-12 Thread Luis Cerezo
I sencond Adrej' comment about the filter. This is what works for me, I hope my code doesn't make the real programmers shudder, I am just a low-ly sysadmin. ;-) #!/usr/bin/perl # 05-30-2006| initial draft | Luis E. Cerezo use Net::LDAP; $ldap = Net::LDAP->new( 'winDC' ) or die "$@"; $mesg =

Re: Help with Active Directory interaction

2008-08-12 Thread John Arends
I tried changing that line to: $mesg = $ldap->search(filter=>"(cn=*)", base=>"ou=subOU,ou=myOU,dc=ad,dc=myorg,dc=edu"); and still no output. Andrej Ricnik-Bay wrote: On 13/08/2008, John Arends <[EMAIL PROTECTED]> wrote: $mesg = $ldap->search(filter=>"(OU=SubOU,OU=myOU)", base=>"dc=ad,dc=

Re: Help with Active Directory interaction

2008-08-12 Thread Andrej Ricnik-Bay
On 13/08/2008, John Arends <[EMAIL PROTECTED]> wrote: > $mesg = $ldap->search(filter=>"(OU=SubOU,OU=myOU)", > base=>"dc=ad,dc=myorg,dc=edu"); That filter looks quite wrong - you're not qualifying any attributes, just values? Try something like filter=>"(cn=*)" -- Please don't top post, and don