Re: sudo with my aliases



Hi Michael,

Michael Heiming wrote:
In comp.os.linux.misc sam.s.kong@xxxxxxxxx:
Hello,

sudo command doesn't understand the alias I defined.
How can I make "sudo" work with the aliases I defined for my account?

Presuming standard setup, put in your script near top:

# Source user environment
. /home/${SUDO_USER}/.bashrc

I think I've already set it up like you said.
The thing is that I'm using a mac (Tiger).

/Users/sam/.bash_login has the alias definitions.
But the aliases don't work with sudo.
Are you sure that it works?

Thanks.

Sam

.



Relevant Pages

  • Re: sudo with my aliases
    ... How can I make "sudo" work with the aliases I defined for my account? ... Presuming standard setup, put in your script near top: ...
    (comp.os.linux.misc)
  • Re: Gruppo di =?ISO-8859-1?Q?continuit=E0eutenteRoot?=
    ... No, non va modificato lo script, si tratta di scrivere sudo davanti allo ... leggendo poi tra le varie FAQ e sul forum avevo trovato una procedura ... Non funziona male ma e proprietario, con tutti i difetti che questo ...
    (it.comp.macintosh)
  • Re: How to suspend x86 via apm as non-root user?
    ... Use sudo, combined with a script that runs apm -s. ... USERS ALL = NOPASSWD: SHUTDOWN, NTPDATE ...
    (Debian-User)
  • Re: Card Reader
    ... Running your script ... instead of sudo is worthless because your script *can't do ... And of course it doesn't ask for a root password, ... >> That's just more bullshit Bryan, and you might as well leave ...
    (rec.photo.digital)
  • Re: [opensuse] alias failure
    ... So it's just an accident that the following aliases all work as I ... It's uncommon for interactive shells to have any positional parameters ... Unlike the very limited capabilities of aliases, shell procedures ... I made a script with nothing but that in it, ...
    (SuSE)