The correct way to get an ad-hoc task to run as the main admin account is to leave userid as null. Setting it causes fatal errors if the main admin account is set to auth: nologin.