I have a vnc session and I can access X11 just by doing su - user
, for other user, without the need of sux.
Also, when I am trying to switch to user, using sudo sux - user
or sudo su - user
, I can't access X11 and get the following error:
X11 connection rejected because of wrong authentication.
But others are working: sux
and su
.
Of course, I am still confused about the message sux shows:
Value of TERM has been set to "xauth -q remove localhost:100.0 2>/dev/null; xauth -q remove localhost/unix:100.0;"
Why is it removing the old keys? What's the necessity?
And su and sux works almost same, both are removing old keys and both works. How and why?
And what's the reason for
sudo su
/sudo sux
not working?
xauth info
that it is using temporary authority file with only one entry of the required session's magic key, instead of using the default .Xauthority. But why?XAUTHORITY
in the target environment, you would likely not have read permission on the file (even as root, NFS-mounted home directories wouldn't work).