Bug 1303892 - reboot can now be run by unprivileged users
Summary: reboot can now be run by unprivileged users
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 23
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-02 10:56 UTC by David Howells
Modified: 2016-02-02 14:24 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-02-02 13:10:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description David Howells 2016-02-02 10:56:20 UTC
Description of problem:

I found out by accident that the 'reboot' command can now be run by an unprivileged user - you don't need to be root to use it.

One thing I don't know is whether this user needs to be the user you're logged in as.

Version-Release number of selected component (if applicable):

systemd-222-13.fc23.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Go to unprivileged shell prompt.  Type reboot.  Hit enter.
2.
3.

Actual results:

System reboots

Expected results:

Should get an error message telling me that I don't have sufficient privilege for this.  System should not reboot.

Additional info:

I have /usr/sbin in my path because that directory contains some useful programs that can be run as an unprivileged user - wireshark for example.

Comment 1 Zbigniew Jędrzejewski-Szmek 2016-02-02 13:10:07 UTC
Yes, it's intentional. Users logged in at a physical console get a right to reboot the machine. This is done through policykit, see /usr/share/polkit-1/actions/org.freedesktop.login1.policy. You can always override this setting locally.

Comment 2 David Howells 2016-02-02 14:24:23 UTC
This seems to show the right way to override it:

    https://www.centos.org/forums/viewtopic.php?f=47&t=50936


Note You need to log in before you can comment on or make changes to this bug.