@ajalkane There is nothing wrong with the execroot script. So it really seems like copy or lf/cr mistakes. Only one little thing: the script takes only one parameter (the commmand itself). But what about having the need to give some parameters to that script?
execroot.sh "/sbin/stop mce"
I have the approach using a template header activating root rights and then execute the shell script in lower part of the same file.