Shutdown

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

Reply to
H0Iger SchuIz
Loading thread data ...

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...;-)

--
Ineptocracy 

(in-ep-toc?-ra-cy) ? a system of government where the least capable to  
lead are elected by the least capable of producing, and where the  
members of society least likely to sustain themselves or succeed, are  
rewarded with goods and services paid for by the confiscated wealth of a  
diminishing number of producers.
Reply to
The Natural Philosopher

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

Reply to
Gordon Henderson

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.

--
Kees Theunissen.
Reply to
Kees Theunissen

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.