Skip to content

Instantly share code, notes, and snippets.

$ script/console --debugger
=> Debugger enabled
Loading development environment (Rails 2.3.2)
>> Group.find('1.999.9998888')
ActiveLdap::UnknownAttribute: umpn is unknown attribute
from /home/thermans/src/targets/vendor/plugins/activeldap-trunk/lib/active_ldap/base.rb:1230:in `set_attribute'
from /home/thermans/src/targets/vendor/plugins/activeldap-trunk/lib/active_ldap/base.rb:741:in `dn='
from /home/thermans/src/targets/vendor/plugins/activeldap-trunk/lib/active_ldap/base.rb:1110:in `initialize_by_ldap_data'
from /home/thermans/src/targets/vendor/plugins/activeldap-trunk/lib/active_ldap/base.rb:598:in `instantiate_without_callbacks'
from /home/thermans/src/targets/vendor/plugins/activeldap-trunk/lib/active_ldap/base.rb:597:in `instance_eval'
$ cat log/development.log
Attempting to reconnect
LDAP: connect (0.9ms): {:with_start_tls=>false, :uri=>"ldap://umedir01"}
LDAP: bind (193.3ms): {:dn=>"cn=root"}
Bound to ldap://umedir01 by simple as cn=root
LDAP: search: FAILED (0.0ms): {:base=>"", :error_message=>"no result returned by search", :scope=>:base, :attributes=>["subschemaSubentry"], :error=>"RuntimeError", :filter=>"objectClass=*"}
Attempting to reconnect
LDAP: unbind (0.1ms)
LDAP: connect (0.1ms): {:with_start_tls=>false, :uri=>"ldap://umedir01"}
LDAP: bind (191.0ms): {:dn=>"cn=root"}
20090409 224326667+0000 umedir01 imdircacheserv 24819 15 15;ldap=0 new connection on 577
20090409 224326668+0000 umedir01 imdircacheserv 24819 15 15;ldap=0 conn=67 fd=577 connection from 165.137.248.184:36152
20090409 224326669+0000 umedir01 imdircacheserv 24819 102 102;ldap=0 conn=67 op=0 BIND ver=3 dn="cn=root" method=128
20090409 224326670+0000 umedir01 imdircacheserv 24819 102 102;ldap=0 conn=67 op=0 RESULT err=0 tag=97 nentries=0
20090409 224326685+0000 umedir01 imdircacheserv 24819 102 102;ldap=0 conn=67 op=1 SRCH base="cn=site,cn=admin root" scope=2 filter="(&(umpn=1.999.9998888)(objectclass=umphonenumber))"
20090409 224326690+0000 umedir01 imdircacheserv 24819 102 102;ldap=0 conn=67 op=1 RESULT err=0 tag=101 nentries=1
20090409 224326712+0000 umedir01 imdircacheserv 24819 102 102;ldap=0 conn=67 op=2 UNBIND
20090409 224326712+0000 umedir01 imdircacheserv 24819 102 102;ldap=0 conn=67 op=2 fd=577 closed errno=0
20090409 224326713+0000 umedir01 imdircacheserv 24819 102 102;ldap=0 conn=67 op=2 RESULT err=0
$ ldapsearch -D cn=root -w secret -b "" -s base '(objectclass=*)' subschemaSubentry
subschemasubentry=cn=schema
$ ldapsearch -D cn=root -w secret -b "cn=schema" '(objectclass=subschema)' objectClasses attributeTypes matchingRules matchingRuleUse dITStructureRules dITContentRules nameForms ldapSyntaxes
...
objectclasses=( 1.3.6.1.4.1.2415.3.35.2.3 NAME 'umphonenumber' SUP top AUXILIARY MAY ( umpn $ umpntype $ umpnstatus $ umpnlabel $ umpngreetings $ umpnlocale $ umid ) )
...
-- awesome 3 configuration file
-- Include awesome libraries
require("awful")
require("beautiful")
require("wicked")
require("naughty")
require("shifty")
-- Load revelation
--require("revelation")
-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
-- Extra widgets
require("vicious")
(org-set-generic-type
"confluence"
'(:file-suffix ".txt"
:key-binding ?C
:author-export nil
:toc-export nil
:todo-keywords-export t
:title-format "h2. %s\n"
<xsd:get_um_subscriber_summary_response xmlns:xsd="http://com/acmephone/ovm/cas/xsd">
<xsd:subscriber_details>
<typ:phone_number xmlns:typ="http://com/acmephone/ovm/cas/types">1.555.5553002</typ:phone_number>
<typ:timezone xmlns:typ="http://com/acmephone/ovm/cas/types">MST7MDT</typ:timezone>
<typ:vm_pin xmlns:typ="http://com/acmephone/ovm/cas/types">3002</typ:vm_pin>
<typ:mwn xmlns:typ="http://com/acmephone/ovm/cas/types">
<typ:email>
<typ:emailAddress>joe@foo.com</typ:emailAddress>
<typ:mwnStatus>false</typ:mwnStatus>
</typ:email>
require 'happymapper'
module OSG
class Sub
include HappyMapper
tag 'typ'
element :vm_pin, String, :xpath => "//typ:vm_pin"
element :phone_number, String, :xpath => "//typ:phone_number"
# require 'sinatra'
require 'active_ldap'
class Target < ActiveLdap::Base
ldap_mapping :dn_attribute => "umpn",
:prefix => "",
:classes => ['top', 'umphone', 'umphonenumber']
end
ActiveLdap::Base.setup_connection :host => 'ldaphost',