Bug 22034 - wrong owner of /dev entries
wrong owner of /dev entries
Product: Red Hat Linux
Classification: Retired
Component: gdm (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Aaron Brown
Depends On:
  Show dependency treegraph
Reported: 2000-12-10 11:39 EST by jmbastia
Modified: 2007-04-18 12:30 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-12-11 20:58:06 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 jmbastia 2000-12-10 11:39:47 EST
I'm running RedHat 7.0 with XFree86 4.0.1 as shipped on the CDs, and using
gdm for a gui login.

Earlier this week, Netscape had frozen up on a user, so I hit
CTRL-ALT-BACKSPACE to kill the X server and log the user out.

Then I logged in to the system, and when I attempted to play some music,
both the mixer program and XMMS complained that the soundcard wasn't
configured properly.  I knew it was, and after hunting around for a bit, I
found that the user that was logged in when Netscape froze was still the
owner of /dev/mixer, /dev/dsp*, and a slew of other devices.

I su'd to root and changed the ownership to myself, and was able to play
music again.

However, the /dev entries' ownership is stuck now to whatever I chown them
to as root.  Earlier, whenever a user logged in, they became the owner of
certain /dev entries for that session.  Now that isn't happening anymore.
Comment 1 Havoc Pennington 2000-12-10 13:34:09 EST
This is a usermode issue of some kind, reassigning.
Comment 2 jmbastia 2000-12-16 10:09:12 EST
Recently, I had to reboot into Windows 95 for a moment.  I just noticed that the
ownership of the /dev entries appears to be working correctly again.  It seems a
reboot fixed the problem...  That's not supposed to happen with Unix.  :)

In any case, it's working again.
Comment 3 Lenny G. Arbage 2005-08-07 01:35:58 EDT
I have the same problem.  Can reproduce virtually every time by doing a
ctrl-alt-backspace in X (gnome) as one user, then logging back in as another...
 Suggest REOPEN and assign this to the right person.
Comment 4 Nalin Dahyabhai 2005-08-08 18:28:07 EDT
This sounds like a "gdm doesn't close the session if the X server exits
unexpectedly" problem, but I can't reproduce this either on a current release
(RHEL 4 or Fedora Core 4).  Which release are you still seeing this with?
Comment 5 Nalin Dahyabhai 2005-08-08 18:30:28 EDT
(Moving back to "gdm" for the sake of searching -- usermode isn't involved when
you log in or out.)
Comment 6 Lenny G. Arbage 2005-08-09 11:25:46 EDT
I'm seeing this on a FC2 box (perhaps it has been fixed in FC3 or 4).  I'll try
to come up with some steps for reproducing.

In the past, this has usually happened as a result of one user's X session
freezing up (last time, via my 1-yr old nephew's random pounding on the keyboard
on the gnome desktop).  Killing the X session with ctrl-alt-backspace gets back
to the login.

After not being able to get /dev to reassign automatically, I've tried
restarting gdm ('init 3') and even going all the way down to init 1 (checking to
make sure all non-essential procs went away) and then going back up to init
level 5.  Still no good.  The only way I've been able to get it to work again is
via reboot :( .
Comment 7 Nalin Dahyabhai 2005-08-09 13:59:15 EDT
Yes, the mechanism is the pam_console module, and it keeps track of who the
"owner" of the devices should be, and how many times that user is logged in,
using a reference count file in /var/run/console (it was /var/lock/console on
earlier releases).  The count is updated when the user in question logs in or
out (the logout seems to avoid detection here), the "owner" only changes when
the previous owner's count drops to 0, and the reference count is only reset at
Comment 8 Nalin Dahyabhai 2005-08-09 14:32:48 EDT
I can confirm that this was still a problem in Fedora Core 2 -- the
Ctrl-Alt-Backspace after login method works on FC2 but not FC3, so my thinking
is that this was fixed somewhere between gdm and

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