You are not logged in.

#1 2006-09-07 08:10:20

PingFloyd
Member
Registered: 2006-08-19
Posts: 25

Need some help with pam_xauth

Whenever I 'su' from one user to another it won't let me access the original user's display (the user which I started X as).

It displays the following whenever I start an app that need use of the X display:

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
...

This of course is good in that xauth is making things secure like it should be. 

I understand that there must be an exchange of the magic cookies to allow another user to access the same display and all of that (The good security features of more modern X server installations these days).  So I did a bunch of reading up on xauth and pam_xauth.  It looks like the most elegant solution is to utilize pam_xauth since it can forward the keys from the user invoking the su and the target user that you're trying to su to, and it will automatically remove the keys when the session is closed.  Very nice and secure sounding to me.

I already have pam installed in this system and already have the pam_xauth.so in /lib/security.  So I added the following line to my /etc/pam.d/su file.

session    optional   pam_xauth.so

But it still gives me the same error above whenever I run an X app that wants to use the display, after I have invoked su.

I think I must be missing something.

Offline

Board footer

Powered by FluxBB