Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 228980 - XAUTHORITY env var not reset on 'su -'
Summary: XAUTHORITY env var not reset on 'su -'
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: pam
Version: 4.0
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Tomas Mraz
QA Contact: Jay Turner
Depends On:
TreeView+ depends on / blocked
Reported: 2007-02-16 10:59 UTC by masanari iida
Modified: 2015-01-08 00:15 UTC (History)
2 users (show)

Fixed In Version: RHSA-2007-0737
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-11-15 15:03:21 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2007:0737 normal SHIPPED_LIVE Moderate: pam security, bug fix, and enhancement update 2007-11-15 15:03:13 UTC

Description masanari iida 2007-02-16 10:59:40 UTC
Description of problem:
XAUTHORITY env var not reset on 'su -'

Version-Release number of selected component (if applicable):

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.

# unset XAUTHORITY; su - non_root_user
$ su - root

Comment 1 Yves Begrand 2007-02-19 08:09:44 UTC
- 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 07:28:58 UTC
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

Comment 7 errata-xmlrpc 2007-11-15 15:03:21 UTC
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.

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