what contains $UserDN ?

may be you can use @UserID instead of $userDN.
userDN seems to be u user distinguished name and the classical form is CN=xxxx, OU=xxxx, dc=xxxx, dc=xxxx

this is not the form of the keyword in you ini file.
_________________________
Christophe