Piping password is not very secure, just a tip:dcung wrote:Thanks Fred, forgot to mention that I need it to run unattended like last time (in Startup).
But I remember that I can pipe the password, so modified your suggestion a little and problem resolved. Smile
You can add exceptions for sudo asking for password if the user is added to group "wheel"
Maybe you have file: "/etc/sudoers.d/user_wheel" already, content for me is:
Code: Select all
%wheel ALL= NOPASSWD: /sbin/shutdown, /sbin/reboot, /sbin/poweroff, /usr/bin/wmpoweroff, /usr/bin/wmreboot, /usr/bin/save2flash, /usr/sbin/pm-suspend
Code: Select all
%wheel ALL= NOPASSWD: /sbin/shutdown, /sbin/reboot, /sbin/poweroff, /usr/bin/wmpoweroff, /usr/bin/wmreboot, /usr/bin/save2flash, /usr/sbin/pm-suspend, /usr/local/bin/fatdog-drive-icon-mount-helper.sh
sudo fatdog-drive-icon-mount-helper.sh
And there will be no prompt for password.
EDIT: If you create such a file in /etc/sudoers.d/, it must have permissions 0440
Fred