From: Rcmn 73 Date: 2007-02-06T01:45:34+09:00 Subject: Re: net::ldap - add_attribute I finally found my mistake and fixed it that way. thank you for the help. require 'net/ldap' # look up Machine to ProdWindowsXPWorkstations ldap = Net::LDAP.new :host => '11111111', :port => 389, :auth => { :method => :simple, :username => "cn=user,ou=ou0,ou=ou1,ou=ou3,dc=dc,dc=dc1,dc=net", :password => "pass" } filter = Net::LDAP::Filter.eq( "cn", "monnomdemachine" ) treebase = "dc=dc,dc=dc1,dc=net" ldap.search( :base => treebase, :filter => filter ) do |entry| dnwks = "DN: #{entry.dn}" dn = "CN=mygoupe,OU=uu2,OU=uu1,OU=uu,dc=dc,dc=dc1,dc=net" ldap.add_attribute dn, :member, dnwks end p ldap.get_operation_result -- Posted via http://www.ruby-forum.com/.