Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 239395 - can't start forwarded X11 consolehelper apps on remote SSH server
Summary: can't start forwarded X11 consolehelper apps on remote SSH server
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: sudo
Version: 10
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Kopeček
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F10Target
TreeView+ depends on / blocked
 
Reported: 2007-05-08 05:01 UTC by Adam Monsen
Modified: 2009-12-18 05:55 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-12-18 05:55:32 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
RPMs installed on box_b (8.59 KB, text/plain)
2007-05-08 05:01 UTC, Adam Monsen
no flags Details
RPMs installed on box_c (25.92 KB, text/plain)
2007-05-09 05:27 UTC, Adam Monsen
no flags Details
requested info on box_b and box_c (1.60 KB, text/plain)
2007-05-16 03:51 UTC, Adam Monsen
no flags Details

Description Adam Monsen 2007-05-08 05:01:27 UTC
Description of problem:
I'm SSH'ing into a remote server. X11 Forwarding appears to be working fine, as
does sudo. For instance:

[box_a]$ ssh -X box_b
Last login: Sun Apr 22 11:22:39 2007 from box_a
[box_b]$ sudo xev

And the X11 event tester pops up right away, running as root.

However, when I try to run virt-manager or system-config-lvm, I get an error:

[box_b]$ sudo virt-manager
X11 connection rejected because of wrong authentication.
The application 'virt-manager.py ' lost its connection to the display
localhost:10.0;
most likely the X server was shut down or you killed/destroyed
the application.

I'm thinking that an RPM install failed or I don't have an RPM I need. Perhaps a
"Requires" directive is missing from the 'usermode' specfile

Version-Release number of selected component (if applicable):
usermode-1.87-3, as installed with Fedora Core 6.

How reproducible:
Always.

Steps to Reproduce:
1. Install minimal Fedora Core 6, including openssh-server and an app that uses
consolehelper, like virt-manager. Allow X11 forwarding over SSH
2. SSH into minimal Fedora Core 6 instance, forwarding X11
3. Attempt to start virt-manager

Actual results:
Error occurs as shown in "Description of problem" section of this bug report.

Expected results:
Application would start on local display.

Additional info:
* "su -" then "virt-manager" _does_ work
* box_b is a fairly minimal Fedora Core 6 install with packages installed only
as they were required. I wouldn't be surprised if 'yum groupinstall "X Windows
System"' would make this work, but why should I have to install the whole
kitchen sink?
* box_b does have the 'xorg-x11-xauth' package installed.
* I can ssh from box_a to box_c and "sudo virt-manager" works fine, where box_c
is a more "kitchen-sink" install of Fedora Core 6 (includes a GNOME desktop and
lots of packages)
* I've inspected and recreated the sudoers file on box_b, only uncommenting the
line that allows people in group wheel to run all commands without a password
* "rpm -aV" returns tons of prelink errors, so it's tough to see what of the OS
has been changed on disk
* pinged fedora-list with this problem:
http://www.redhat.com/archives/fedora-list/2007-April/msg02595.html
* an old but possibly related issue from 2004:
http://www.redhat.com/archives/fedora-list/2004-January/msg03656.html

Comment 1 Adam Monsen 2007-05-08 05:01:27 UTC
Created attachment 154313 [details]
RPMs installed on box_b

Comment 2 Tomas Mraz 2007-05-08 19:48:02 UTC
Does 'sudo /usr/sbin/virt-manager' work?

Are both box_b and box_c fully updated from Fedora updates?

usermode probably doesn't forward/set $XAUTHORITY right.


Comment 3 Adam Monsen 2007-05-09 05:16:57 UTC
> Does 'sudo /usr/sbin/virt-manager' work?

Yes!

> Are both box_b and box_c fully updated from Fedora updates?

Yes, at least most of the packages I thought would make any difference.

Comment 4 Adam Monsen 2007-05-09 05:27:56 UTC
Created attachment 154377 [details]
RPMs installed on box_c

Comment 5 Adam Monsen 2007-05-09 05:31:38 UTC
> Are both box_b and box_c fully updated from Fedora updates?

Here's a more accurate answer: No.

But I'm happy to try updating all or some of the packages on one or both machines.

Comment 6 W.C. Epperson 2007-05-09 16:03:08 UTC
Also see similar bug 239570.  It's odd that I can reproduce the common symptoms
on every environment I have EXCEPT the Fedora 6 one noted in this bug (239395).

