Shouldn't you redirect the output of the command ldapmodrdn ?
<pre>
>/dev/null/ 2>&1
</pre>