sux no longer works; su - some_user not carrying over DISPLAY environment variables.
This document (7003743) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 10
SUSE Linux Enterprise Desktop 10
SUSE Linux Enterprise Desktop 11
openSUSE 10.1 and up
Situation
- When executing "sux - some_user" and then printing the environment with "env" you will notice that none of the x DISPLAY variables have carried over.
- When executing "su - some_user" and then printing the environment with "env" you will notice that none of the x DISPLAY variables have carried over.
- When executing "su -" or "sux -" (which implies the root user) and then printing the environment with "env" you will notice that the x DISPLAY variables have carried over.
Resolution
The man page for pam_xauth tells the details
man pam_xauth
In order to have the functionality your used to in Pre SLE10 days then you will need to do the following:
Change /etc/pam.d/su to have
session optional pam_xauth.so systemuser=1
Once you make that change you will be able to execute scenario's 1 and 2 without a problem and it will carry over the x DISPLAY variables.
You can also execute "su some_user" without the "-" and that will work as well.
Additional Information
systemuser=UID
Specify the highest UID which will be assumed to belong to a "system" user. pam_xauth will refuse to forward credentials to users with UID less than or equal to this number, except for root and the "targetuser", if specified.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7003743
- Creation Date: 02-Jul-2009
- Modified Date:03-Mar-2020
-
- SUSE Linux Enterprise Desktop
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com