AIX - X displays forwarding problem with su

Darren Tucker dtucker at
Fri Dec 6 00:14:38 EST 2002

Steven Bishop wrote:
> Currently i'm using AIX 4.3.3. I've installed OpenSSH version 2.9p1
> which by the way works with the way i've hacked it together to get X
> Displays working correctly.

Firstly, 2.9 has some widely-published security problems. You may want
to upgrade.

> I can ssh to a system as myself and ( su - any_userid )  and export my
> display back but i had to hack this together in order to get it to work.

This is not specific to AIX (it happens on Solaris and probably others)
and happens because su clears a lot of the environment (eg $DISPLAY) and
because the new uid does not know about the xauth credentials.

Redhat's su seems to create a temporary xauth file (try "echo
$XAUTHORITY") and preserve $DISPLAY but this does not appear to be
common behaviour.

We use sudo instead for root access. It preserves $DISPLAY and $HOME (so
$HOME/.Xauthority can still be used). It also provides better logging.

Darren Tucker (dtucker at
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.

More information about the openssh-unix-dev mailing list