Security, Authentication & Authorization


Table of Contents

cmd:xauth 
Usage 
client 
cmd:gksu 
Usage 
Info 
Description 
Detail Help 
X server Token Authentication 
testing history 
Can't connect to X server after su !!! 
Can't connect to X server after su !!! 
Can't connect to X server after su !!! 
X Authorization 
Symptom 
Solution 
Trying History 

cmd:xauth 

Usage 

copy & paste 

Symptom 
tong@sunny:~$ xterm
Xlib: connection to "sunny:11.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
xterm Xt error: Can't open display: sunny:11.0
tong@sunny:~$ DISPLAY='chaos:0.0'
tong@sunny:~$ xterm
Xlib: connection to "chaos:0.0" refused by server
Xlib: Client is not authorized to connect to Server
xterm Xt error: Can't open display: chaos:0.0
Resolution 
tong@chaos:~$ xauth list
chaos:0  MIT-MAGIC-COOKIE-1  376f307045725251544d6b734f477268
tong@sunny:~$ xauth add \
chaos:0  MIT-MAGIC-COOKIE-1  376f307045725251544d6b734f477268
tong@sunny:~$ xterm

— NP!

Symptom 

change back to security way:

tong@sunny:~$ DISPLAY='sunny:11.0'
tong@sunny:~$ xterm
Xlib: connection to "sunny:11.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
xterm Xt error: Can't open display: sunny:11.0
tong@sunny:~$ xauth list
sunny:11  MIT-MAGIC-COOKIE-1  82b1b590b7d7170aee11632d59b09498
[Note]

tmp solution

server 
xauth extract - $DISPLAY > ~/s/tmp/xc.$HOST_N_S.bin
client 
ls ~/s/tmp/xc.*.bin
xauth merge - < `!!`
xauth list

client 

A good document on Xauth is available at ftp://ph-meter.beckman.uiuc.edu/security/xsecurity.txt

Vivek Khera (khera@cs.duke.edu) discusses how to start the X server in a secure mode. Note that it's specific to Sun.

<URL: http://ce-toolkit.crd.ge.com/tkxauth/> is the URL for information on using/debugging Tk vs X windows authorization problems.

http://www.xs4all.nl/~zweije/xauth-6.html

The best

http://ciac.llnl.gov/ciac/documents/ciac2316.html#2.0