The perl script has to run as root. Therefore we need a wrapper, sudo. Edit /etc/sudoers on host where homedirs or quotas should be used and add the following line:
$admin All= NOPASSWD: $path_to_lamdaemon
$admin is the admin user from LAM (must be a valid Unix account) and $path_to_lamdaemon is the path to lamdaemon.pl.
Example:
myAdmin ALL= NOPASSWD: /srv/www/htdocs/lam/lib/lamdaemon.pl
You might need to run the sudo command once manually to init sudo. The command "sudo -l" will show all possible sudo commands of the current user.