[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

No such object errors with Ruby-LDAP...

augustf

10/13/2006 7:36:00 PM

Hi everyone,
I'm in the process of writing a small script for my LDAP-enabled
Rails site (the script below has been converted to ruby shell form for
easy testing). It will enable users to change their passwords. I didn't
use activeldap because of the issue of breaking the rest of the site
(which also depends on ldap - activeldap support for multiple
connections is really bad).

Here's the problem - every time I run this - I get a "no such object"
error. Anyone know what I'm doing wrong?
================

require 'ldap'
require 'base64'
require 'digest/md5'

newer_pass = "{MD5}" + Base64.encode64(
Digest::MD5.digest("password") ).chomp

reset = [LDAP.mod(LDAP::LDAP_MOD_REPLACE, "userPassword",
[newer_pass]),]

conn = LDAP::Conn.new( 'rpisenate.com', 389 )
conn.set_option( LDAP::LDAP_OPT_PROTOCOL_VERSION, 3 )
conn.bind('cn=admin,dc=mysite,dc=com', 'admin_pass') do
begin
conn.modify("uid=usersuid,ou=users,dc=mysite,dc=com", reset)
rescue LDAP::ResultError => msg
puts "Can't change password: " + msg
exit 0
rescue LDAP::Error => errcode
puts "Can't change password: " + LDAP.err2string(errcode)
exit 0
end
end

1 Answer

Belle Kenneth Sharpe

9/13/2013 2:33:00 AM

0

Real name Fwanklin. Fwanklin is a famous homo. Fwanklin's 15 seconds
of fame came at a Star Trek Convention when he embarrassed the
audience, embarrassed America, embarrassed humanity and embarrassed
Gene Roddenberry by asking why Star Trek didn't have any faggot
characters. Fwanklin, after many beatings, has become just another
cock-slapped usenet zoo monkey. Liars, once they have been exposed,
frequently revert to behavior most similar to a zoo monkey who sits in
the cage throwing feces at passersby but saying nothing of value.

Franklin Hummel - born May 1953
18 Linwood St, Unit 3
Boston, Massachusetts 02119-1543
(617) 541-3834
E-mail: hummel@world.std.com
Possible Fag Butt-Buddy: Arnold D Thomas (Age 52)

Franklin Hummel - Supervisor
Boston Public Library
700 Boylston Street
Boston, Massachusetts 02116
(617) 536-5400
(617) 536-3813 Fax
www.bpl.org

[][][][][][]


The DemocRATs Hall Of Shame asks "Why do you always LIE?"

[Courtesy of Buster Norris]

On Thu, 3 Jan 2013 18:27:42 -0800 (PST), "Tom Sr."
<thomas.swift.senior@gmail.com> wrote:
>Oh and, Junior, it was the *Republicans* that had their asses kicked
>and kicked *hard* in the recent budget deal.

Oops! Caught lying...

What did Buckwheat demand? Tax increases for everyone making over
$250k/yr.

What did Buckwheat get? Tax increases ONLY for everyone making over
$400-450k/yr.

That's a loss...

What did the GOP face? Tax increases for EVERYONE.

What did the GOP get? Tax increases ONLY for those making over
$400-450k/yr.

That's a win (for every taxpayer in America making less than
$400-450k/yr.) ...

>Our President Obama didn't "Run Away".

Yep, he did, like the smacked-ass communist that he is...

Posted on behalf of:
The DemocRATs Hall of Shame!