From owner-UUASC@UUASC.org Fri Apr 8 14:13:21 2005 Received: from compata.com (compata.com [216.237.5.34]) by eldwist.darkuncle.net (8.12.11/8.12.9) with ESMTP id j38LDKmG024393 for ; Fri, 8 Apr 2005 14:13:21 -0700 (PDT) Received: from mail.compata.com (localhost.localdomain [127.0.0.1]) by compata.com (8.12.11/8.12.8) with ESMTP id j38LCwpt008550 for ; Fri, 8 Apr 2005 14:12:58 -0700 Received: (from majordom@localhost) by mail.compata.com (8.12.11/8.12.8/Submit) id j38LCwwI008534 for ; Fri, 8 Apr 2005 14:12:58 -0700 Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.202]) by compata.com (8.12.11/8.12.8) with ESMTP id j38LCf0N006574 for ; Fri, 8 Apr 2005 14:12:41 -0700 Received: by rproxy.gmail.com with SMTP id y7so843185rne for ; Fri, 08 Apr 2005 14:12:40 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=C9EX+jJ2ftkQdeAiGanBl5pKvrcsLKJExsKB05XcEwzDGnMI17/ve0BTXqn9Fk+CbrBYNgoVL8m4j2JZvcxfJzcRZ+8gLf9P64fgCwdvcgfEiAIQRR40Hx02apHfB8bAiPoufCLcGyHKliweyFAXv0WMjo/+1/YA6cTO9WfqvXE= Received: by 10.38.66.24 with SMTP id o24mr1909134rna; Fri, 08 Apr 2005 14:12:40 -0700 (PDT) Received: by 10.38.104.75 with HTTP; Fri, 8 Apr 2005 14:12:40 -0700 (PDT) Message-ID: <2d7eccf505040814123c63221@mail.gmail.com> Date: Fri, 8 Apr 2005 14:12:40 -0700 From: Thornton Prime To: UUASC@UUASC.org Subject: Re: ssh instead of su (was Re: configuration problems....) In-Reply-To: <000f01c53c7a$626092a0$b301a8c0@internal.bigfish.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit References: <4256DB35.6040307@fastmail.fm> <000f01c53c7a$626092a0$b301a8c0@internal.bigfish.com> X-Scanned-By: milter-sender/0.55.730 (mail.compata.com []); Fri, 08 Apr 2005 14:12:58 -0700 X-Scanned-By: milter-sender/0.55.730 (mail.compata.com []); Fri, 08 Apr 2005 14:12:41 -0700 Sender: owner-UUASC@UUASC.org Precedence: bulk Reply-To: UUASC@UUASC.org List-ID: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Status: RO X-Status: A Content-Length: 1467 Lines: 33 On Apr 8, 2005 1:34 PM, Nicholas Bernstein wrote: > I'll do this as well on occasion. Ssh nicely has built in X11 forwarding, > which you have to setup by hand if you su. It just makes it easier if you > know you're going to use an X app that needs root privs. Here is my script that takes care of this with sudo ... ## xsudo() ########################################################## # A wrapper for sudo that passes the existing Xauthority cookie from # a privileged location to root. xsudo() { for i in /usr/X11R6/bin/xauth /usr/openwin/bin/xauth; do if [ -x ${i} ]; then XAUTHEXEC=${i} break fi done if [ -n ${XAUTHEXEC} ]; then sudo ${XAUTHEXEC} -f /root/.Xauthority add `${XAUTHEXEC} list ${DISPLAY}` XAUTHORITY=/root/.Xauthority sudo $* sudo ${XAUTHEXEC} -f /root/.Xauthority remove ${DISPLAY} else echo "Error: No xauth found." fi } ------------------------------------------------------------------------ --General instructions-- --Administrative requests-- Post to this list, Send to Majordomo@UUASC.org, no subject needed send to UUASC@UUASC.org Include ONLY the following in the message BODY Last resort, send to To unsubscribe: "unsubscribe UUASC" owner-UUASC@UUASC.org Information or help: "info UUASC" or "help"