From owner-freebsd-questions@FreeBSD.ORG Wed Sep 2 19:06:29 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 782D51065679 for ; Wed, 2 Sep 2009 19:06:29 +0000 (UTC) (envelope-from tajudd@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.248]) by mx1.freebsd.org (Postfix) with ESMTP id 38F218FC15 for ; Wed, 2 Sep 2009 19:06:29 +0000 (UTC) Received: by an-out-0708.google.com with SMTP id d14so447802and.13 for ; Wed, 02 Sep 2009 12:06:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=aE4PhwENvRufAIA3cllCMiCjOZ0zgnIjlewkcyFMW6Y=; b=he8YMO0JF8pvZQKS2TiI+Zc0vIRXWx5KKzrWFv90ftHNFbmqCXAyn8eJGbjwfP8lej aZwWPb3qCjqh/s4iGjJMr8IKfumLASAQ7IMQ+JM+QY3WgMPgADbPXBnoB2diI81fYCzQ LiF0EFFGjxcCYHpa1hoj66gzYev3XzvCKBCbI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Wxng4jYJWWTrjAoSHYCHXJ2RuGLHJ02ovAJqbg0dXy5IRaDI99jh9r/52IuSqww022 +1lUjtE51TwPE3g3MiEKsQPP4ppJStErxaLY7HgaKKzlEcMjnLYob8aO+AfYYStmAvAW F8BT7IXlHmdwQqsbA7gdVoOHsaYmxSsd0n048= MIME-Version: 1.0 Received: by 10.101.9.10 with SMTP id m10mr9629230ani.130.1251918388520; Wed, 02 Sep 2009 12:06:28 -0700 (PDT) In-Reply-To: <20090902072659.7829da56@scorpio.seibercom.net> References: <20090902072659.7829da56@scorpio.seibercom.net> Date: Wed, 2 Sep 2009 13:06:28 -0600 Message-ID: From: Tim Judd To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: 'alias' + sudo X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 19:06:29 -0000 On 9/2/09, Jerry wrote: > I have set up several 'alias' definitions in my .bashrc file. They are > honored when run as either a regular user or as root. However, when I > prefix a command with 'sudo', the alias is no longer honored. In other > words, the actual command is run;however, any flags that I was passing > to it via 'alias' are lost. How can I circumvent this annoyance. > > Example, I often use 'pico' from within 'xterm'. I set up an alias that > causes pico to use the mouse; i.e., pico -m which works fine as long as > I do not prefix the command with 'sudo' > Because sudo calls the binary, via SUID on sudo. It doesn't pay attention to user profiles or rc files (like .bashrc). I don't use sudo, so I can't recommend past that. --TJ