Date: Wed, 2 Sep 2009 13:06:28 -0600 From: Tim Judd <tajudd@gmail.com> To: freebsd-questions@freebsd.org Subject: Re: 'alias' + sudo Message-ID: <ade45ae90909021206u43135147u1f9431c10a043dda@mail.gmail.com> In-Reply-To: <20090902072659.7829da56@scorpio.seibercom.net> References: <20090902072659.7829da56@scorpio.seibercom.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 9/2/09, Jerry <gesbbb@yahoo.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ade45ae90909021206u43135147u1f9431c10a043dda>