Is my observation correct, that the shutdown procedure may only be invoked by a sudoer? I.e. when I'm logged in as an "ordinary" userI have to log out, log in as "pi" or someone to be able to shutdown?
hs
Is my observation correct, that the shutdown procedure may only be invoked by a sudoer? I.e. when I'm logged in as an "ordinary" userI have to log out, log in as "pi" or someone to be able to shutdown?
hs
yes in almost all cases without doing something similar at code levcel#]
The process that need to be stopped for an orderly shutdown are in a large number of cases root owned processes.
For a disorderly shutdown, pull the power...;-)
Yes, but you can give your ordinary user the ability to sudo halt if you need it. See the man pages for the sudo command and its configuration file.
Gordon
I'm running raspbian in runlevel 2 (that is without a graphical interface) and I configured the system to shut down when ctrl-alt-del is pressed. Out of the box is raspbian configured to reboot on ctrl-alt-del.
A few lines from my /etc/inittab:
# /etc/inittab: init(8) configuration. # $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $
# The default runlevel. id:2:initdefault:
...
# What to do when CTRL-ALT-DEL is pressed. #ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -h now
So when I want to shut down I just log off and press ctrl-alt-del.
If you're running some graphical desktop then the desktop might intercept the pressing of those keys.
Regards,
Kees.
Have something to add? Share your thoughts — no account required.
Ask the community — no account required