You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(200) |
Jun
(129) |
Jul
(184) |
Aug
(204) |
Sep
(106) |
Oct
(79) |
Nov
(72) |
Dec
(54) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(83) |
Feb
(123) |
Mar
(84) |
Apr
(184) |
May
(106) |
Jun
(111) |
Jul
(104) |
Aug
(91) |
Sep
(59) |
Oct
(99) |
Nov
(100) |
Dec
(37) |
2002 |
Jan
(148) |
Feb
(88) |
Mar
(85) |
Apr
(151) |
May
(80) |
Jun
(110) |
Jul
(85) |
Aug
(43) |
Sep
(64) |
Oct
(89) |
Nov
(59) |
Dec
(42) |
2003 |
Jan
(129) |
Feb
(104) |
Mar
(162) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Edgington, J. <je...@um...> - 2001-04-01 00:39:35
|
Thanks to all that replied... I now have it working... the objectclass was what I was missing... now just have to figure out how to change the unicodePwd value.... that's the tricky one. :) jeff e. -----Original Message----- From: Clif Harden [mailto:cl...@di...] Sent: Friday, March 30, 2001 3:25 PM To: je...@um... Cc: per...@li... Subject: Re: Creating a user in Win2K AD via Net::LDAP > > I am getting the following error and the code is below that (note this is > from a Linux box with Perl 5.6.0) > > pulsar(4)>perl create.pl > add failed: Net::LDAP::Add=HASH(0x82d7148)->error at create.pl line 31. > pulsar(5)> > > 1 #!/umr/testbin/perl > 2 > 3 $| =1; > 4 > 5 > 6 use Net::LDAPS; > 7 $ldaps = new Net::LDAPS('srvtst01.cc.umr.edu', > 8 port=> '636'); > 9 > 10 > 11 $UserPass="94ranger"; > 12 $UserID="Administrator"; > 13 $ADSserver='srvtst01.cc.umr.edu'; > 14 $DomainDN=" dc=test, dc=umr, dc=edu"; > 15 $UserDN="cn=$UserID, cn=users, " . $DomainDN; > 16 > 17 $ldaps = Net::LDAPS->new($ADSserver) || die "failed: $@"; > 18 > 19 $mesg = $ldaps->bind( dn =>"$UserDN", password => "$UserPass" ); > 20 $mesg->code && die "bind failed: $mesg->error"; > 21 > 22 $tempDN = "cn=Test Edgington, cn=Users, " . $DomainDN; > 23 > 24 $mesg = $ldaps->add( > 25 dn => 'cn=Users, dc=test, dc=umr, dc=edu', > 26 attr => [ samAccountName => 'test2', > 27 displayName => 'Test2 Edg', > 28 userPrincipalName => 'te...@te...' > 29 ] > 30 ); I am no expert on Active Directory but I do not see anything about the objectClass definitions in the attr section. I would think that it would at least need the following; objectClass => [ "top ", "person ", "organizationalPerson ", "user"] Regards, Clif > 31 $mesg->code && die "add failed: $mesg->error"; > 32 > 33 > 34 > 35 > > thanks. > > > > > -----Original Message----- > From: Behruz Rushenas [mailto:beh...@cp...] > Sent: Friday, March 30, 2001 1:23 PM > To: J Beck; 'Edgington, Jeffrey'; per...@li... > Subject: RE: Creating a user in Win2K AD via Net::LDAP > > > Make sure you are using the right object classes and the mandatory > attributes you need to create a user in AD. > Try this to create a mail-enabled user in ActiveDirectory. > > userAccountControl = 512 > cn = John Smith > givenName= John > mailNickname =Smith > sAMAccountName =Smith > sn=Smith > userPrincipalName =Smith > objectclass=top;person;organizationalPerson;user;securityPrincipal;mailRecip > ient > > > You can even try first to add a entry by using the "ldapmodify" utility to > make sure you can create this entry whithin the directory before starting to > add it through a program. > > Behruz. > > > > -----Original Message----- > From: per...@li... > [mailto:per...@li...]On Behalf Of J Beck > Sent: Friday, March 30, 2001 10:54 AM > To: 'Edgington, Jeffrey'; per...@li... > Subject: RE: Creating a user in Win2K AD via Net::LDAP > > > you might want to look at your directory's logs. > what kinds of errors are your getting. > it could be permissions, a replicated branch, a required objectclass being > left out... > > > -----Original Message----- > From: per...@li... > [mailto:per...@li...]On Behalf Of > Edgington, Jeffrey > Sent: Friday, March 30, 2001 11:52 AM > To: per...@li... > Subject: Creating a user in Win2K AD via Net::LDAP > > > I'm trying to create userid's in Win2K AD via Net::LDAP with little > success.... I can manipulate current accounts, but can't create them.... has > anyone else been successful with this?... and if so, would you care to share > what you did? > > Thanks. > > jeff e. > > > > |
From: Clif H. <cl...@di...> - 2001-03-30 21:37:11
|
> > I am getting the following error and the code is below that (note this is > from a Linux box with Perl 5.6.0) > > pulsar(4)>perl create.pl > add failed: Net::LDAP::Add=HASH(0x82d7148)->error at create.pl line 31. > pulsar(5)> > > 1 #!/umr/testbin/perl > 2 > 3 $| =1; > 4 > 5 > 6 use Net::LDAPS; > 7 $ldaps = new Net::LDAPS('srvtst01.cc.umr.edu', > 8 port=> '636'); > 9 > 10 > 11 $UserPass="94ranger"; > 12 $UserID="Administrator"; > 13 $ADSserver='srvtst01.cc.umr.edu'; > 14 $DomainDN=" dc=test, dc=umr, dc=edu"; > 15 $UserDN="cn=$UserID, cn=users, " . $DomainDN; > 16 > 17 $ldaps = Net::LDAPS->new($ADSserver) || die "failed: $@"; > 18 > 19 $mesg = $ldaps->bind( dn =>"$UserDN", password => "$UserPass" ); > 20 $mesg->code && die "bind failed: $mesg->error"; > 21 > 22 $tempDN = "cn=Test Edgington, cn=Users, " . $DomainDN; > 23 > 24 $mesg = $ldaps->add( > 25 dn => 'cn=Users, dc=test, dc=umr, dc=edu', > 26 attr => [ samAccountName => 'test2', > 27 displayName => 'Test2 Edg', > 28 userPrincipalName => 'te...@te...' > 29 ] > 30 ); I am no expert on Active Directory but I do not see anything about the objectClass definitions in the attr section. I would think that it would at least need the following; objectClass => [ "top ", "person ", "organizationalPerson ", "user"] Regards, Clif > 31 $mesg->code && die "add failed: $mesg->error"; > 32 > 33 > 34 > 35 > > thanks. > > > > > -----Original Message----- > From: Behruz Rushenas [mailto:beh...@cp...] > Sent: Friday, March 30, 2001 1:23 PM > To: J Beck; 'Edgington, Jeffrey'; per...@li... > Subject: RE: Creating a user in Win2K AD via Net::LDAP > > > Make sure you are using the right object classes and the mandatory > attributes you need to create a user in AD. > Try this to create a mail-enabled user in ActiveDirectory. > > userAccountControl = 512 > cn = John Smith > givenName= John > mailNickname =Smith > sAMAccountName =Smith > sn=Smith > userPrincipalName =Smith > objectclass=top;person;organizationalPerson;user;securityPrincipal;mailRecip > ient > > > You can even try first to add a entry by using the "ldapmodify" utility to > make sure you can create this entry whithin the directory before starting to > add it through a program. > > Behruz. > > > > -----Original Message----- > From: per...@li... > [mailto:per...@li...]On Behalf Of J Beck > Sent: Friday, March 30, 2001 10:54 AM > To: 'Edgington, Jeffrey'; per...@li... > Subject: RE: Creating a user in Win2K AD via Net::LDAP > > > you might want to look at your directory's logs. > what kinds of errors are your getting. > it could be permissions, a replicated branch, a required objectclass being > left out... > > > -----Original Message----- > From: per...@li... > [mailto:per...@li...]On Behalf Of > Edgington, Jeffrey > Sent: Friday, March 30, 2001 11:52 AM > To: per...@li... > Subject: Creating a user in Win2K AD via Net::LDAP > > > I'm trying to create userid's in Win2K AD via Net::LDAP with little > success.... I can manipulate current accounts, but can't create them.... has > anyone else been successful with this?... and if so, would you care to share > what you did? > > Thanks. > > jeff e. > > > > |
From: Behruz R. <beh...@cp...> - 2001-03-30 20:11:08
|
To have more information about your Error, try to do this: ------------------------------------------------------------------------- my $output = sprintf("ID: %s \tReturn code: %s \tMessage: %s ==> %s", $mesg->mesg_id, $mesg->code, ldap_error_name($mesg->code), ldap_error_text($mesg->code)); print "$output\n"; --------------------------------------------------------------------------- don't foregt to add the next line at the beginning of your script use Net::LDAP::Util qw(ldap_error_name ldap_error_text); Anyway, in your script, I don't see any attribute mapping for the "objectclass". You can NOT add an entry whitout specifying to which objectclass it belongs to. This is an example from the LDAP Module: ---------------------------------------- $result = $ldap->add ( dn => 'cn = Barbara Jensen, o=University of Michigan, c=us', attr => [ 'cn' => ['Barbara Jensen', 'Barbs Jensen'], 'sn => 'Jensen', 'mail' => 'b.j...@um...', 'objectclass' => ['top', 'person', 'organizationalPerson', 'inetOrgPerson' ], ] ); $result->code && warn "failed to add entry: ", $result->error ; ------------------------------------------ As you see this script create an entry having as objectclass "inetorgperson". I hope that can help you Behruz. -----Original Message----- From: per...@li... [mailto:per...@li...]On Behalf Of Edgington, Jeffrey Sent: Friday, March 30, 2001 11:55 AM To: per...@li... Subject: RE: Creating a user in Win2K AD via Net::LDAP I am getting the following error and the code is below that (note this is from a Linux box with Perl 5.6.0) pulsar(4)>perl create.pl add failed: Net::LDAP::Add=HASH(0x82d7148)->error at create.pl line 31. pulsar(5)> 1 #!/umr/testbin/perl 2 3 $| =1; 4 5 6 use Net::LDAPS; 7 $ldaps = new Net::LDAPS('srvtst01.cc.umr.edu', 8 port=> '636'); 9 10 11 $UserPass="94ranger"; 12 $UserID="Administrator"; 13 $ADSserver='srvtst01.cc.umr.edu'; 14 $DomainDN=" dc=test, dc=umr, dc=edu"; 15 $UserDN="cn=$UserID, cn=users, " . $DomainDN; 16 17 $ldaps = Net::LDAPS->new($ADSserver) || die "failed: $@"; 18 19 $mesg = $ldaps->bind( dn =>"$UserDN", password => "$UserPass" ); 20 $mesg->code && die "bind failed: $mesg->error"; 21 22 $tempDN = "cn=Test Edgington, cn=Users, " . $DomainDN; 23 24 $mesg = $ldaps->add( 25 dn => 'cn=Users, dc=test, dc=umr, dc=edu', 26 attr => [ samAccountName => 'test2', 27 displayName => 'Test2 Edg', 28 userPrincipalName => 'te...@te...' 29 ] 30 ); 31 $mesg->code && die "add failed: $mesg->error"; 32 33 34 35 thanks. -----Original Message----- From: Behruz Rushenas [mailto:beh...@cp...] Sent: Friday, March 30, 2001 1:23 PM To: J Beck; 'Edgington, Jeffrey'; per...@li... Subject: RE: Creating a user in Win2K AD via Net::LDAP Make sure you are using the right object classes and the mandatory attributes you need to create a user in AD. Try this to create a mail-enabled user in ActiveDirectory. userAccountControl = 512 cn = John Smith givenName= John mailNickname =Smith sAMAccountName =Smith sn=Smith userPrincipalName =Smith objectclass=top;person;organizationalPerson;user;securityPrincipal;mailRecip ient You can even try first to add a entry by using the "ldapmodify" utility to make sure you can create this entry whithin the directory before starting to add it through a program. Behruz. -----Original Message----- From: per...@li... [mailto:per...@li...]On Behalf Of J Beck Sent: Friday, March 30, 2001 10:54 AM To: 'Edgington, Jeffrey'; per...@li... Subject: RE: Creating a user in Win2K AD via Net::LDAP you might want to look at your directory's logs. what kinds of errors are your getting. it could be permissions, a replicated branch, a required objectclass being left out... -----Original Message----- From: per...@li... [mailto:per...@li...]On Behalf Of Edgington, Jeffrey Sent: Friday, March 30, 2001 11:52 AM To: per...@li... Subject: Creating a user in Win2K AD via Net::LDAP I'm trying to create userid's in Win2K AD via Net::LDAP with little success.... I can manipulate current accounts, but can't create them.... has anyone else been successful with this?... and if so, would you care to share what you did? Thanks. jeff e. |
From: Edgington, J. <je...@um...> - 2001-03-30 19:55:29
|
I am getting the following error and the code is below that (note this is from a Linux box with Perl 5.6.0) pulsar(4)>perl create.pl add failed: Net::LDAP::Add=HASH(0x82d7148)->error at create.pl line 31. pulsar(5)> 1 #!/umr/testbin/perl 2 3 $| =1; 4 5 6 use Net::LDAPS; 7 $ldaps = new Net::LDAPS('srvtst01.cc.umr.edu', 8 port=> '636'); 9 10 11 $UserPass="94ranger"; 12 $UserID="Administrator"; 13 $ADSserver='srvtst01.cc.umr.edu'; 14 $DomainDN=" dc=test, dc=umr, dc=edu"; 15 $UserDN="cn=$UserID, cn=users, " . $DomainDN; 16 17 $ldaps = Net::LDAPS->new($ADSserver) || die "failed: $@"; 18 19 $mesg = $ldaps->bind( dn =>"$UserDN", password => "$UserPass" ); 20 $mesg->code && die "bind failed: $mesg->error"; 21 22 $tempDN = "cn=Test Edgington, cn=Users, " . $DomainDN; 23 24 $mesg = $ldaps->add( 25 dn => 'cn=Users, dc=test, dc=umr, dc=edu', 26 attr => [ samAccountName => 'test2', 27 displayName => 'Test2 Edg', 28 userPrincipalName => 'te...@te...' 29 ] 30 ); 31 $mesg->code && die "add failed: $mesg->error"; 32 33 34 35 thanks. -----Original Message----- From: Behruz Rushenas [mailto:beh...@cp...] Sent: Friday, March 30, 2001 1:23 PM To: J Beck; 'Edgington, Jeffrey'; per...@li... Subject: RE: Creating a user in Win2K AD via Net::LDAP Make sure you are using the right object classes and the mandatory attributes you need to create a user in AD. Try this to create a mail-enabled user in ActiveDirectory. userAccountControl = 512 cn = John Smith givenName= John mailNickname =Smith sAMAccountName =Smith sn=Smith userPrincipalName =Smith objectclass=top;person;organizationalPerson;user;securityPrincipal;mailRecip ient You can even try first to add a entry by using the "ldapmodify" utility to make sure you can create this entry whithin the directory before starting to add it through a program. Behruz. -----Original Message----- From: per...@li... [mailto:per...@li...]On Behalf Of J Beck Sent: Friday, March 30, 2001 10:54 AM To: 'Edgington, Jeffrey'; per...@li... Subject: RE: Creating a user in Win2K AD via Net::LDAP you might want to look at your directory's logs. what kinds of errors are your getting. it could be permissions, a replicated branch, a required objectclass being left out... -----Original Message----- From: per...@li... [mailto:per...@li...]On Behalf Of Edgington, Jeffrey Sent: Friday, March 30, 2001 11:52 AM To: per...@li... Subject: Creating a user in Win2K AD via Net::LDAP I'm trying to create userid's in Win2K AD via Net::LDAP with little success.... I can manipulate current accounts, but can't create them.... has anyone else been successful with this?... and if so, would you care to share what you did? Thanks. jeff e. |
From: Eric N. <eni...@cp...> - 2001-03-30 19:36:21
|
No such luck, I got it to work, except IO::Scalar dosen't support the TELL function? Can't locate object method "TELL" via package "IO::Scalar" at C:/Perl/site/lib/Net/LDAP/LDIF.pm line 169. Source code: --- use Net::LDAP::Entry; use Net::LDAP::LDIF; use IO::Scalar; my ($destentry) = Net::LDAP::Entry->new; $destentry->add('cn'=>['Eric Nichols']); $destentry->dn('cn=eric nichols,o=cps'); my $s; tie *OUT, 'IO::Scalar', \$s; my $ldif = Net::LDAP::LDIF->new(\*OUT,"a"); $ldif->write($destentry); $ldif->done(); print $s; --- ----- Original Message ----- From: "Graham Barr" <gb...@po...> To: "Eric Nichols" <eni...@cp...> Cc: <per...@li...> Sent: Friday, March 30, 2001 11:00 AM Subject: Re: Writing an LDIF to a variable? > It should be possible using the IO::Scalar package. > > Create the IO::Scalar object then > > my $ldif = Net::LDAP::LDIF->new($io_scalar,"w"); > $ldif->write(@entries); > > should work, but I have not tried it > > Graham. > > On Fri, Mar 30, 2001 at 10:54:06AM -0500, Eric Nichols wrote: > > This might have been asked before. > > Is there any way I can take an Net::LDAP::Entry object and save it in LDIF > > format to a variable rather than a file? > > > > I'm sure there's some perl trick to it.. > > > > > > > > > > |
From: Behruz R. <beh...@cp...> - 2001-03-30 19:31:17
|
Make sure you are using the right object classes and the mandatory attributes you need to create a user in AD. Try this to create a mail-enabled user in ActiveDirectory. userAccountControl = 512 cn = John Smith givenName= John mailNickname =Smith sAMAccountName =Smith sn=Smith userPrincipalName =Smith objectclass=top;person;organizationalPerson;user;securityPrincipal;mailRecip ient You can even try first to add a entry by using the "ldapmodify" utility to make sure you can create this entry whithin the directory before starting to add it through a program. Behruz. -----Original Message----- From: per...@li... [mailto:per...@li...]On Behalf Of J Beck Sent: Friday, March 30, 2001 10:54 AM To: 'Edgington, Jeffrey'; per...@li... Subject: RE: Creating a user in Win2K AD via Net::LDAP you might want to look at your directory's logs. what kinds of errors are your getting. it could be permissions, a replicated branch, a required objectclass being left out... -----Original Message----- From: per...@li... [mailto:per...@li...]On Behalf Of Edgington, Jeffrey Sent: Friday, March 30, 2001 11:52 AM To: per...@li... Subject: Creating a user in Win2K AD via Net::LDAP I'm trying to create userid's in Win2K AD via Net::LDAP with little success.... I can manipulate current accounts, but can't create them.... has anyone else been successful with this?... and if so, would you care to share what you did? Thanks. jeff e. |
From: Behruz R. <beh...@cp...> - 2001-03-30 19:14:25
|
I think if you read carefully the previous article, you will see how to dump you entries into a ldif file. This is the code from the article. my $ldif = new Net::LDAP::LDIF ('example.ldif','w') || die ("failed to open example.ldif. $!\n"); $ldif->write($entry); $ldif->done(); Behruz -----Original Message----- From: Eric Nichols [mailto:eni...@cp...] Sent: Friday, March 30, 2001 11:05 AM To: Behruz Rushenas Subject: Re: Writing an LDIF to a variable? Close but no cigar. Although I did fine a nice dump function which dumps an Entry object to STDOUT. I just need something simple like: $myvar=$ldif->dump($entry) or something like that. ----- Original Message ----- From: "Behruz Rushenas" <beh...@cp...> To: "Eric Nichols" <eni...@cp...>; <per...@li...> Sent: Friday, March 30, 2001 1:55 PM Subject: RE: Writing an LDIF to a variable? > Hi Eric, > > check out the next Web site , there is a great article about NET::LDAP by > MArk Wilcox. > There is alos an example with LDIF. > > http://www.perlmonth.com/features/ldap/ldap.html?issue=11 > > > Behruz > > -----Original Message----- > From: per...@li... > [mailto:per...@li...]On Behalf Of Eric > Nichols > Sent: Friday, March 30, 2001 10:48 AM > To: per...@li... > Subject: Re: Writing an LDIF to a variable? > > > No such luck. I tried everything. I guess there isn't a method in LDIF to > output to a variable? > ----- Original Message ----- > From: "Graham Barr" <gb...@po...> > To: "Eric Nichols" <eni...@cp...> > Cc: <per...@li...> > Sent: Friday, March 30, 2001 11:00 AM > Subject: Re: Writing an LDIF to a variable? > > > > It should be possible using the IO::Scalar package. > > > > Create the IO::Scalar object then > > > > my $ldif = Net::LDAP::LDIF->new($io_scalar,"w"); > > $ldif->write(@entries); > > > > should work, but I have not tried it > > > > Graham. > > > > On Fri, Mar 30, 2001 at 10:54:06AM -0500, Eric Nichols wrote: > > > This might have been asked before. > > > Is there any way I can take an Net::LDAP::Entry object and save it in > LDIF > > > format to a variable rather than a file? > > > > > > I'm sure there's some perl trick to it.. > > > > > > > > > > > > > > > > > > > > |
From: J B. <jb...@do...> - 2001-03-30 19:06:56
|
you might want to look at your directory's logs. what kinds of errors are your getting. it could be permissions, a replicated branch, a required objectclass being left out... -----Original Message----- From: per...@li... [mailto:per...@li...]On Behalf Of Edgington, Jeffrey Sent: Friday, March 30, 2001 11:52 AM To: per...@li... Subject: Creating a user in Win2K AD via Net::LDAP I'm trying to create userid's in Win2K AD via Net::LDAP with little success.... I can manipulate current accounts, but can't create them.... has anyone else been successful with this?... and if so, would you care to share what you did? Thanks. jeff e. |
From: Behruz R. <beh...@cp...> - 2001-03-30 18:56:06
|
Hi Eric, check out the next Web site , there is a great article about NET::LDAP by MArk Wilcox. There is alos an example with LDIF. http://www.perlmonth.com/features/ldap/ldap.html?issue=11 Behruz -----Original Message----- From: per...@li... [mailto:per...@li...]On Behalf Of Eric Nichols Sent: Friday, March 30, 2001 10:48 AM To: per...@li... Subject: Re: Writing an LDIF to a variable? No such luck. I tried everything. I guess there isn't a method in LDIF to output to a variable? ----- Original Message ----- From: "Graham Barr" <gb...@po...> To: "Eric Nichols" <eni...@cp...> Cc: <per...@li...> Sent: Friday, March 30, 2001 11:00 AM Subject: Re: Writing an LDIF to a variable? > It should be possible using the IO::Scalar package. > > Create the IO::Scalar object then > > my $ldif = Net::LDAP::LDIF->new($io_scalar,"w"); > $ldif->write(@entries); > > should work, but I have not tried it > > Graham. > > On Fri, Mar 30, 2001 at 10:54:06AM -0500, Eric Nichols wrote: > > This might have been asked before. > > Is there any way I can take an Net::LDAP::Entry object and save it in LDIF > > format to a variable rather than a file? > > > > I'm sure there's some perl trick to it.. > > > > > > > > > > |
From: Eric N. <eni...@cp...> - 2001-03-30 18:49:03
|
No such luck. I tried everything. I guess there isn't a method in LDIF to output to a variable? ----- Original Message ----- From: "Graham Barr" <gb...@po...> To: "Eric Nichols" <eni...@cp...> Cc: <per...@li...> Sent: Friday, March 30, 2001 11:00 AM Subject: Re: Writing an LDIF to a variable? > It should be possible using the IO::Scalar package. > > Create the IO::Scalar object then > > my $ldif = Net::LDAP::LDIF->new($io_scalar,"w"); > $ldif->write(@entries); > > should work, but I have not tried it > > Graham. > > On Fri, Mar 30, 2001 at 10:54:06AM -0500, Eric Nichols wrote: > > This might have been asked before. > > Is there any way I can take an Net::LDAP::Entry object and save it in LDIF > > format to a variable rather than a file? > > > > I'm sure there's some perl trick to it.. > > > > > > > > > > |
From: Behruz R. <beh...@cp...> - 2001-03-30 17:30:50
|
Thanks Clif and Chris, I appreciate your feedbacks. I think with the Clif's script, i got all the information that i need about my schema. Thanks again guys. Behruz. -----Original Message----- From: per...@li... [mailto:per...@li...]On Behalf Of Clif Harden Sent: Friday, March 30, 2001 9:11 AM To: Behruz Rushenas Cc: per...@li... Subject: Re: FW: NET-LDAP Schema (Information about attributes) Attached is a very basic schema script that will get schema information and dump it to the screen. You will need to define your directory server in the opt hash, key h. Very near the top of the script. Regards, Clif Behruz Rushenas wrote: > > Hi Chris, > > I have already looked in the Net::LDAP::Schema, but i didn't find any > functions allowinfgto get information about attributes ( type, syntax, ...). > > Behruz > > -----Original Message----- > From: Chris Ridd [mailto:chr...@me...] > Sent: Friday, March 30, 2001 8:37 AM > To: Behruz Rushenas; per...@li... > Subject: Re: FW: NET-LDAP Schema (Information about attributes) > > Behruz Rushenas <beh...@cp...> wrote: > > Hi > > > > Does anybody know if there is a way to get information about the > > attribues. I would like to check for instance if my attribute is single > > value or mult-value, what is its syntax, etc... > > > > Is there any future developpement around this subject ? > > > > Thanks. > > Behruz > > > > > > > > Look at Net::LDAP::Schema. > > Cheers, > > Chris -- |
From: Chris R. <chr...@me...> - 2001-03-30 17:18:33
|
Behruz Rushenas <beh...@cp...> wrote: > Hi Chris, > > I have already looked in the Net::LDAP::Schema, but i didn't find any > functions allowinfgto get information about attributes ( type, syntax, > ...). > > Behruz Hm the functionality's there, but maybe it could be brought out a little more obviously. Try the 'item' method. $syntax = $schema->item('mail', 'syntax'); At a guess the second argument must be one of the names in RFC 2252, ie name, desc, obsolete, sup, equality, ordering, substr, syntax, single-value, collective, no-user-modification, usage, abstract, structural, auxiliary, must, may. Cheers, Chris |
From: Clif H. <c-h...@ti...> - 2001-03-30 17:09:57
|
Attached is a very basic schema script that will get schema information and dump it to the screen. You will need to define your directory server in the opt hash, key h. Very near the top of the script. Regards, Clif Behruz Rushenas wrote: > > Hi Chris, > > I have already looked in the Net::LDAP::Schema, but i didn't find any > functions allowinfgto get information about attributes ( type, syntax, ...). > > Behruz > > -----Original Message----- > From: Chris Ridd [mailto:chr...@me...] > Sent: Friday, March 30, 2001 8:37 AM > To: Behruz Rushenas; per...@li... > Subject: Re: FW: NET-LDAP Schema (Information about attributes) > > Behruz Rushenas <beh...@cp...> wrote: > > Hi > > > > Does anybody know if there is a way to get information about the > > attribues. I would like to check for instance if my attribute is single > > value or mult-value, what is its syntax, etc... > > > > Is there any future developpement around this subject ? > > > > Thanks. > > Behruz > > > > > > > > Look at Net::LDAP::Schema. > > Cheers, > > Chris -- |
From: Edgington, J. <je...@um...> - 2001-03-30 16:51:57
|
I'm trying to create userid's in Win2K AD via Net::LDAP with little success.... I can manipulate current accounts, but can't create them.... has anyone else been successful with this?... and if so, would you care to share what you did? Thanks. jeff e. |
From: Behruz R. <beh...@cp...> - 2001-03-30 16:42:52
|
Hi Chris, I have already looked in the Net::LDAP::Schema, but i didn't find any functions allowinfgto get information about attributes ( type, syntax, ...). Behruz -----Original Message----- From: Chris Ridd [mailto:chr...@me...] Sent: Friday, March 30, 2001 8:37 AM To: Behruz Rushenas; per...@li... Subject: Re: FW: NET-LDAP Schema (Information about attributes) Behruz Rushenas <beh...@cp...> wrote: > Hi > > Does anybody know if there is a way to get information about the > attribues. I would like to check for instance if my attribute is single > value or mult-value, what is its syntax, etc... > > Is there any future developpement around this subject ? > > Thanks. > Behruz > > > Look at Net::LDAP::Schema. Cheers, Chris |
From: Chris R. <chr...@me...> - 2001-03-30 16:39:37
|
Behruz Rushenas <beh...@cp...> wrote: > Hi > > Does anybody know if there is a way to get information about the > attribues. I would like to check for instance if my attribute is single > value or mult-value, what is its syntax, etc... > > Is there any future developpement around this subject ? > > Thanks. > Behruz > > > Look at Net::LDAP::Schema. Cheers, Chris |
From: Behruz R. <beh...@cp...> - 2001-03-30 16:15:50
|
Hi Does anybody know if there is a way to get information about the attribues. I would like to check for instance if my attribute is single value or mult-value, what is its syntax, etc... Is there any future developpement around this subject ? Thanks. Behruz |
From: Chris R. <chr...@me...> - 2001-03-30 16:09:47
|
Graham Barr <gb...@po...> wrote: > ----- Forwarded message from Paul Jones <PJ...@no...> ----- > > Date: Fri, 30 Mar 2001 08:34:56 -0700 > To: <gb...@po...> > From: "Paul Jones" <PJ...@no...> > Subject: creating LDAP entries > X-Mailer: Novell GroupWise Internet Agent 5.5.5.1 > > Graham, > > This looks like an excellent module. I have a question about creating > entries though. How do I specify what type of entry to enter? ie. How do > I specify that I want to create a 'group' object, or 'user' object, or > any other type of object? Other than that, I think this might be a very > useful tool. If I am writting to the wrong place, please let me know who > I should contact. > > Thank you, > > > Paul Jones > Developer Support > Novell, Inc., the leading provider of Net services software > www.novell.com > > > > > ----- End forwarded message ----- > You need to have some understanding of the schema provided by your directory server. Most servers implement the schema described in RFC 2256, so you should get a copy of that and work out what objectclasses map to what you're trying to model. It isn't terribly descriptive though - the X.521 standard actually describes the standard objectclasses a lot better, so you might want to look for your copy of X.521. (You can drafts of it from ftp://ftp.bull.com/pub/OSIdirectory/) For example, the standard objectclasses 'groupOfNames' and 'groupOfUniqueNames' are typically used to represent groups. 'User's might use the 'person' or 'organizationalPerson' objectclass if the user's a person, or something like 'applicationEntity' if it is a program of some type. There's another RFC - 2798 - that defines 'inetOrgPerson', which is another way to describe a person. Cheers, Chris |
From: Graham B. <gb...@po...> - 2001-03-30 16:01:29
|
It should be possible using the IO::Scalar package. Create the IO::Scalar object then my $ldif = Net::LDAP::LDIF->new($io_scalar,"w"); $ldif->write(@entries); should work, but I have not tried it Graham. On Fri, Mar 30, 2001 at 10:54:06AM -0500, Eric Nichols wrote: > This might have been asked before. > Is there any way I can take an Net::LDAP::Entry object and save it in LDIF > format to a variable rather than a file? > > I'm sure there's some perl trick to it.. > > > > |
From: Eric N. <eni...@cp...> - 2001-03-30 15:55:14
|
This might have been asked before. Is there any way I can take an Net::LDAP::Entry object and save it in LDIF format to a variable rather than a file? I'm sure there's some perl trick to it.. |
From: Graham B. <gb...@po...> - 2001-03-30 15:37:48
|
----- Forwarded message from Paul Jones <PJ...@no...> ----- Date: Fri, 30 Mar 2001 08:34:56 -0700 To: <gb...@po...> From: "Paul Jones" <PJ...@no...> Subject: creating LDAP entries X-Mailer: Novell GroupWise Internet Agent 5.5.5.1 Graham, This looks like an excellent module. I have a question about creating entries though. How do I specify what type of entry to enter? ie. How do I specify that I want to create a 'group' object, or 'user' object, or any other type of object? Other than that, I think this might be a very useful tool. If I am writting to the wrong place, please let me know who I should contact. Thank you, Paul Jones Developer Support Novell, Inc., the leading provider of Net services software www.novell.com ----- End forwarded message ----- |
From: Kurt D. Z. <Ku...@Op...> - 2001-03-29 14:53:14
|
BTW, the "+" I-D is available at: http://search.ietf.org/internet-drafts/draft-zeilenga-ldapv3bis-opattrs-05.txt comments are welcomed. (likely best privately or on the LDAPext list). Kurt At 06:41 AM 3/29/01 -0800, Kurt D. Zeilenga wrote: >At 12:38 PM 3/29/01 +0100, Chris Ridd wrote: >>> I am trying to access an OpenLDAP 2 server with Net::LDAP. Everything fine >>> so far. But when I try to read schema information via the >>> Net::LDAP::schema method it fails. The reason is that the server does not >>> answers operational attributes such as "subschemaentry". Currently I >>> fixed it by explicitly requesting the operational attributes via attrs => >>> ['+', '*'] in both Net::LDAP::root_dse and Net::LDAP::schema. >> >>As far as I know the '+' character is not part of any RFC-defined way of >>requesting all operational attributes. (There is no RFC-defined way of >>doing this. Again, AFAIK.) > >Yes, '+' as a means for requesting is only a 'work in progress'. >And even when it is published as a RFC, I'd question it's >appropriate for read select operational attributes types. The >'+' mechanisms is more suited to browsing by humans. An >automated application should know what's it after and request >it directly. > >Kurt |
From: Kurt D. Z. <Ku...@Op...> - 2001-03-29 14:39:49
|
At 12:38 PM 3/29/01 +0100, Chris Ridd wrote: >> I am trying to access an OpenLDAP 2 server with Net::LDAP. Everything fine >> so far. But when I try to read schema information via the >> Net::LDAP::schema method it fails. The reason is that the server does not >> answers operational attributes such as "subschemaentry". Currently I >> fixed it by explicitly requesting the operational attributes via attrs => >> ['+', '*'] in both Net::LDAP::root_dse and Net::LDAP::schema. > >As far as I know the '+' character is not part of any RFC-defined way of >requesting all operational attributes. (There is no RFC-defined way of >doing this. Again, AFAIK.) Yes, '+' as a means for requesting is only a 'work in progress'. And even when it is published as a RFC, I'd question it's appropriate for read select operational attributes types. The '+' mechanisms is more suited to browsing by humans. An automated application should know what's it after and request it directly. Kurt |
From: Chris R. <chr...@me...> - 2001-03-29 11:38:56
|
Graham Barr <gb...@po...> wrote: > ----- Forwarded message from Jan Hackel <jh...@rz...> ----- > > Date: Thu, 29 Mar 2001 10:06:14 +0200 > To: <gb...@po...> > From: "Jan Hackel" <jh...@rz...> > Subject: Net::LDAP and OpenLDAP Schemata > X-Mailer: Microsoft Outlook Express 5.50.4133.2400 > > Hi, > > I am trying to access an OpenLDAP 2 server with Net::LDAP. Everything fine > so far. But when I try to read schema information via the > Net::LDAP::schema method it fails. The reason is that the server does not > answers operational attributes such as "subschemaentry". Currently I > fixed it by explicitly requesting the operational attributes via attrs => > ['+', '*'] in both Net::LDAP::root_dse and Net::LDAP::schema. As far as I know the '+' character is not part of any RFC-defined way of requesting all operational attributes. (There is no RFC-defined way of doing this. Again, AFAIK.) > Is there a better way to get the schema information out of the directory? > I could not find any hint in the perldocs. You should be able to do just: $schema = $ldap->schema(); which gets the schema from one of the places defined in the root DSE, or: $schema = $ldap->schema('some DN'); which gets the schema from the named subschema subentry. The $schema object will be of class Net::LDAP::Schema. However there were some recent changes to Net::LDAP's code to retrieve schema using a more standard (and correct) method. The previous code only worked in (I think) Netscape and Active Directory. These changes are in the CVS repository and haven't yet been released to CPAN - can you try the version of the code in CVS? Instructions for getting Net::LDAP from CVS are at: http://sourceforge.net/cvs/?group_id=5050 > Thank you, > Jan. > > P.S. Is some conversion support for attribute values planned in the > future, e.g. automatically converting a attribute with syntax > '1.3.6.1.4.1.1466.115.121.1.15' to UTF-8 etc? Well that OID is for DirectoryString, and servers must return values using that syntax to LDAPv3 clients using UTF-8 already. I do have some changes implementing syntax handlers in Net::LDAP, which will do things like exploding values using the standard syntaxes into components. For example DNs explode into lists of lists, BER-encoded values can get decoded into UTF-8 strings, etc. Is this what you were after? Cheers, Chris |
From: Graham B. <gb...@po...> - 2001-03-29 10:44:40
|
----- Forwarded message from Jan Hackel <jh...@rz...> ----- Date: Thu, 29 Mar 2001 10:06:14 +0200 To: <gb...@po...> From: "Jan Hackel" <jh...@rz...> Subject: Net::LDAP and OpenLDAP Schemata X-Mailer: Microsoft Outlook Express 5.50.4133.2400 Hi, I am trying to access an OpenLDAP 2 server with Net::LDAP. Everything fine so far. But when I try to read schema information via the Net::LDAP::schema method it fails. The reason is that the server does not answers operational attributes such as "subschemaentry". Currently I fixed it by explicitly requesting the operational attributes via attrs => ['+', '*'] in both Net::LDAP::root_dse and Net::LDAP::schema. Is there a better way to get the schema information out of the directory? I could not find any hint in the perldocs. Thank you, Jan. P.S. Is some conversion support for attribute values planned in the future, e.g. automatically converting a attribute with syntax '1.3.6.1.4.1.1466.115.121.1.15' to UTF-8 etc? ----- End forwarded message ----- |