Bug 152125 - Any non-root user can do "reboot" or "shutdown"
Summary: Any non-root user can do "reboot" or "shutdown"
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: pam (Show other bugs)
(Show other bugs)
Version: 4.0
Hardware: All Linux
Target Milestone: ---
: ---
Assignee: Tomas Mraz
QA Contact: Jay Turner
Depends On:
TreeView+ depends on / blocked
Reported: 2005-03-25 02:54 UTC by masanari iida
Modified: 2015-01-08 00:09 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-03-25 08:36:26 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description masanari iida 2005-03-25 02:54:47 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050319

Description of problem:
/etc/pam.d/reboot  allow us to do reboot the system.

auth sufficient pam_rootok.so    is currently set.
auth required pam_rootok.so      is recommended for security reason.

After change to "required" , system return " reboot: must be super user".
I have seen this symptom on RHAS3,too.
Is this a bug or change security specification?

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

How reproducible:

Steps to Reproduce:
1. create non-root user.
2. login to the system with non-root user
3. do reboot 

Actual Results:  System do reboot

Expected Results:  System return
reboot: must be superuser

Additional info:

Comment 1 masanari iida 2005-03-25 02:58:27 UTC
"reboot" and "halt" commands are affected.
If I do "shutdown" from non-root user, it is blocked. 
( shutdown: must be superuser )

Comment 2 Tomas Mraz 2005-03-25 08:36:26 UTC
This is expected behaviour - to be able to reboot/halt the machine you don't
have to be superuser, you must have obtained the console lock only. You can try
if you are logged on using gdm/text login as a first user and then you log in as
another user - the second user cannot reboot the machine. So this policy in
/etc/pam.d/reboot(halt) is fine in case the machine is used as a normal
workstation or a server either without normal users or without console access
for normal users.
Of course in case of multiuser machine with console access for normal users it's
necessary for administrator of the machine to change this (as you done).

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