My goal is to move an account to another OU. My understanding is that the following code should do the job. However, it returns false
. There is no error, warning or exceptions. How do I debug why this isn't working?
secure_ldap.rename(
olddn: self.dn,
newrdn: "CN=#{self.cn}",
delete_attributes: true,
new_superior: "#{ou}"
)
Well, one approach might be to add pry and pry-byebug to your application. Modify your code to include
binding.pry
then run your application:Now use
step
to step through the execution line by line. It will allow you to step into therename
method call inside of net-ldap, and for example inspect the local variables within that method call.