Bug 228980 - XAUTHORITY env var not reset on 'su -'
XAUTHORITY env var not reset on 'su -'
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: pam (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tomas Mraz
Jay Turner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-02-16 05:59 EST by masanari iida
Modified: 2015-01-07 19:15 EST (History)
2 users (show)

See Also:
Fixed In Version: RHSA-2007-0737
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-15 10:03:21 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description masanari iida 2007-02-16 05:59:40 EST
Description of problem:
XAUTHORITY env var not reset on 'su -'

Version-Release number of selected component (if applicable):
OS RHEL4
pam-0.77-66.17

How reproducible:
Always, if you follow the step.

Steps to Reproduce:
(1) Login to X Window as root user
(2) Open a terminal.
(3) # su - non_root_user
(4) $ su - root

Actual results:
su to non_root_user in step 3 takes 0 sec.
su to root user in step 4 takes 10-20 sec.

Expected results:
su in step 3 and 4 take 0 sec.


Additional info:
This problem has been fixed in #87598 on Fedora Core.
But both RHEL3 (pam-0.75-69) and RHEL4(pam-0.77-66.17), 
this symptom still exist.

Workaround:
# unset XAUTHORITY; su - non_root_user
$ su - root
Comment 1 Yves Begrand 2007-02-19 03:09:44 EST
- complete workaround text:

This problem has been reported in Bugzilla bug #87598 and is due to the 
pam_xauth(8) PAM module that incorrectly keeps the current XAUTHORITY variable 
of root account in the shell user's environment. Two temporary solutions exist 
to avoid the delay:

1) remove XAUTHORITY variable before executing su:
   # unset $XAUTHORITY ; su - user_name
   $ su - root 

2) Create .xauth/export in the root's home directory as described 
   in pam_xauth(8) and add in the export file the list of authorized users.

Note: The second method can be better in a graphics environment as it creates 
temporary cookie needed for running X clients. The bugzilla bug mentionned 
upper is however still a good candidate as method 2 can be seen as a security 
risk depending on the context.
Comment 2 RHEL Product and Program Management 2007-05-09 03:28:58 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 7 errata-xmlrpc 2007-11-15 10:03:21 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2007-0737.html

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