This is how we accomplished it:
@ldap.rename(olddn: user.dn, newrdn: "CN=#{user.cn.first}", delete_attributes: true, new_superior: "#{new_ou},DC=ctatechs,DC=com")
it's been awhile since last working with it, but it still works for us. Also, we use the version on github not the rubygems version. I think it's the newest version available. 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}"
)