Re: 'alias' + sudo

2009-09-04 Thread George Davidovich
On Thu, Sep 03, 2009 at 08:10:36PM -0400, Jerry wrote: On Fri, 4 Sep 2009 01:34:05 +0200 Mel Flynn wrote: alias spico='/usr/local/bin/sudo pico -m' and be done with it. Instead of an extra alias, why not export $VISUAL or $EDITOR, and rely on sudoedit(8)? That is what I am currently doing;

Re: 'alias' + sudo

2009-09-04 Thread Randy Belk
On Fri, Sep 4, 2009 at 10:50 AM, George Davidovichfree...@optimis.net wrote: On Thu, Sep 03, 2009 at 08:10:36PM -0400, Jerry wrote: On Fri, 4 Sep 2009 01:34:05 +0200 Mel Flynn wrote: alias spico='/usr/local/bin/sudo pico -m' and be done with it. Instead of an extra alias, why not export

Re: 'alias' + sudo

2009-09-03 Thread Mel Flynn
On Wednesday 02 September 2009 13:26:59 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

Re: 'alias' + sudo

2009-09-03 Thread Jerry
On Fri, 4 Sep 2009 01:34:05 +0200 Mel Flynn mel.flynn+fbsd.questi...@mailing.thruhere.net wrote: alias spico='/usr/local/bin/sudo pico -m' and be done with it. That is what I am currently doing; however,there are other commands that I want to use that are not available when used via sudo

Re: 'alias' + sudo

2009-09-03 Thread Mel Flynn
further along the command line and attempt to expand everything. So the shell only changes the command that is really run, when the first word matches an alias. Sudo or any app for that matter, never knew it was run through an alias. However.reading through the bash manpage

'alias' + sudo

2009-09-02 Thread Jerry
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

Re: 'alias' + sudo

2009-09-02 Thread Tim Judd
On 9/2/09, Jerry ges...@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,

Re: 'alias' + sudo

2009-09-02 Thread Jerry
On Wed, 2 Sep 2009 13:06:28 -0600 Tim Judd taj...@gmail.com wrote: [snip] 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. In other words, sudo is not compatible with

Re: 'alias' + sudo

2009-09-02 Thread Dan Nelson
In the last episode (Sep 02), Jerry said: On Wed, 2 Sep 2009 13:06:28 -0600 Tim Judd taj...@gmail.com wrote: 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. In

Re: 'alias' + sudo

2009-09-02 Thread Polytropon
On Wed, 2 Sep 2009 15:06:48 -0500, Dan Nelson dnel...@allantgroup.com wrote: sudo does not run root's shell at all; it directly runs whatever is given it on the commandline. Another idea would to be to call sudo with the desired shell as argument (in order to inherit the aliases), followed by a