-put aways one more * when use sudoedit in order to avoid to open more > that one file. (/usr/binsudoedit /etc/samba/* *) Last one is wrong. You should use: !/usr/bin/sudoedit /etc/samba/* * there is a (!) at the bigginig (I'm not sure if this work, test it !!) Regards