sudo with problems

William Hooper whooper@freeshell.org
Tue Apr 22 16:22:00 2003


Uwe Dippel said:
> There was a post on the archive proposing an init-script:
> http://www.realvnc.com/pipermail/vnc-list/2002-August/032988.html
> While adding a few things and polishing it up, I found that
> [root@machine myuser]# sudo -H -u myuser vncserver
> brings some timeouts:
> xauth:  timeout in locking authority file /root/.xauthEmHvPc
> xauth:  timeout in locking authority file /root/.xauthEmHvPc
[snip]
> Also strange that here and in that post the server starts despite of
> the timeout.

The error is coming from xauth, not VNC.

> Similar stuff on RH 7.3 and RH 8.0.
>
> Btw,
> [root@machine myuser]# sudo -H -u myuser vncserver -kill :1
> works fine.

Yep, because you are not messing with xauth.

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.  Check
out http://faq.gotomyvnc.com/fom-serve/cache/86.html for a copy of Red
Hat's script.

-- 
William Hooper