Bug 8127 - Any user can shutdown RH 6.x boxen
Any user can shutdown RH 6.x boxen
Product: Red Hat Linux
Classification: Retired
Component: usermode (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Michael K. Johnson
: Security
Depends On:
  Show dependency treegraph
Reported: 2000-01-02 23:20 EST by preed
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-01-04 09:13:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description preed 2000-01-02 23:20:41 EST
This surprised the hell out of me, but I tried it with my current, fresh
RHAT 6.1 install, and it worked perfectly. Very simply, any user can
shutdown a RHAT 6.x box.

[preed@excelsior preed]$ whoami
[preed@excelsior preed]$ shutdown -k now
Password: <typed in preed's password>
Broadcast message from root Sun Jan  2 20:31:24 2000...

The system is going down to maintenance mode NOW !!
[preed@excelsior preed]$

Now, I don't know if this is a "feature," but allowing any user to shutdown
boxen on RHAT 6.x isn't a good thing (tm).

I tested with 6.1; a friend who told me about it tested with 6.0.

BTW, props to Kennan (kmblehm@sigkill.com) for reporting this to me...
Comment 1 Jeff Johnson 2000-01-04 09:13:59 EST
This is a feature of PAM console. Any user who has access to the console
and knows the password of the logged in user can shutdown a Red Hat 6.1
Comment 2 preed 2000-01-04 17:18:59 EST
I just tested this by logging in remotely through an ssh session, and executing
the same string of commands as shown above; the same result occured (a shutdown
commenced). I also tested this through an xterm, NOT on the console.

I will be testing this more thoroughly on someone else's box tonight, but I
wouldn't call something where any Joe Blow user who has access to a RHAT 6.x box
can shut it down a "feature."

If it is indeed a "feature," how do I turn said "feature" off?
Comment 3 Marek 'PAVUK' Antozi 2000-02-24 07:19:59 EST
it works on rh 6.2 beta too .. usermode-1.19-2 ...
i fix this by editing files in /etc/security/console.apps, for example:
$ cat halt

it works ... i thing that will be more secure distribute package usermode
with these fixes ... please ...
Comment 4 Nalin Dahyabhai 2000-02-28 17:11:59 EST
Are you sure you are not also logged in at the console?  The definition of
"console" pam_console uses is the physical screen/keyboard combination.  If
you are logged in on a VT and then start X, you are still logged in at the
console.  That you are executing the halt command from an xterm is immaterial.
The same applies for situations where you log in remotely.  If you happen to
be logged in at the workstation at the same time, you will be able to execute
commands that require access to the console.
Comment 5 preed 2000-02-28 19:36:59 EST
I just tested this in my RHAT 6.1 box (usermode-1.18-1) where I was ONLY logged
in through X (i.e. runlevel 5), and it prompted me for my password, and executed
the halt.

So, for clarification, I was NOT logged in to a VT.

Immaterial of all of this, assuming that because someone is logged in on the
console, they should have the right to shut down the machine with their own
password is not a "feature." It's a bug, and RHAT should just admit it, and fix

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