Operating System - HP-UX
1823415
Members
2610
Online
109655
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2003 12:42 AM
03-26-2003 12:42 AM
I have sshd in place with X11 forwarding enable on both client and server(sshd_config)
When i do su to other users, or sudo , the xterm reply with error message;
Error: Can't open display: 11.22.5.29:10.0
Error: Couldn't find per display information
I read some previous posting that I need to use xauth to add MAGIC-COOKIE to my session.
How do i use xauth to add this MAGIC-COOKIE?
i don't understand what man pages says.
When i do su to other users, or sudo , the xterm reply with error message;
Error: Can't open display: 11.22.5.29:10.0
Error: Couldn't find per display information
I read some previous posting that I need to use xauth to add MAGIC-COOKIE to my session.
How do i use xauth to add this MAGIC-COOKIE?
i don't understand what man pages says.
tyl
Solved! Go to Solution.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2003 12:53 AM
03-26-2003 12:53 AM
Solution
Getting "su newuser" to work through ssh
The newly assigned MIT-MAGIC-COOKIE must be provided to newuser. This feature of ssh can not be by-passed by using the "xhost" command.
Extracting and passing the MIT-MAGIC-COOKIE can be done by using the follow sequence of commands:
olduser@remote$ xauth nextract - $DISPLAY | xauth -f /tmp/newuser.xauth nmerge -
olduser@remote$ echo $DISPLAY > /tmp/newuser.display
olduser@remote$ chmod 700 /tmp/newuser.xauth /tmp/newuser.display
olduser@remote$ chown newuser /tmp/newuser.xauth /tmp/newuser.display
olduser@remote$ su - newuser
newuser@remote$ export XAUTHORITY=/tmp/newuser.xauth
newuser@remote$ export DISPLAY=$(cat /tmp/newuser.display)
newuser@remote$ rm /tmp/newuser.display
The newly assigned MIT-MAGIC-COOKIE must be provided to newuser. This feature of ssh can not be by-passed by using the "xhost" command.
Extracting and passing the MIT-MAGIC-COOKIE can be done by using the follow sequence of commands:
olduser@remote$ xauth nextract - $DISPLAY | xauth -f /tmp/newuser.xauth nmerge -
olduser@remote$ echo $DISPLAY > /tmp/newuser.display
olduser@remote$ chmod 700 /tmp/newuser.xauth /tmp/newuser.display
olduser@remote$ chown newuser /tmp/newuser.xauth /tmp/newuser.display
olduser@remote$ su - newuser
newuser@remote$ export XAUTHORITY=/tmp/newuser.xauth
newuser@remote$ export DISPLAY=$(cat /tmp/newuser.display)
newuser@remote$ rm /tmp/newuser.display
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP