* [gentoo-user] Xauthority and su
@ 2010-04-06 9:50 Helmut Jarausch
2010-04-06 10:01 ` Neil Bothwick
2010-04-07 13:10 ` Jonas de Buhr
0 siblings, 2 replies; 9+ messages in thread
From: Helmut Jarausch @ 2010-04-06 9:50 UTC (permalink / raw
To: gentoo-user
Hi,
when maintaining a machine from remote I sometimes have to switch to
a non-root user (whose password I don't want to know) to try something
out.
For that, I log into that machine by ssh -Y root@....
Now, how can I switch to user USER such that the X credentials
are copied.
Unfortunately, sux (from X11-misc/sux) doesn't work in that case.
I always get
X11 connection rejected because of wrong authentication.
Are there any means to achieve this?
Many thanks for a hint,
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Xauthority and su
2010-04-06 9:50 [gentoo-user] Xauthority and su Helmut Jarausch
@ 2010-04-06 10:01 ` Neil Bothwick
2010-04-07 13:10 ` Jonas de Buhr
1 sibling, 0 replies; 9+ messages in thread
From: Neil Bothwick @ 2010-04-06 10:01 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 570 bytes --]
On Tue, 06 Apr 2010 11:50:42 +0200 (CEST), Helmut Jarausch wrote:
> when maintaining a machine from remote I sometimes have to switch to
> a non-root user (whose password I don't want to know) to try something
> out.
>
> For that, I log into that machine by ssh -Y root@....
> Now, how can I switch to user USER such that the X credentials
> are copied.
If you use key based authentication, you can log in directly as the user
without needing the password.
--
Neil Bothwick
Idaho - It's not the end of the world, but you can see it from there.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Xauthority and su
2010-04-06 9:50 [gentoo-user] Xauthority and su Helmut Jarausch
2010-04-06 10:01 ` Neil Bothwick
@ 2010-04-07 13:10 ` Jonas de Buhr
2010-04-07 13:13 ` Jonas de Buhr
1 sibling, 1 reply; 9+ messages in thread
From: Jonas de Buhr @ 2010-04-07 13:10 UTC (permalink / raw
To: gentoo-user
>Hi,
>
>when maintaining a machine from remote I sometimes have to switch to
>a non-root user (whose password I don't want to know) to try something
>out.
>
>For that, I log into that machine by ssh -Y root@....
>Now, how can I switch to user USER such that the X credentials
>are copied.
>Unfortunately, sux (from X11-misc/sux) doesn't work in that case.
>I always get
>X11 connection rejected because of wrong authentication.
>
>Are there any means to achieve this?
Hi Helmut,
you need to read "man xauth" :)
/jdb
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Xauthority and su
2010-04-07 13:10 ` Jonas de Buhr
@ 2010-04-07 13:13 ` Jonas de Buhr
2010-04-07 14:12 ` Helmut Jarausch
0 siblings, 1 reply; 9+ messages in thread
From: Jonas de Buhr @ 2010-04-07 13:13 UTC (permalink / raw
To: gentoo-user
>>Are there any means to achieve this?
>
>Hi Helmut,
>
>you need to read "man xauth" :)
or maybe this:
http://www.xs4all.nl/~zweije/xauth-6.html#ss6.3
skip the DISPLAY-part if you're using ssh -Y.
/jdb
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Xauthority and su
2010-04-07 13:13 ` Jonas de Buhr
@ 2010-04-07 14:12 ` Helmut Jarausch
2010-04-07 14:42 ` Jonas de Buhr
2010-04-07 14:54 ` Jonas de Buhr
0 siblings, 2 replies; 9+ messages in thread
From: Helmut Jarausch @ 2010-04-07 14:12 UTC (permalink / raw
To: gentoo-user
On 7 Apr, Jonas de Buhr wrote:
>
>>>Are there any means to achieve this?
>>
>>Hi Helmut,
>>
>>you need to read "man xauth" :)
>
> or maybe this:
> http://www.xs4all.nl/~zweije/xauth-6.html#ss6.3
>
> skip the DISPLAY-part if you're using ssh -Y.
>
Hi Jonas,
unfortunately, I don't understand your advice.
I do have X11 forwarding configured and I don't have any problems
when working as the same user for which I logged in via ssh -Y.
But if I change the user by using su (doesn't work) or sux (works on
a local machine), Xauthorization fails.
Thanks,
Helmut.
--
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Xauthority and su
2010-04-07 14:12 ` Helmut Jarausch
@ 2010-04-07 14:42 ` Jonas de Buhr
2010-04-07 14:54 ` Jonas de Buhr
1 sibling, 0 replies; 9+ messages in thread
From: Jonas de Buhr @ 2010-04-07 14:42 UTC (permalink / raw
To: gentoo-user
>Hi Jonas,
>unfortunately, I don't understand your advice.
>
>I do have X11 forwarding configured and I don't have any problems
>when working as the same user for which I logged in via ssh -Y.
>But if I change the user by using su (doesn't work) or sux (works on
>a local machine), Xauthorization fails.
hi,
sorry i was a bit in a hurry.
it's been a while since i looked into this but i think you can add your
users x-magic-cookie to your authorized cookies, your cookie to his
cookies or a new cookie to his cookies and your authorized cookies
(which you can delete later so he doesn't have access to your session
anymore).
from the top of my head i'm not sure which way round it works (maybe
both?) which is why i only advised reading of the manpage ;)
hope this helps,
jdb
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Xauthority and su
2010-04-07 14:12 ` Helmut Jarausch
2010-04-07 14:42 ` Jonas de Buhr
@ 2010-04-07 14:54 ` Jonas de Buhr
2010-04-07 16:39 ` Helmut Jarausch
1 sibling, 1 reply; 9+ messages in thread
From: Jonas de Buhr @ 2010-04-07 14:54 UTC (permalink / raw
To: gentoo-user
>I do have X11 forwarding configured and I don't have any problems
>when working as the same user for which I logged in via ssh -Y.
>But if I change the user by using su (doesn't work) or sux (works on
>a local machine), Xauthorization fails.
oh wait... maybe the problem is something different? after the "su -"
you also lose the DISPLAY setting which was set after logging in with
"ssh -Y". you should check the DISPLAY variable before and after the su
on the remote machine.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Xauthority and su
2010-04-07 14:54 ` Jonas de Buhr
@ 2010-04-07 16:39 ` Helmut Jarausch
2010-04-07 17:31 ` Jonas de Buhr
0 siblings, 1 reply; 9+ messages in thread
From: Helmut Jarausch @ 2010-04-07 16:39 UTC (permalink / raw
To: gentoo-user
On 7 Apr, Jonas de Buhr wrote:
>
>>I do have X11 forwarding configured and I don't have any problems
>>when working as the same user for which I logged in via ssh -Y.
>>But if I change the user by using su (doesn't work) or sux (works on
>>a local machine), Xauthorization fails.
>
> oh wait... maybe the problem is something different? after the "su -"
> you also lose the DISPLAY setting which was set after logging in with
> "ssh -Y". you should check the DISPLAY variable before and after the su
> on the remote machine.
>
That's the reason why I tried sux from x11-misc/sux .
Helmut.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-user] Xauthority and su
2010-04-07 16:39 ` Helmut Jarausch
@ 2010-04-07 17:31 ` Jonas de Buhr
0 siblings, 0 replies; 9+ messages in thread
From: Jonas de Buhr @ 2010-04-07 17:31 UTC (permalink / raw
To: gentoo-user
>> oh wait... maybe the problem is something different? after the "su -"
>> you also lose the DISPLAY setting which was set after logging in with
>> "ssh -Y". you should check the DISPLAY variable before and after the
>> su on the remote machine.
>>
>That's the reason why I tried sux from x11-misc/sux .
well you will need both. proper authorization and a correct DISPLAY
variable.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-04-07 17:34 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-06 9:50 [gentoo-user] Xauthority and su Helmut Jarausch
2010-04-06 10:01 ` Neil Bothwick
2010-04-07 13:10 ` Jonas de Buhr
2010-04-07 13:13 ` Jonas de Buhr
2010-04-07 14:12 ` Helmut Jarausch
2010-04-07 14:42 ` Jonas de Buhr
2010-04-07 14:54 ` Jonas de Buhr
2010-04-07 16:39 ` Helmut Jarausch
2010-04-07 17:31 ` Jonas de Buhr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox