spl23 wrote:I've pulled Peter's patch into pishutdown today - for which many thanks - and I have tested the shutdown options under all the circumstances I can think of. You are quite correct that sudo no longer seems to be needed for any of them. (It certainly used to be needed, so something has changed somewhere - presumably this happened in the move to Jessie.)
The new pishutdown will be available with an apt update in the not too distant future.
Good to hear, because after doing a
sudo apt-get update && sudo apt-get dist-upgrade it's very broken again. But the problems seem to be more than just pishutdown, because almost everything in the menu that requires admin rights fails to ask for a password and just locks the system up if you don't have the
NOPASSWD option set in visudo.
I really don't want to run with
NOPASSWD, but the Raspbian GUI/desktop seems to be very broken without it.
I have my users set as
ALL=(ALL:ALL) ALL with
visudo, and my users are in the "sudo" group.
When I use the menu to launch something like the new SD Card Copier, it just locks-up the system instead of asking for a password, because it seems to assume the NOPASSWD option will be set. I have been fixing these things as I find them by adding
gksu /usr/bin/ before the application name, which forces Raspbian to ask for a password, but this shouldn't be necessary.
The Raspberry Pi is supposed to be a teaching tool, so shouldn't we be teaching people to use Linux properly? I mean, if you are going to allow people to login to the system with admin rights and NOPASSWD, you might as well just give root a password and login as root (the "pi" user is just as bad).
Nickcn wrote:You can reboot and shutdown the system without sudo for non-Pi user, here is how:
right "Alt"+prtScr/"SysRq" (you may need to push SysRq, then release it), then while still holding "Alt", hit "B", or using left Alt, simply ... "alt"+"sysrq"+"b"
System will reboot, then use shutdown upper right hand corner of screen.
Or just to turn off, do: "alt"+"sysrq"+"o"
Done.
The correct way to do that is
alt+sysreq R E I S U B (hold
alt+sysreq then press each of the
r e i s u b keys in sequence with a few seconds delay between each). What you are proposing forces a reboot or shutdown without cleanly exiting the filesystem. Might as well just pull the power plug. An easy mnemonic to use to remember that is,
Reboot
Even
If
System
Utterly
Broken (substitute "o" for "b" to power off).
Aloha, Tim
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?