You are not logged in.

#1 2010-01-22 13:00:33

JohannesSM64
Member
From: Norway
Registered: 2009-10-11
Posts: 623
Website

Power

I don't get it.

1) /sbin/halt, /sbin/poweroff, /sbin/reboot and /sbin/shutdown require root privileges, but simply pressing ctrl+alt+del at any time in a tty, as normal user, even though I'm not in the "power" group, reboots.
2) Whether my user is in the "power" group does apparently not make any difference. (I don't use any DE or power management btw)

Where's the logic, and what is the "power" group for?

Offline

#2 2010-01-22 13:39:47

ZaQ
Member
Registered: 2009-12-12
Posts: 106

Re: Power

Are you using gdm,kdm,...? This woild be responsible for shutdown with ctrl alt del.
And its not shutting down with /sbin/shutdown. It's working with hal afaik.

Offline

#3 2010-01-22 13:42:45

JohannesSM64
Member
From: Norway
Registered: 2009-10-11
Posts: 623
Website

Re: Power

No, I do not use any DE, power manager or login manager.

No, /sbin/shutdown is not related to HAL.

shutdown brings the system down in a secure way. All logged-in users are notified that the system is going down, and login(1) is blocked. It is possible to shut the system down immediately or after a specified delay. All processes are first notified that the system is going down by the signal SIGTERM. This gives programs like vi(1) the time to save the file being edited, mail and news processing programs a chance to exit cleanly, etc. shutdown does its job by signalling the init process, asking it to change the runlevel. Runlevel 0 is used to halt the system, runlevel 6 is used to reboot the system, and runlevel 1 is used to put to system into a state where administrative tasks can be performed; this is the default if neither the -h or -r flag is given to shutdown. To see which actions are taken on halt or reboot see the appropriate entries for these runlevels in the file /etc/inittab.

I have this line in my inittab (Arch default):

ca::ctrlaltdel:/sbin/shutdown -t3 -r now

Explains the C+A+D, but I still wonder what the "power" group is for.

Last edited by JohannesSM64 (2010-01-22 14:06:08)

Offline

#4 2010-01-22 15:03:24

n0dix
Member
Registered: 2009-09-22
Posts: 956

Re: Power

JohannesSM64 wrote:

Explains the C+A+D, but I still wonder what the "power" group is for.

I read here http://wiki.archlinux.org/index.php/Groups, is to suspend options.

Offline

#5 2010-01-22 15:04:18

Surgat_
Member
Registered: 2007-08-08
Posts: 317

Re: Power

It is for allowing users to shut down the computer from a graphical environment, through HAL.

Offline

#6 2010-01-23 00:17:15

PirateJonno
Forum Fellow
From: New Zealand
Registered: 2009-04-13
Posts: 372

Re: Power

Surgat_ wrote:

It is for allowing users to shut down the computer from a graphical environment, through HAL.

no, read the above post. graphical environments use consolekit to shutdown, not HAL. consolekit uses policykit for authentication, and the default is that a program on any 'active' session (i.e. one corresponding to a visible X display) can shutdown without a password


"You can watch for your administrator to install the latest kernel with watch uname -r" - From the watch man page

Offline

Board footer

Powered by FluxBB