sudo with problems

William Hooper whooper@freeshell.org
Tue Apr 22 19:18:01 2003


Uwe Dippel said:
> --- William Hooper <whooper@freeshell.org> wrote:
>
>> The error is coming from xauth, not VNC.
>
>> Is there a reason to use sudo over just using su?  The init scripts
>> from
>> both TightVNC and Red Hat (possibly more) use su without a problem.
>
> Sorry, here they don't.
> I tried
> [root@machine myuser]# su - myuser -c "vncserver :1"
> xauth:  timeout in locking authority file /root/.xauthGPeKe5
> xauth:  timeout in locking authority file /root/.xauthGPeKe5
>

Sorry I can't give you anything more that WORKSFORME on Red Hat 7.3:

[root@snowball root]# su - whooper -c "vncserver :3"

New 'X' desktop is snowball.private.whooper.org:3

Starting applications specified in /home/whooper/.vnc/xstartup
Log file is /home/whooper/.vnc/snowball.private.whooper.org:3.log

[root@snowball root]#

And after testing sudo, it works also:

[root@snowball root]# sudo -H -u whooper vncserver :3

New 'X' desktop is snowball.private.whooper.org:3

Starting applications specified in /home/whooper/.vnc/xstartup
Log file is /home/whooper/.vnc/snowball.private.whooper.org:3.log

[root@snowball root]#

Let me state again, you are having a problem with xauth, not VNC.  Posting
your VNC log might help, because xauth might put a more descriptive error
there.

--
William Hooper