From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 2129C138CC5 for ; Sun, 22 Mar 2015 11:05:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3C597E08EE; Sun, 22 Mar 2015 11:04:58 +0000 (UTC) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CD19CE085B for ; Sun, 22 Mar 2015 11:04:56 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YZdga-0000Kv-Qg for gentoo-user@lists.gentoo.org; Sun, 22 Mar 2015 12:04:52 +0100 Received: from athedsl-232940.home.otenet.gr ([85.74.229.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 22 Mar 2015 12:04:52 +0100 Received: from realnc by athedsl-232940.home.otenet.gr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 22 Mar 2015 12:04:52 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: gentoo-user@lists.gentoo.org From: Nikos Chantziaras Subject: [gentoo-user] Re: How to poweroff the system from user? Date: Sun, 22 Mar 2015 13:04:44 +0200 Organization: Lucas Barks Message-ID: References: <20150321152656.a82a84b3e8a32c8b68554548@gmail.com> <20150321165842.b6c4a9ca7aa6d9e28b8f9d91@gmail.com> <2098241.ygyfAjpUPx@wstn> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: athedsl-232940.home.otenet.gr User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 In-Reply-To: <2098241.ygyfAjpUPx@wstn> X-Archives-Salt: 8a3bbd93-d9b8-4540-ac35-9907f48b9f8a X-Archives-Hash: 78c73e684f4885368e74972936f6bedf On 22/03/15 12:30, Peter Humphrey wrote: > On Saturday 21 March 2015 16:20:17 Jc García wrote: >>> Interesting. But as I said ealier, I can reboot the system when I am a >>> user by Ctrl+Alt+Delete. The user can reboot the system, but can't shut >>> down? Strange >> It's not strange, `man 2 reboot`. It's a defined behavior. > > I'm with German here. Being designed that way doesn't stop it being strange. > > Consider: I'm an ordinary user sitting at a terminal. I'm not allowed to > halt the machine, but I am allowed to reboot it into perhaps some quite > other configuration. Or I can keep rebooting it over and again, effectively > preventing the machine from doing its job. How does that make sense? The thinking is that you can unplug the machine, or press the hardware reset or power button, or flip the PSU switch... Preventing a ctrl+alt+del reboot does not add anything to security. Security doesn't really apply to users with physical access to the machine. However, this is just a default. You can easily disable reboot on ctrl+alt+del by editing /etc/inittab and commenting-out this line: ca:12345:ctrlaltdel:/sbin/shutdown -r now Note though, that is someone wants to reboot, and ctrl+alt+del doesn't work, pressing the reset button is far worse, since there's no clean shutdown performed (unmounting filesystems after flushing caches, etc.) Because of that, the default of allowing ctrl+alt+del for local users makes more sense than disabling it.