Comment 7 Miloslav Trmač 2007-05-15 20:15:31 UTC
Please run the following commands:
  uname -n
  cat /etc/hosts
  echo $DISPLAY
  echo $XAUTHORITY
  xauth list
  su - -c '(echo $XAUTHORITY; xauth list)'

on both box_b and box_c, and paste the results.

Comment 8 Adam Monsen 2007-05-16 03:51:04 UTC
Created attachment 154793 [details]
requested info on box_b and box_c

Here is the information you requested.

Comment 9 Miloslav Trmač 2007-05-16 11:23:35 UTC
Thank you, reproduced.

This is unrelated to usermode: (sudo su - -c xeyes) doesn't work either.

This happens because ssh uses the default Xauthority file, and does not set
XAUTHORITY, so libXau uses $HOME/.Xauthority.  sudo changes the uid, but not
$HOME, so the original $HOME/.Xauthority is still used.  Then, userhelper (or su
-) use the pam_xauth module.

pam_xauth does not use $HOME/.Xauthority, but "invoking user's home
directory"/.Xauthority, i.e. /root/.Xauthority, which does not exist.

So, pam_xauth should be using $HOME/.Xauthority if XAUTHORITY is not set and
$HOME/.Xauthority is readable by the invoking user.

You can use (XAUTHORITY=~/.Xauthority sudo virt-manager) as a work-around.

I'm afraid the above still does not explain the difference in behavior between
box_b and box_c.

Comment 10 Tomas Mraz 2007-07-25 15:22:29 UTC
This would be only a workaround. What's IMHO really broken is environment as set
up by sudo. It should call pam_xauth as well but currently simply adding the
module to sudo pam configuration doesn't help because it is calling
pam_open_session with empty $DISPLAY.


Comment 11 Miloslav Trmač 2007-07-27 11:55:16 UTC
I'm not sure whether the behavior of sudo is incorrect, but the behavior of
pam_xauth (using a different default path for .Xauthority than the X libraries_)
is definitely incorrect.

Comment 12 Bug Zapper 2008-04-04 00:35:37 UTC
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

Comment 13 Bug Zapper 2008-05-14 02:52:15 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 14 Bug Zapper 2008-11-26 01:53:52 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 15 Gregory Trivett 2008-12-11 03:50:05 UTC
bumping this issue for fedora 10. From fedora 10 box to fedora 10 box using ssh -X or ssh -Y. env shows DISPLAY as localhost:10.0 and attempting to run any app (gnome-terminal, evolution..etc), errors with "Cannot open display:". From Fedora 10 box to Fedora 8 box using ssh -[XY] everything works. In Fedora 8, env shows localhost:10.0.

/etc/ssh ssh_config and sshd_config same between both fedora 10 and fedora 8 hosts.

Attempting to use straight ssh session, xhost + and export DISPLAY= does nothing and gives the same errors.

Comment 16 Tomas Mraz 2008-12-11 09:25:10 UTC
Gregory, are you talking about running apps through sudo or directly? Because this bug is only about problems when X apps are run from ssh session through sudo. If this is about directly running the X apps from ssh session it would be a completely new problem, so please open a new bug report for it against openssh.

Comment 17 Nik Lam 2009-04-25 15:19:24 UTC
Hi,

I'm now noticing this problem on Fedora 10 x86_64 too. I used to be able to successefully run 

 sudo virt-manager

on a Centos 5 box with X forwarding activated and the virt-manager gui would display locally.

I haven't done it in a while and both operating systems have had packages updated several times since I last successfully ran it, so I'm not sure when the change occurred which is causing the problem. Other that package updates, nothing that I can think of on either the ssh server or client has been modified.

N.B. I'm running sshd on a non-standard port.

Here's an example of the ssh session:

[lnik@fedora10 ~]$ ssh -X -p 3923 centos5.example.com
lnik.com's password: 
Last login: Sun Apr 26 01:06:21 2009 from example123.dyn.example.com
###########################################################################
# Centos5
#
###########################################################################
/usr/bin/xauth:  creating new authority file /home/lnik/.Xauthority
[lnik@centos5 ~]$ sudo virt-manager 
X11 connection rejected because of wrong authentication.
The application 'virt-manager.py' lost its connection to the display localhost:10.0;
most likely the X server was shut down or you killed/destroyed
the application.
[lnik@centos5 ~]$

Comment 18 Bug Zapper 2009-11-18 08:11:58 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 19 Bug Zapper 2009-12-18 05:55:32 UTC
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


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