Running the latest version of ldapscripts from Debian lenny (ver 1.7.1-2) I was getting this error:
whenever I was running ldapadduser.
To fix this you have to edit /usr/share/ldapscripts/runtime and find the line:
1 2 3 4
and change it to:
in order to fix the trap error.