On Wed, 27 Feb 2019, Paul Heinlein wrote:

My experience is that sudo expects the command line invocation to look
like the sudo configuration. So what I'd do is add a function, not an
alias, to .bashrc:

function halt {
 /sbin/shutdown -h now
}

But since "halt" is the name of an actual executable, maybe train her to use something like "haltnow" and tweak the name of the function:

function haltnow {
 /sbin/shutdown -h now
}

Paul,

Your experiences easily top my web search. :-) I read that if the sudo alias
has a space before the closing quote bash will pass the following command to
sudo.

The issue today seems to be that she typed
sudo /bin/halt
rather than
sudo /sbin/halt

I'll try both your haltnow function and the doit alias and report the
results ... probably over the weekend.

Many thanks,

Rich
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to