From: Daniel D. <da...@li...> - 2003-03-25 20:53:23
|
Thanks to the help of Chris, I am at least now getting an error message. = =20 Can't call method "asn" on unblessed reference at=20 /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 354, <STDIN> line 5. My code is nearly the same as it was in my last post: $ldap=3DNet::LDAP->new($server) or die "$@"; $ldap->bind(dn =3D> $rootdn, password =3D> $dnpassword) or die "bind"; $result=3D$ldap->search ( =09base=09=3D> "dc=3Dlife,dc=3Duiuc,dc=3Dedu", =09scope=09=3D> "sub", =09filter=09=3D> "uid=3D*", =09attrs=09=3D> "*" =09); @values =3D $result->entries; ldap code after this to find an unused uid# and gid# from above search th= is works ...other stuff not using ldap, crypting password, figuring days sin= ce=20 epoch, etc print "$dn\n"; $result=3D$ldap->add( dn =3D> [$dn], attr =3D> [ =09'uid' =3D> [$uid], =09'cn' =3D> [$geckos], =09'objectClass' =3D> ['account','posixAccount','top','shadowAccount'], =09'shadowMax' =3D> [$shadowMax], =09'shadowWarning' =3D> [$shadowWarning], =09'loginShell' =3D> [$shell], =09'uidNumber' =3D> [$id], =09'gidNumber' =3D> [$id], =09'homeDirectory' =3D> [$homedirectory], =09'geckos' =3D> [$geckos], =09'userPassword' =3D> [$password], =09'shadowLastChange' =3D> [$days] =09] =09); print "after add\n"; die "unable to add, errorcode #".$result->code() if $result->code(); It looks like it is breaking differently on the add (prints the dn but no= t=20 after add), any ideas? thanks, Dan Dan |
From: Chris R. <chr...@ma...> - 2003-03-26 06:57:04
|
On 25/3/03 8:57 pm, Daniel Davidson <da...@li...> wrote: > Thanks to the help of Chris, I am at least now getting an error message. > > Can't call method "asn" on unblessed reference at > /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 354, <STDIN> line 5. That's because you used [ $dn ]. > My code is nearly the same as it was in my last post: > > $ldap=Net::LDAP->new($server) or die "$@"; > $ldap->bind(dn => $rootdn, password => $dnpassword) or die "bind"; The bind method returns a result object (like add, etc). You need to check the result code in the result object to determine if the bind succeeded. > $result=$ldap->add( > dn => [$dn], That should probably be just dn => $dn; the arrayrefs I suggested before are only needed for attribute values. Sorry I should have mentioned that too :-) The add method checks if the dn argument is a Net::LDAP::Entry object by calling ref() on it, and if not constructs such an object. When you passed [ $dn ] this caused ref() to return true and the code assumed wrongly that it was a Net::LDAP::Entry. The error you quoted is because it then tries to call the asn method on that "object", which in your case isn't one. Cheers, Chris |
From: Daniel D. <da...@li...> - 2003-03-26 15:09:10
|
When I remove the [$dn] and replace it with $dn then my origional proble= m of=20 the script hanging without an error happens again. I'm stumped, Dan On Wednesday 26 March 2003 12:56 am, Chris Ridd wrote: > On 25/3/03 8:57 pm, Daniel Davidson <da...@li...> wrote: > > Thanks to the help of Chris, I am at least now getting an error messa= ge. > > > > Can't call method "asn" on unblessed reference at > > /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 354, <STDIN> line 5. > > That's because you used [ $dn ]. > > > My code is nearly the same as it was in my last post: > > > > $ldap=3DNet::LDAP->new($server) or die "$@"; > > $ldap->bind(dn =3D> $rootdn, password =3D> $dnpassword) or die "bind"= ; > > The bind method returns a result object (like add, etc). You need to ch= eck > the result code in the result object to determine if the bind succeeded= =2E > > > $result=3D$ldap->add( > > dn =3D> [$dn], > > That should probably be just dn =3D> $dn; the arrayrefs I suggested bef= ore > are only needed for attribute values. Sorry I should have mentioned tha= t > too :-) > > The add method checks if the dn argument is a Net::LDAP::Entry object b= y > calling ref() on it, and if not constructs such an object. When you pas= sed > [ $dn ] this caused ref() to return true and the code assumed wrongly t= hat > it was a Net::LDAP::Entry. The error you quoted is because it then trie= s to > call the asn method on that "object", which in your case isn't one. > > Cheers, > > Chris > > > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be There! > NetWorld+Interop Las Vegas 2003 -- Register today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en |
From: Chris R. <chr...@ma...> - 2003-03-26 15:32:17
|
On 26/3/03 3:13 pm, Daniel Davidson <da...@li...> wrote: > When I remove the [$dn] and replace it with $dn then my origional problem of > the script hanging without an error happens again. > > I'm stumped, > > Dan Oops, to set the entry's DN just pass the DN as the first arg to add and not as dn => something. $ldap->add($dn, attrs => [ blah blah ]); I didn't spot this earlier, sorry! Cheers, Chris |
From: Graham B. <gb...@po...> - 2003-03-26 16:19:01
|
On Wed, Mar 26, 2003 at 03:32:02PM +0000, Chris Ridd wrote: > On 26/3/03 3:13 pm, Daniel Davidson <da...@li...> wrote: > > > When I remove the [$dn] and replace it with $dn then my origional problem of > > the script hanging without an error happens again. > > > > I'm stumped, > > > > Dan > > Oops, to set the entry's DN just pass the DN as the first arg to add and not > as dn => something. > > $ldap->add($dn, > attrs => [ blah blah ]); There is no difference between $ldap->ad($dn,...) and $ldap->add(dn => $dn,...) It would be interesting to determine where it is hanging. Try adding this to your script. use Carp; $SIG{USR2} = \&Carp::croak; Then when it hangs, find the pid and in another shell do kill -USR2 $pid You should see a stack trace on stderr. Although if you are on a windows box I am not sure this will work. Graham. |
From: Daniel D. <da...@li...> - 2003-03-26 16:48:18
|
Following Grahm's advice, I received the following message. USR2 at /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 661 Know what I am doing wrong yet? Dan On Wednesday 26 March 2003 10:18 am, Graham Barr wrote: > On Wed, Mar 26, 2003 at 03:32:02PM +0000, Chris Ridd wrote: > > On 26/3/03 3:13 pm, Daniel Davidson <da...@li...> wrote: > > > When I remove the [$dn] and replace it with $dn then my origional > > > problem of the script hanging without an error happens again. > > > > > > I'm stumped, > > > > > > Dan > > > > Oops, to set the entry's DN just pass the DN as the first arg to add = and > > not as dn =3D> something. > > > > $ldap->add($dn, > > attrs =3D> [ blah blah ]); > > There is no difference between $ldap->ad($dn,...) and $ldap->add(dn =3D= > > $dn,...) > > It would be interesting to determine where it is hanging. > > Try adding this to your script. > > use Carp; > $SIG{USR2} =3D \&Carp::croak; > > Then when it hangs, find the pid and in another shell do > > kill -USR2 $pid > > You should see a stack trace on stderr. > > Although if you are on a windows box I am not sure this will work. > > Graham. > > > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be There! > NetWorld+Interop Las Vegas 2003 -- Register today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en |
From: Graham B. <gb...@po...> - 2003-03-26 17:10:07
|
On Wed, Mar 26, 2003 at 10:52:50AM -0600, Daniel Davidson wrote: > Following Grahm's advice, I received the following message. > > USR2 at /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 661 That line is the select on the socket. What do you see with a debug trace on ? $ldap->debug(15); Also, do you have access to the server logs, if so do you see anything there. Graham. > > Know what I am doing wrong yet? > > Dan > > > On Wednesday 26 March 2003 10:18 am, Graham Barr wrote: > > On Wed, Mar 26, 2003 at 03:32:02PM +0000, Chris Ridd wrote: > > > On 26/3/03 3:13 pm, Daniel Davidson <da...@li...> wrote: > > > > When I remove the [$dn] and replace it with $dn then my origional > > > > problem of the script hanging without an error happens again. > > > > > > > > I'm stumped, > > > > > > > > Dan > > > > > > Oops, to set the entry's DN just pass the DN as the first arg to add and > > > not as dn => something. > > > > > > $ldap->add($dn, > > > attrs => [ blah blah ]); > > > > There is no difference between $ldap->ad($dn,...) and $ldap->add(dn => > > $dn,...) > > > > It would be interesting to determine where it is hanging. > > > > Try adding this to your script. > > > > use Carp; > > $SIG{USR2} = \&Carp::croak; > > > > Then when it hangs, find the pid and in another shell do > > > > kill -USR2 $pid > > > > You should see a stack trace on stderr. > > > > Although if you are on a windows box I am not sure this will work. > > > > Graham. > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: > > The Definitive IT and Networking Event. Be There! > > NetWorld+Interop Las Vegas 2003 -- Register today! > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > > > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be There! > NetWorld+Interop Las Vegas 2003 -- Register today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en |
From: Daniel D. <da...@li...> - 2003-03-26 17:43:19
|
Debug gave me: Net::LDAP=3DHASH(0x804c00c) sending: substr outside of string at=20 /usr/lib/perl5/site_perl/5.8.0/Convert/ASN1/Debug.pm line 33, <STDIN> lin= e 5. I havent been able to find anything in the logs except for where I have=20 stopped and restared slapd. It logs to /var/log somewhere, right? Dan On Wednesday 26 March 2003 11:09 am, Graham Barr wrote: > On Wed, Mar 26, 2003 at 10:52:50AM -0600, Daniel Davidson wrote: > > Following Grahm's advice, I received the following message. > > > > USR2 at /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 661 > > That line is the select on the socket. What do you see with a debug tra= ce > on ? $ldap->debug(15); > > Also, do you have access to the server logs, if so do you see anything > there. > > Graham. > > > Know what I am doing wrong yet? > > > > Dan > > > > On Wednesday 26 March 2003 10:18 am, Graham Barr wrote: > > > On Wed, Mar 26, 2003 at 03:32:02PM +0000, Chris Ridd wrote: > > > > On 26/3/03 3:13 pm, Daniel Davidson <da...@li...> wrote= : > > > > > When I remove the [$dn] and replace it with $dn then my origio= nal > > > > > problem of the script hanging without an error happens again. > > > > > > > > > > I'm stumped, > > > > > > > > > > Dan > > > > > > > > Oops, to set the entry's DN just pass the DN as the first arg to = add > > > > and not as dn =3D> something. > > > > > > > > $ldap->add($dn, > > > > attrs =3D> [ blah blah ]); > > > > > > There is no difference between $ldap->ad($dn,...) and $ldap->add(d= n =3D> > > > $dn,...) > > > > > > It would be interesting to determine where it is hanging. > > > > > > Try adding this to your script. > > > > > > use Carp; > > > $SIG{USR2} =3D \&Carp::croak; > > > > > > Then when it hangs, find the pid and in another shell do > > > > > > kill -USR2 $pid > > > > > > You should see a stack trace on stderr. > > > > > > Although if you are on a windows box I am not sure this will work. > > > > > > Graham. > > > > > > > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: > > > The Definitive IT and Networking Event. Be There! > > > NetWorld+Interop Las Vegas 2003 -- Register today! > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: > > The Definitive IT and Networking Event. Be There! > > NetWorld+Interop Las Vegas 2003 -- Register today! > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en |
From: Graham B. <gb...@po...> - 2003-03-26 18:56:24
|
Can you turn on debug at the start of the script, not just before the ->add call. It may be the previous request that triggers the problem. Graham. On Wed, Mar 26, 2003 at 11:47:42AM -0600, Daniel Davidson wrote: > Debug gave me: > Net::LDAP=HASH(0x804c00c) sending: > > substr outside of string at > /usr/lib/perl5/site_perl/5.8.0/Convert/ASN1/Debug.pm line 33, <STDIN> line 5. > > I havent been able to find anything in the logs except for where I have > stopped and restared slapd. It logs to /var/log somewhere, right? > > Dan > > > On Wednesday 26 March 2003 11:09 am, Graham Barr wrote: > > On Wed, Mar 26, 2003 at 10:52:50AM -0600, Daniel Davidson wrote: > > > Following Grahm's advice, I received the following message. > > > > > > USR2 at /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 661 > > > > That line is the select on the socket. What do you see with a debug trace > > on ? $ldap->debug(15); > > > > Also, do you have access to the server logs, if so do you see anything > > there. > > > > Graham. > > > > > Know what I am doing wrong yet? > > > > > > Dan > > > > > > On Wednesday 26 March 2003 10:18 am, Graham Barr wrote: > > > > On Wed, Mar 26, 2003 at 03:32:02PM +0000, Chris Ridd wrote: > > > > > On 26/3/03 3:13 pm, Daniel Davidson <da...@li...> wrote: > > > > > > When I remove the [$dn] and replace it with $dn then my origional > > > > > > problem of the script hanging without an error happens again. > > > > > > > > > > > > I'm stumped, > > > > > > > > > > > > Dan > > > > > > > > > > Oops, to set the entry's DN just pass the DN as the first arg to add > > > > > and not as dn => something. > > > > > > > > > > $ldap->add($dn, > > > > > attrs => [ blah blah ]); > > > > > > > > There is no difference between $ldap->ad($dn,...) and $ldap->add(dn => > > > > $dn,...) > > > > > > > > It would be interesting to determine where it is hanging. > > > > > > > > Try adding this to your script. > > > > > > > > use Carp; > > > > $SIG{USR2} = \&Carp::croak; > > > > > > > > Then when it hangs, find the pid and in another shell do > > > > > > > > kill -USR2 $pid > > > > > > > > You should see a stack trace on stderr. > > > > > > > > Although if you are on a windows box I am not sure this will work. > > > > > > > > Graham. > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > This SF.net email is sponsored by: > > > > The Definitive IT and Networking Event. Be There! > > > > NetWorld+Interop Las Vegas 2003 -- Register today! > > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > > > > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: > > > The Definitive IT and Networking Event. Be There! > > > NetWorld+Interop Las Vegas 2003 -- Register today! > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > |
From: Daniel D. <da...@li...> - 2003-03-26 19:40:18
|
For simplicity's sake, I removed the search I was doing and replaced it w= ith=20 values I wanted it to use for gid and uid, so I disabled the search. That leaves my entire output as: Net::LDAP=3DHASH(0x804c00c) sending: 30 32 02 01 01 60 2D 02 01 03 04 21 63 6E 3D 6D 02...`-....!cn=3Dm 61 6E 61 67 65 72 2C 64 63 3D 6C 69 66 65 2C 64 anager,dc=3Dlife,d 63 3D 75 69 75 63 2C 64 63 3D 65 64 75 80 05 67 c=3Duiuc,dc=3Dedu..g 66 75 6E 6B __ __ __ __ __ __ __ __ __ __ __ __ funk 0000 50: SEQUENCE { 0002 1: INTEGER =3D 1 0005 45: [APPLICATION 0] { 0007 1: INTEGER =3D 3 000A 33: STRING =3D 'cn=3Dmanager,dc=3Dlife,dc=3Duiuc,dc=3Dedu' 002D 5: [CONTEXT 0] 002F : 67 66 75 6E 6B __ __ __ __ __ __ __ __ __ __ __ gfunk 0034 : } 0034 : } Net::LDAP=3DHASH(0x804c00c) received: 30 0C 02 01 01 61 07 0A 01 00 04 00 04 00 __ __ 0....a........ 0000 12: SEQUENCE { 0002 1: INTEGER =3D 1 0005 7: [APPLICATION 1] { 0007 1: ENUM =3D 0 000A 0: STRING =3D '' 000C 0: STRING =3D '' 000E : } 000E : } Please Enter the Name of the user Daniel Davidson Please Enter the the users UID jobuddah Please Enter the user's Password df Please Enter the Password again df Please Enter the shell of the user [/usr/libexec/openssh/sftp-server] uid=3Djobuddah,ou=3DPeople,dc=3Dlife,dc=3Duiuc,dc=3Dedu Net::LDAP=3DHASH(0x804c00c) sending: substr outside of string at=20 /usr/lib/perl5/site_perl/5.8.0/Convert/ASN1/Debug.pm line 33, <STDIN> lin= e 5. Is that any more help? Dan ay 26 March 2003 12:53 pm, Graham Barr wrote: > Can you turn on debug at the start of the script, not just before > the ->add call. It may be the previous request that triggers > the problem. > > Graham. > > On Wed, Mar 26, 2003 at 11:47:42AM -0600, Daniel Davidson wrote: > > Debug gave me: > > Net::LDAP=3DHASH(0x804c00c) sending: > > > > substr outside of string at > > /usr/lib/perl5/site_perl/5.8.0/Convert/ASN1/Debug.pm line 33, <STDIN> > > line 5. > > > > I havent been able to find anything in the logs except for where I ha= ve > > stopped and restared slapd. It logs to /var/log somewhere, right? > > > > Dan > > > > On Wednesday 26 March 2003 11:09 am, Graham Barr wrote: > > > On Wed, Mar 26, 2003 at 10:52:50AM -0600, Daniel Davidson wrote: > > > > Following Grahm's advice, I received the following message. > > > > > > > > USR2 at /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 661 > > > > > > That line is the select on the socket. What do you see with a debug > > > trace on ? $ldap->debug(15); > > > > > > Also, do you have access to the server logs, if so do you see anyth= ing > > > there. > > > > > > Graham. > > > > > > > Know what I am doing wrong yet? > > > > > > > > Dan > > > > > > > > On Wednesday 26 March 2003 10:18 am, Graham Barr wrote: > > > > > On Wed, Mar 26, 2003 at 03:32:02PM +0000, Chris Ridd wrote: > > > > > > On 26/3/03 3:13 pm, Daniel Davidson <da...@li...> w= rote: > > > > > > > When I remove the [$dn] and replace it with $dn then my > > > > > > > origional problem of the script hanging without an error > > > > > > > happens again. > > > > > > > > > > > > > > I'm stumped, > > > > > > > > > > > > > > Dan > > > > > > > > > > > > Oops, to set the entry's DN just pass the DN as the first arg= to > > > > > > add and not as dn =3D> something. > > > > > > > > > > > > $ldap->add($dn, > > > > > > attrs =3D> [ blah blah ]); > > > > > > > > > > There is no difference between $ldap->ad($dn,...) and > > > > > $ldap->add(dn =3D> $dn,...) > > > > > > > > > > It would be interesting to determine where it is hanging. > > > > > > > > > > Try adding this to your script. > > > > > > > > > > use Carp; > > > > > $SIG{USR2} =3D \&Carp::croak; > > > > > > > > > > Then when it hangs, find the pid and in another shell do > > > > > > > > > > kill -USR2 $pid > > > > > > > > > > You should see a stack trace on stderr. > > > > > > > > > > Although if you are on a windows box I am not sure this will wo= rk. > > > > > > > > > > Graham. > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > > This SF.net email is sponsored by: > > > > > The Definitive IT and Networking Event. Be There! > > > > > NetWorld+Interop Las Vegas 2003 -- Register today! > > > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > > > > > > > > ------------------------------------------------------- > > > > This SF.net email is sponsored by: > > > > The Definitive IT and Networking Event. Be There! > > > > NetWorld+Interop Las Vegas 2003 -- Register today! > > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en |
From: Brad D. <br...@Di...> - 2003-03-26 19:58:12
|
I am having the same problem that you are having. Try setting your LANG environment variable to en_US. Brad On Wed, 2003-03-26 at 13:44, Daniel Davidson wrote: > For simplicity's sake, I removed the search I was doing and replaced it with > values I wanted it to use for gid and uid, so I disabled the search. > > That leaves my entire output as: > Net::LDAP=HASH(0x804c00c) sending: > > 30 32 02 01 01 60 2D 02 01 03 04 21 63 6E 3D 6D 02...`-....!cn=m > 61 6E 61 67 65 72 2C 64 63 3D 6C 69 66 65 2C 64 anager,dc=life,d > 63 3D 75 69 75 63 2C 64 63 3D 65 64 75 80 05 67 c=uiuc,dc=edu..g > 66 75 6E 6B __ __ __ __ __ __ __ __ __ __ __ __ funk > > 0000 50: SEQUENCE { > 0002 1: INTEGER = 1 > 0005 45: [APPLICATION 0] { > 0007 1: INTEGER = 3 > 000A 33: STRING = 'cn=manager,dc=life,dc=uiuc,dc=edu' > 002D 5: [CONTEXT 0] > 002F : 67 66 75 6E 6B __ __ __ __ __ __ __ __ __ __ __ gfunk > 0034 : } > 0034 : } > Net::LDAP=HASH(0x804c00c) received: > > 30 0C 02 01 01 61 07 0A 01 00 04 00 04 00 __ __ 0....a........ > > 0000 12: SEQUENCE { > 0002 1: INTEGER = 1 > 0005 7: [APPLICATION 1] { > 0007 1: ENUM = 0 > 000A 0: STRING = '' > 000C 0: STRING = '' > 000E : } > 000E : } > Please Enter the Name of the user > Daniel Davidson > Please Enter the the users UID > jobuddah > Please Enter the user's Password > df > Please Enter the Password again > df > Please Enter the shell of the user > [/usr/libexec/openssh/sftp-server] > > uid=jobuddah,ou=People,dc=life,dc=uiuc,dc=edu > Net::LDAP=HASH(0x804c00c) sending: > > substr outside of string at > /usr/lib/perl5/site_perl/5.8.0/Convert/ASN1/Debug.pm line 33, <STDIN> line 5. > > Is that any more help? > > Dan > > > ay 26 March 2003 12:53 pm, Graham Barr wrote: > > Can you turn on debug at the start of the script, not just before > > the ->add call. It may be the previous request that triggers > > the problem. > > > > Graham. > > > > On Wed, Mar 26, 2003 at 11:47:42AM -0600, Daniel Davidson wrote: > > > Debug gave me: > > > Net::LDAP=HASH(0x804c00c) sending: > > > > > > substr outside of string at > > > /usr/lib/perl5/site_perl/5.8.0/Convert/ASN1/Debug.pm line 33, <STDIN> > > > line 5. > > > > > > I havent been able to find anything in the logs except for where I have > > > stopped and restared slapd. It logs to /var/log somewhere, right? > > > > > > Dan > > > > > > On Wednesday 26 March 2003 11:09 am, Graham Barr wrote: > > > > On Wed, Mar 26, 2003 at 10:52:50AM -0600, Daniel Davidson wrote: > > > > > Following Grahm's advice, I received the following message. > > > > > > > > > > USR2 at /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 661 > > > > > > > > That line is the select on the socket. What do you see with a debug > > > > trace on ? $ldap->debug(15); > > > > > > > > Also, do you have access to the server logs, if so do you see anything > > > > there. > > > > > > > > Graham. > > > > > > > > > Know what I am doing wrong yet? > > > > > > > > > > Dan > > > > > > > > > > On Wednesday 26 March 2003 10:18 am, Graham Barr wrote: > > > > > > On Wed, Mar 26, 2003 at 03:32:02PM +0000, Chris Ridd wrote: > > > > > > > On 26/3/03 3:13 pm, Daniel Davidson <da...@li...> wrote: > > > > > > > > When I remove the [$dn] and replace it with $dn then my > > > > > > > > origional problem of the script hanging without an error > > > > > > > > happens again. > > > > > > > > > > > > > > > > I'm stumped, > > > > > > > > > > > > > > > > Dan > > > > > > > > > > > > > > Oops, to set the entry's DN just pass the DN as the first arg to > > > > > > > add and not as dn => something. > > > > > > > > > > > > > > $ldap->add($dn, > > > > > > > attrs => [ blah blah ]); > > > > > > > > > > > > There is no difference between $ldap->ad($dn,...) and > > > > > > $ldap->add(dn => $dn,...) > > > > > > > > > > > > It would be interesting to determine where it is hanging. > > > > > > > > > > > > Try adding this to your script. > > > > > > > > > > > > use Carp; > > > > > > $SIG{USR2} = \&Carp::croak; > > > > > > > > > > > > Then when it hangs, find the pid and in another shell do > > > > > > > > > > > > kill -USR2 $pid > > > > > > > > > > > > You should see a stack trace on stderr. > > > > > > > > > > > > Although if you are on a windows box I am not sure this will work. > > > > > > > > > > > > Graham. > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > > > This SF.net email is sponsored by: > > > > > > The Definitive IT and Networking Event. Be There! > > > > > > NetWorld+Interop Las Vegas 2003 -- Register today! > > > > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > > > > > > > > > > ------------------------------------------------------- > > > > > This SF.net email is sponsored by: > > > > > The Definitive IT and Networking Event. Be There! > > > > > NetWorld+Interop Las Vegas 2003 -- Register today! > > > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > > > > ------------------------------------------------------- > This SF.net email is sponsored by: > The Definitive IT and Networking Event. Be There! > NetWorld+Interop Las Vegas 2003 -- Register today! > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en ________________________________________________________________________ | --+-- | | | Brad Diggs E-mail: Br...@Di... Web Site: http://www.DiggsFamily.net The Truth is a person named Jesus (John 14:6). Do you know Him? He knows you and has a wonderful plan for your life (John 20:31). ________________________________________________________________________ |
From: Daniel D. <da...@li...> - 2003-03-26 20:49:33
|
Thaks all, that did it. Dan On Wednesday 26 March 2003 01:56 pm, Brad Diggs wrote: > I am having the same problem that you are having. > > Try setting your LANG environment variable to en_US. > > Brad > > On Wed, 2003-03-26 at 13:44, Daniel Davidson wrote: > > For simplicity's sake, I removed the search I was doing and replaced = it > > with values I wanted it to use for gid and uid, so I disabled the sea= rch. > > > > That leaves my entire output as: > > Net::LDAP=3DHASH(0x804c00c) sending: > > > > 30 32 02 01 01 60 2D 02 01 03 04 21 63 6E 3D 6D 02...`-....!cn=3Dm > > 61 6E 61 67 65 72 2C 64 63 3D 6C 69 66 65 2C 64 anager,dc=3Dlife,d > > 63 3D 75 69 75 63 2C 64 63 3D 65 64 75 80 05 67 c=3Duiuc,dc=3Dedu..g > > 66 75 6E 6B __ __ __ __ __ __ __ __ __ __ __ __ funk > > > > 0000 50: SEQUENCE { > > 0002 1: INTEGER =3D 1 > > 0005 45: [APPLICATION 0] { > > 0007 1: INTEGER =3D 3 > > 000A 33: STRING =3D 'cn=3Dmanager,dc=3Dlife,dc=3Duiuc,dc=3Dedu' > > 002D 5: [CONTEXT 0] > > 002F : 67 66 75 6E 6B __ __ __ __ __ __ __ __ __ __ __ gfun= k > > 0034 : } > > 0034 : } > > Net::LDAP=3DHASH(0x804c00c) received: > > > > 30 0C 02 01 01 61 07 0A 01 00 04 00 04 00 __ __ 0....a........ > > > > 0000 12: SEQUENCE { > > 0002 1: INTEGER =3D 1 > > 0005 7: [APPLICATION 1] { > > 0007 1: ENUM =3D 0 > > 000A 0: STRING =3D '' > > 000C 0: STRING =3D '' > > 000E : } > > 000E : } > > Please Enter the Name of the user > > Daniel Davidson > > Please Enter the the users UID > > jobuddah > > Please Enter the user's Password > > df > > Please Enter the Password again > > df > > Please Enter the shell of the user > > [/usr/libexec/openssh/sftp-server] > > > > uid=3Djobuddah,ou=3DPeople,dc=3Dlife,dc=3Duiuc,dc=3Dedu > > Net::LDAP=3DHASH(0x804c00c) sending: > > > > substr outside of string at > > /usr/lib/perl5/site_perl/5.8.0/Convert/ASN1/Debug.pm line 33, <STDIN> > > line 5. > > > > Is that any more help? > > > > Dan > > > > ay 26 March 2003 12:53 pm, Graham Barr wrote: > > > Can you turn on debug at the start of the script, not just before > > > the ->add call. It may be the previous request that triggers > > > the problem. > > > > > > Graham. > > > > > > On Wed, Mar 26, 2003 at 11:47:42AM -0600, Daniel Davidson wrote: > > > > Debug gave me: > > > > Net::LDAP=3DHASH(0x804c00c) sending: > > > > > > > > substr outside of string at > > > > /usr/lib/perl5/site_perl/5.8.0/Convert/ASN1/Debug.pm line 33, <ST= DIN> > > > > line 5. > > > > > > > > I havent been able to find anything in the logs except for where = I > > > > have stopped and restared slapd. It logs to /var/log somewhere, > > > > right? > > > > > > > > Dan > > > > > > > > On Wednesday 26 March 2003 11:09 am, Graham Barr wrote: > > > > > On Wed, Mar 26, 2003 at 10:52:50AM -0600, Daniel Davidson wrote= : > > > > > > Following Grahm's advice, I received the following message. > > > > > > > > > > > > USR2 at /usr/lib/perl5/site_perl/5.8.0/Net/LDAP.pm line 661 > > > > > > > > > > That line is the select on the socket. What do you see with a d= ebug > > > > > trace on ? $ldap->debug(15); > > > > > > > > > > Also, do you have access to the server logs, if so do you see > > > > > anything there. > > > > > > > > > > Graham. > > > > > > > > > > > Know what I am doing wrong yet? > > > > > > > > > > > > Dan > > > > > > > > > > > > On Wednesday 26 March 2003 10:18 am, Graham Barr wrote: > > > > > > > On Wed, Mar 26, 2003 at 03:32:02PM +0000, Chris Ridd wrote: > > > > > > > > On 26/3/03 3:13 pm, Daniel Davidson <danield@life.uiuc.ed= u>=20 wrote: > > > > > > > > > When I remove the [$dn] and replace it with $dn then m= y > > > > > > > > > origional problem of the script hanging without an erro= r > > > > > > > > > happens again. > > > > > > > > > > > > > > > > > > I'm stumped, > > > > > > > > > > > > > > > > > > Dan > > > > > > > > > > > > > > > > Oops, to set the entry's DN just pass the DN as the first= arg > > > > > > > > to add and not as dn =3D> something. > > > > > > > > > > > > > > > > $ldap->add($dn, > > > > > > > > attrs =3D> [ blah blah ]); > > > > > > > > > > > > > > There is no difference between $ldap->ad($dn,...) and > > > > > > > $ldap->add(dn =3D> $dn,...) > > > > > > > > > > > > > > It would be interesting to determine where it is hanging. > > > > > > > > > > > > > > Try adding this to your script. > > > > > > > > > > > > > > use Carp; > > > > > > > $SIG{USR2} =3D \&Carp::croak; > > > > > > > > > > > > > > Then when it hangs, find the pid and in another shell do > > > > > > > > > > > > > > kill -USR2 $pid > > > > > > > > > > > > > > You should see a stack trace on stderr. > > > > > > > > > > > > > > Although if you are on a windows box I am not sure this wil= l > > > > > > > work. > > > > > > > > > > > > > > Graham. > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > > > > This SF.net email is sponsored by: > > > > > > > The Definitive IT and Networking Event. Be There! > > > > > > > NetWorld+Interop Las Vegas 2003 -- Register today! > > > > > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > > > > > > > > > > > > ------------------------------------------------------- > > > > > > This SF.net email is sponsored by: > > > > > > The Definitive IT and Networking Event. Be There! > > > > > > NetWorld+Interop Las Vegas 2003 -- Register today! > > > > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > > > > ------------------------------------------------------- > > This SF.net email is sponsored by: > > The Definitive IT and Networking Event. Be There! > > NetWorld+Interop Las Vegas 2003 -- Register today! > > http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en > > _______________________________________________________________________= _ > > --+-- > > > > Brad Diggs > E-mail: Br...@Di... > Web Site: http://www.DiggsFamily.net > > The Truth is a person named Jesus > (John 14:6). Do you know Him? He > knows you and has a wonderful plan > for your life (John 20:31). > > _______________________________________________________________________= _ |